public void displayTotalComments(String typeId) {
   this.typeId = typeId;
   CommentService commentService = ApplicationContextUtil.getSpringBean(CommentService.class);
   CommentSearchCriteria searchCriteria = new CommentSearchCriteria();
   searchCriteria.setType(StringSearchField.and(type));
   searchCriteria.setTypeid(StringSearchField.and(typeId));
   this.setCaption(
       AppContext.getMessage(
           GenericI18Enum.TAB_COMMENT, commentService.getTotalCount(searchCriteria)));
 }
 @Override
 protected SearchCriteria fillUpSearchCriteria() {
   searchCriteria = new VersionSearchCriteria();
   searchCriteria.setProjectId(
       new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProjectId()));
   searchCriteria.setVersionname(StringSearchField.and(nameField.getValue().trim()));
   return searchCriteria;
 }
Exemple #3
0
 @Override
 protected ItemTimeLoggingSearchCriteria getItemSearchCriteria() {
   ItemTimeLoggingSearchCriteria searchCriteria = new ItemTimeLoggingSearchCriteria();
   searchCriteria.setProjectIds(new SetSearchField<>(CurrentProjectVariables.getProjectId()));
   searchCriteria.setType(StringSearchField.and(ProjectTypeConstants.TASK));
   searchCriteria.setTypeId(new NumberSearchField(bean.getId()));
   return searchCriteria;
 }
Exemple #4
0
 @Override
 protected Double getTotalNonBillableHours(SimpleTask bean) {
   ItemTimeLoggingSearchCriteria criteria = new ItemTimeLoggingSearchCriteria();
   criteria.setProjectIds(new SetSearchField<>(CurrentProjectVariables.getProjectId()));
   criteria.setType(StringSearchField.and(ProjectTypeConstants.TASK));
   criteria.setTypeId(new NumberSearchField(bean.getId()));
   criteria.setIsBillable(new BooleanSearchField(false));
   return itemTimeLoggingService.getTotalHoursByCriteria(criteria);
 }
    @Override
    protected SearchCriteria fillUpSearchCriteria() {
      OpportunitySearchCriteria searchCriteria = new OpportunitySearchCriteria();
      searchCriteria.setSaccountid(new NumberSearchField(AppContext.getAccountId()));

      if (StringUtils.isNotBlank(this.nameField.getValue().trim())) {
        searchCriteria.setOpportunityName(StringSearchField.and(this.nameField.getValue().trim()));
      }

      if (this.myItemCheckbox.getValue()) {
        searchCriteria.setAssignUsers(new SetSearchField<>(AppContext.getUsername()));
      } else {
        searchCriteria.setAssignUsers(null);
      }

      return searchCriteria;
    }
  @Override
  public SimpleStandupReport findStandupReportByDateUser(
      Integer projectId, String username, Date onDate, Integer sAccountId) {
    StandupReportSearchCriteria criteria = new StandupReportSearchCriteria();
    criteria.setProjectId(new NumberSearchField(projectId));
    criteria.setLogBy(StringSearchField.and(username));
    criteria.setOnDate(new DateSearchField(onDate));
    List reports =
        standupReportMapperExt.findPagableListByCriteria(
            criteria, new RowBounds(0, Integer.MAX_VALUE));

    if (CollectionUtils.isNotEmpty(reports)) {
      return (SimpleStandupReport) reports.get(0);
    }

    return null;
  }