Example #1
0
 @Override
 protected List<ReportBean> getReportBeanList(
     FilterInfo filter,
     TPersonBean user,
     Integer projectID,
     Integer releaseID,
     List<ErrorData> errors) {
   String userQuery = filter.getDescription();
   Locale locale = user.getLocale();
   Integer objectID = null;
   Integer entityFlag = null;
   if (projectID != null) {
     if (releaseID != null) {
       entityFlag = SystemFields.RELEASESCHEDULED;
       objectID = releaseID;
     } else {
       entityFlag = SystemFields.PROJECT;
       objectID = projectID;
     }
   }
   List<ReportBean> result = new ArrayList<ReportBean>();
   if (userQuery != null && userQuery.length() > 0) {
     ReportBeans reportBeans =
         TQLPlusFilterExecuterFacade.getInstance()
             .getInstantFilterReportBeans(
                 userQuery, null, locale, user, errors, null, objectID, entityFlag, false);
     if (reportBeans != null) {
       result = reportBeans.getItems();
     }
   }
   if (!errors.isEmpty()) {
     for (int i = 0; i < errors.size(); i++) {
       ErrorData error = (ErrorData) errors.get(i);
       LOGGER.error(error.getResourceKey());
     }
   }
   return result;
 }
Example #2
0
 @Override
 public TPersonBean createInstance(Map<String, String> attributes) {
   TPersonBean bean = new TPersonBean();
   bean = (TPersonBean) bean.deserializeBean(attributes);
   return bean;
 }