コード例 #1
0
  public Boolean isReportActive(Long repoSeqId) {
    IPersistenceService persistenceService =
        (IPersistenceService) ServiceLocator.findService("hibernatePesistenceService");
    ;
    List activeFlagList =
        persistenceService.executeQuery(
            " from "
                + EntityConstansts.ReportsAuthDetails
                + " where repoSeqid= "
                + repoSeqId
                + " and activeFlag = 0");

    if (activeFlagList != null && !activeFlagList.isEmpty()) {
      return false;
    }
    return true;
  }
コード例 #2
0
  public List getAllAccessReports() throws ALNTApplicationException, ALNTSystemException {
    IPersistenceService persistenceService =
        (IPersistenceService) ServiceLocator.findService("hibernatePesistenceService");
    ;
    List accessReportsList =
        persistenceService.executeQuery(
            " from "
                + EntityConstansts.JiResourceFolder
                + " resFolder where resFolder.parentFolder in (select id from "
                + EntityConstansts.JiResourceFolder
                + " folder where folder.uri in ('/organizations/organization_1/reports/ACCESS','/organizations/organization_1/reports/ADHOC/ACCESS'))");
    // +"and resFolder.id not in (SELECT repoSeqid FROM "+ EntityConstansts.ReportsAuthDetails +"
    // where rad.activeFlag = 0))");

    /*List accessReportsList = persistenceService.executeQuery(" from "+EntityConstansts.JiResourceFolder+
    " resFolder where resFolder.parentFolder in (select id from "+EntityConstansts.JiResourceFolder + " folder where folder.uri in ('/reports/ACCESS','/reports/ADHOC/ACCESS'))" +
    		" and resFolder.id not in (SELECT repoSeqid FROM ReportAuthDetails where activeFlag = 0)");*/
    // List accessReportsList = persistenceService.executeQuery("select resFolder.label as label
    // from "+ EntityConstansts.JiResourceFolder +" resFolder where resFolder.uri in
    // ('/reports/ACCESS','/reports/ADHOC/ACCESS') ");

    return accessReportsList;
  }