当前位置: 首页>>代码示例>>Java>>正文


Java Criteria.addGreaterOrEqualThan方法代码示例

本文整理汇总了Java中org.apache.ojb.broker.query.Criteria.addGreaterOrEqualThan方法的典型用法代码示例。如果您正苦于以下问题:Java Criteria.addGreaterOrEqualThan方法的具体用法?Java Criteria.addGreaterOrEqualThan怎么用?Java Criteria.addGreaterOrEqualThan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ojb.broker.query.Criteria的用法示例。


在下文中一共展示了Criteria.addGreaterOrEqualThan方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addStringRangeCriteria

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * Adds to the criteria object based on query characters given
 */
private void addStringRangeCriteria(String propertyName, String propertyValue, Criteria criteria) {

    try {
        if (StringUtils.contains(propertyValue, SearchOperator.BETWEEN.op())) {
            String[] rangeValues = StringUtils.split(propertyValue, SearchOperator.BETWEEN.op());
            if (rangeValues.length < 2)
                throw new IllegalArgumentException("Improper syntax of BETWEEN operator in " + propertyName);

            criteria.addBetween(propertyName, rangeValues[0], rangeValues[1]);
        } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN_EQUAL.op())) {
            criteria.addGreaterOrEqualThan(propertyName, ObjectUtils.clean(propertyValue));
        } else if (propertyValue.startsWith(SearchOperator.LESS_THAN_EQUAL.op())) {
            criteria.addLessOrEqualThan(propertyName, ObjectUtils.clean(propertyValue));
        } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN.op())) {
            criteria.addGreaterThan(propertyName, ObjectUtils.clean(propertyValue));
        } else if (propertyValue.startsWith(SearchOperator.LESS_THAN.op())) {
            criteria.addLessThan(propertyName, ObjectUtils.clean(propertyValue));
        } else {
            criteria.addEqualTo(propertyName, ObjectUtils.clean(propertyValue));
        }
    } catch (IllegalArgumentException ex) {
        GlobalVariables.getMessageMap().putError("lookupCriteria[" + propertyName + "]", RiceKeyConstants.ERROR_BETWEEN_SYNTAX, propertyName);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:LookupDaoOjb.java

示例2: getTimeBlocksForLookup

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
@Override
public List<TimeBlockBo> getTimeBlocksForLookup(String documentId,
		String principalId, String userPrincipalId, LocalDate fromDate,
		LocalDate toDate) {
       Criteria criteria = new Criteria();
       if(StringUtils.isNotBlank(documentId)) {
       	criteria.addEqualTo("documentId", documentId);
       }
       if(fromDate != null) {
       	criteria.addGreaterOrEqualThan("beginTimestamp", fromDate.toDate());
       }
       if(toDate != null) {
       	criteria.addLessOrEqualThan("endTimestamp",toDate.toDate());
       }
       if(StringUtils.isNotBlank(principalId)) {
       	criteria.addEqualTo("principalId", principalId);
       }
       if(StringUtils.isNotBlank(userPrincipalId)) {
       	criteria.addEqualTo("userPrincipalId", userPrincipalId);
       }
       Query query = QueryFactory.newQuery(TimeBlockBo.class, criteria);
       List<TimeBlockBo> timeBlocks = (List<TimeBlockBo>) this.getPersistenceBrokerTemplate().getCollectionByQuery(query);
       return timeBlocks == null || timeBlocks.size() == 0 ? new LinkedList<TimeBlockBo>() : timeBlocks;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:25,代码来源:TimeBlockDaoOjbImpl.java

示例3: getDocumentHeadersForYear

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
public List<TimesheetDocumentHeader> getDocumentHeadersForYear(String principalId, String year) {
 	 Criteria crit = new Criteria();
   List<TimesheetDocumentHeader> lstDocumentHeaders = new ArrayList<TimesheetDocumentHeader>();
   
 	 crit.addEqualTo("principalId", principalId);
 	 DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy");
 	 LocalDate currentYear = formatter.parseLocalDate(year);
 	 LocalDate nextYear = currentYear.plusYears(1);
 	 crit.addGreaterOrEqualThan("beginDate", currentYear.toDate());
 	 crit.addLessThan("beginDate", nextYear.toDate());
 	 
 	 QueryByCriteria query = new QueryByCriteria(TimesheetDocumentHeader.class, crit);
 	 Collection c = this.getPersistenceBrokerTemplate().getCollectionByQuery(query);
 	 if (c != null) {
 		 lstDocumentHeaders.addAll(c);
 	 }
 	 
 	 return lstDocumentHeaders;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:20,代码来源:TimesheetDocumentHeaderDaoOjbImpl.java

示例4: getFirstFiscalYearDate

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * Returns the first university date for a given fiscal year
 * 
 * @param fiscalYear the fiscal year to find the first date for
 * @return a UniversityDate record for the first day of the given fiscal year, or null if nothing can be found
 * @see org.kuali.ole.sys.dataaccess.UniversityDateDao#getFirstFiscalYearDate(java.lang.Integer)
 */
@Override
public UniversityDate getFirstFiscalYearDate(Integer fiscalYear) {
    ReportQueryByCriteria subQuery;
    Criteria subCrit = new Criteria();
    Criteria crit = new Criteria();

    subCrit.addEqualTo(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, fiscalYear);
    subQuery = QueryFactory.newReportQuery(UniversityDate.class, subCrit);
    subQuery.setAttributes(new String[] { "min(univ_dt)" });

    crit.addGreaterOrEqualThan(OLEPropertyConstants.UNIVERSITY_DATE, subQuery);

    QueryByCriteria qbc = QueryFactory.newQuery(UniversityDate.class, crit);

    return (UniversityDate) getPersistenceBrokerTemplate().getObjectByQuery(qbc);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:24,代码来源:UniversityDateDaoOjb.java

示例5: getLeavePayouts

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
@Override
public List<LeavePayout> getLeavePayouts(String viewPrincipal,
		LocalDate beginPeriodDate, LocalDate endPeriodDate) {
	// TODO Auto-generated method stub
	List<LeavePayout> leavePayouts = new ArrayList<LeavePayout>();
	Criteria crit = new Criteria();
	crit.addEqualTo("principalId",viewPrincipal);
	
	Criteria effDate = new Criteria();
	effDate.addGreaterOrEqualThan("effectiveDate", beginPeriodDate.toDate());
	effDate.addLessOrEqualThan("effectiveDate", endPeriodDate.toDate());
	
	crit.addAndCriteria(effDate);
	
	Query query = QueryFactory.newQuery(LeavePayout.class,crit);
	
	Collection c = this.getPersistenceBrokerTemplate().getCollectionByQuery(query);
	
	if(c != null)
		leavePayouts.addAll(c);
	
	return leavePayouts;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:24,代码来源:LeavePayoutDaoOjbImpl.java

示例6: addNumericCriteria

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
public static void addNumericCriteria(Criteria criteria, String propertyName, String propertyValue) {
    if (StringUtils.contains(propertyValue, SearchOperator.BETWEEN.op())) {
        String[] rangeValues = StringUtils.split(propertyValue, SearchOperator.BETWEEN.op());
        criteria.addBetween(propertyName, TKUtils.cleanNumeric(rangeValues[0]), TKUtils.cleanNumeric( rangeValues[1] ));
    } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN_EQUAL.op())) {
        criteria.addGreaterOrEqualThan(propertyName, TKUtils.cleanNumeric(propertyValue));
    } else if (propertyValue.startsWith(SearchOperator.LESS_THAN_EQUAL.op())) {
        criteria.addLessOrEqualThan(propertyName, TKUtils.cleanNumeric(propertyValue));
    } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN.op())) {
        criteria.addGreaterThan(propertyName, TKUtils.cleanNumeric( propertyValue ) );
    } else if (propertyValue.startsWith(SearchOperator.LESS_THAN.op())) {
        criteria.addLessThan(propertyName, TKUtils.cleanNumeric(propertyValue));
    } else {
        criteria.addEqualTo(propertyName, TKUtils.cleanNumeric(propertyValue));
    }
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:17,代码来源:OjbSubQueryUtil.java

示例7: testSubQuery1

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * test Subquery get all articles with price > avg(price) PROBLEM:
 * avg(price) is NOT extent aware !!
 * <p/>
 * test may fail if db does not support sub queries
 */
public void testSubQuery1()
{

    ReportQueryByCriteria subQuery;
    Criteria subCrit = new Criteria();
    Criteria crit = new Criteria();

    subCrit.addLike("articleName", "A%");
    subQuery = QueryFactory.newReportQuery(Article.class, subCrit);
    subQuery.setAttributes(new String[]{"avg(price)"});

    crit.addGreaterOrEqualThan("price", subQuery);
    Query q = QueryFactory.newQuery(Article.class, crit);

    Collection results = broker.getCollectionByQuery(q);
    assertNotNull(results);
    assertTrue(results.size() > 0);

}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:26,代码来源:QueryTest.java

示例8: getAccrualGeneratedLeaveBlocks

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
@Override
public List<LeaveBlockBo> getAccrualGeneratedLeaveBlocks(String principalId, LocalDate beginDate, LocalDate endDate) {
	List<LeaveBlockBo> leaveBlocks = new ArrayList<LeaveBlockBo>();
    Criteria root = new Criteria();
      
    root.addEqualTo("principalId", principalId);
    root.addGreaterOrEqualThan("leaveDate", beginDate.toDate());
    root.addLessOrEqualThan("leaveDate", endDate.toDate());
    root.addEqualTo("accrualGenerated", "Y");

    Query query = QueryFactory.newQuery(LeaveBlockBo.class, root);
    Collection c = this.getPersistenceBrokerTemplate().getCollectionByQuery(query);
    if (c != null) {
    	leaveBlocks.addAll(c);
    }
    return leaveBlocks;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:18,代码来源:LeaveBlockDaoOjbImpl.java

示例9: findInvoiceAmountByBillingChartAndOrg

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * @see org.kuali.kfs.module.ar.dataaccess.CustomerAgingReportDao#findInvoiceAmountByBillingChartAndOrg(java.lang.String,
 *      java.lang.String, java.sql.Date, java.sql.Date)
 */
@Override
public HashMap<String, KualiDecimal> findInvoiceAmountByBillingChartAndOrg(String chart, String org, java.sql.Date begin, java.sql.Date end) {
    HashMap<String, KualiDecimal> map = new HashMap<String, KualiDecimal>();
    Criteria criteria = new Criteria();
    if (ObjectUtils.isNotNull(begin)) {
        criteria.addGreaterOrEqualThan(ArPropertyConstants.CustomerInvoiceDetailFields.BILLING_DATE, begin);
    }
    if (ObjectUtils.isNotNull(end)) {
        criteria.addLessOrEqualThan(ArPropertyConstants.CustomerInvoiceDetailFields.BILLING_DATE, end);
    }
    criteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.DOCUMENT_STATUS_CODE, KFSConstants.DocumentStatusCodes.APPROVED);
    criteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.BILL_BY_CHART_OF_ACCOUNT_CODE, chart);
    criteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.BILLED_BY_ORGANIZATION_CODE, org);
    criteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.OPEN_INVOICE_IND, true);
    ReportQueryByCriteria reportByCriteria = new ReportQueryByCriteria(CustomerInvoiceDetail.class, new String[] { ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NUMBER, ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NAME, "sum(" + ArPropertyConstants.CustomerInvoiceDetailFields.AMOUNT + ")" }, criteria);
    reportByCriteria.addGroupBy(ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NUMBER);
    reportByCriteria.addGroupBy(ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NAME);
    Iterator<?> iterator = getPersistenceBrokerTemplate().getReportQueryIteratorByQuery(reportByCriteria);

    while (ObjectUtils.isNotNull(iterator) && iterator.hasNext()) {
        Object[] data = (Object[]) iterator.next();
        map.put((String) data[0] + "-" + data[1], (KualiDecimal) data[2]);
    }
    return map;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:30,代码来源:CustomerAgingReportDaoOjb.java

示例10: addSingleValuePredicate

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/** adds a single valued predicate to a Criteria. */
private void addSingleValuePredicate(SingleValuedPredicate p, Criteria parent) {
    final Object value = getVal(p.getValue());
    final String pp = p.getPropertyPath();
    if (p instanceof EqualPredicate) {
        parent.addEqualTo(pp, value);
    } else if (p instanceof EqualIgnoreCasePredicate) {
        parent.addEqualTo(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof GreaterThanOrEqualPredicate) {
        parent.addGreaterOrEqualThan(pp, value);
    } else if (p instanceof GreaterThanPredicate) {
        parent.addGreaterThan(pp, value);
    } else if (p instanceof LessThanOrEqualPredicate) {
        parent.addLessOrEqualThan(pp, value);
    } else if (p instanceof LessThanPredicate) {
        parent.addLessThan(pp, value);
    } else if (p instanceof LikePredicate) {
        //no need to convert * or ? since ojb handles the conversion/escaping
        parent.addLike(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof NotEqualPredicate) {
        parent.addNotEqualTo(pp, value);
    } else if (p instanceof NotEqualIgnoreCasePredicate) {
        parent.addNotEqualTo(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof NotLikePredicate) {
        parent.addNotLike(pp, value);
    } else {
        throw new UnsupportedPredicateException(p);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:30,代码来源:CriteriaLookupDaoOjb.java

示例11: addDateRangeCriteria

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
* Adds to the criteria object based on query characters given
*/
  private void addDateRangeCriteria(String propertyName, String propertyValue, boolean treatWildcardsAndOperatorsAsLiteral, Criteria criteria) {

      try {
          if (StringUtils.contains(propertyValue, SearchOperator.BETWEEN.op())) {
              if (treatWildcardsAndOperatorsAsLiteral)
                  throw new RuntimeException("Wildcards and operators are not allowed on this date field: " + propertyName);
              String[] rangeValues = StringUtils.split(propertyValue, SearchOperator.BETWEEN.op());
              if (rangeValues.length < 2)
                  throw new IllegalArgumentException("Improper syntax of BETWEEN operator in " + propertyName);

              criteria.addBetween(propertyName, parseDate( ObjectUtils.clean(rangeValues[0] ) ), parseDate( ObjectUtils.clean(rangeValues[1] ) ) );
          } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN_EQUAL.op())) {
              if (treatWildcardsAndOperatorsAsLiteral)
                  throw new RuntimeException("Wildcards and operators are not allowed on this date field: " + propertyName);
              criteria.addGreaterOrEqualThan(propertyName, parseDate( ObjectUtils.clean(propertyValue) ) );
          } else if (propertyValue.startsWith(SearchOperator.LESS_THAN_EQUAL.op())) {
              if (treatWildcardsAndOperatorsAsLiteral)
                  throw new RuntimeException("Wildcards and operators are not allowed on this date field: " + propertyName);
              criteria.addLessOrEqualThan(propertyName, parseDate( ObjectUtils.clean(propertyValue) ) );
          } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN.op())) {
              if (treatWildcardsAndOperatorsAsLiteral)
                  throw new RuntimeException("Wildcards and operators are not allowed on this date field: " + propertyName);
              criteria.addGreaterThan(propertyName, parseDate( ObjectUtils.clean(propertyValue) ) );
          } else if (propertyValue.startsWith(SearchOperator.LESS_THAN.op())) {
              if (treatWildcardsAndOperatorsAsLiteral)
                  throw new RuntimeException("Wildcards and operators are not allowed on this date field: " + propertyName);
              criteria.addLessThan(propertyName, parseDate( ObjectUtils.clean(propertyValue) ) );
          } else {
              criteria.addEqualTo(propertyName, parseDate( ObjectUtils.clean(propertyValue) ) );
          }
      } catch (IllegalArgumentException ex) {
          GlobalVariables.getMessageMap().putError("lookupCriteria[" + propertyName + "]", RiceKeyConstants.ERROR_BETWEEN_SYNTAX, propertyName);
      }
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:38,代码来源:LookupDaoOjb.java

示例12: addNumericRangeCriteria

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * Adds to the criteria object based on query characters given
 */
private void addNumericRangeCriteria(String propertyName, String propertyValue, boolean treatWildcardsAndOperatorsAsLiteral, Criteria criteria) {

    try {
        if (StringUtils.contains(propertyValue, SearchOperator.BETWEEN.op())) {
            if (treatWildcardsAndOperatorsAsLiteral)
                throw new RuntimeException("Cannot use wildcards and operators on numeric field " + propertyName);
            String[] rangeValues = StringUtils.split(propertyValue, SearchOperator.BETWEEN.op());
            if (rangeValues.length < 2)
                throw new IllegalArgumentException("Improper syntax of BETWEEN operator in " + propertyName);

            criteria.addBetween(propertyName, cleanNumeric( rangeValues[0] ), cleanNumeric( rangeValues[1] ));
        } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN_EQUAL.op())) {
            if (treatWildcardsAndOperatorsAsLiteral)
                throw new RuntimeException("Cannot use wildcards and operators on numeric field " + propertyName);
            criteria.addGreaterOrEqualThan(propertyName, cleanNumeric(propertyValue));
        } else if (propertyValue.startsWith(SearchOperator.LESS_THAN_EQUAL.op())) {
            if (treatWildcardsAndOperatorsAsLiteral)
                throw new RuntimeException("Cannot use wildcards and operators on numeric field " + propertyName);
            criteria.addLessOrEqualThan(propertyName, cleanNumeric(propertyValue));
        } else if (propertyValue.startsWith(SearchOperator.GREATER_THAN.op())) {
            if (treatWildcardsAndOperatorsAsLiteral)
                throw new RuntimeException("Cannot use wildcards and operators on numeric field " + propertyName);
            criteria.addGreaterThan(propertyName, cleanNumeric( propertyValue ) );
        } else if (propertyValue.startsWith(SearchOperator.LESS_THAN.op())) {
            if (treatWildcardsAndOperatorsAsLiteral)
                throw new RuntimeException("Cannot use wildcards and operators on numeric field " + propertyName);
            criteria.addLessThan(propertyName, cleanNumeric(propertyValue));
        } else {
            criteria.addEqualTo(propertyName, cleanNumeric(propertyValue));
        }
    } catch (IllegalArgumentException ex) {
        GlobalVariables.getMessageMap().putError("lookupCriteria[" + propertyName + "]", RiceKeyConstants.ERROR_BETWEEN_SYNTAX, propertyName);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:38,代码来源:LookupDaoOjb.java

示例13: findDiscountAmountByBillingChartAndOrg

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * @see org.kuali.kfs.module.ar.dataaccess.CustomerAgingReportDao#findDiscountAmountByBillingChartAndOrg(java.lang.String,
 *      java.lang.String, java.sql.Date, java.sql.Date)
 */
@Override
public HashMap<String, KualiDecimal> findDiscountAmountByBillingChartAndOrg(String chart, String org, java.sql.Date begin, java.sql.Date end) {

    HashMap<String, KualiDecimal> map = new HashMap<String, KualiDecimal>();
    Criteria subCriteria = new Criteria();
    if (ObjectUtils.isNotNull(begin)) {
        subCriteria.addGreaterOrEqualThan(ArPropertyConstants.CustomerInvoiceDetailFields.BILLING_DATE, begin);
    }
    if (ObjectUtils.isNotNull(end)) {
        subCriteria.addLessOrEqualThan(ArPropertyConstants.CustomerInvoiceDetailFields.BILLING_DATE, end);
    }
    subCriteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.DOCUMENT_STATUS_CODE, KFSConstants.DocumentStatusCodes.APPROVED);
    subCriteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.BILL_BY_CHART_OF_ACCOUNT_CODE, chart);
    subCriteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.BILLED_BY_ORGANIZATION_CODE, org);
    subCriteria.addEqualTo(ArPropertyConstants.CustomerInvoiceDetailFields.OPEN_INVOICE_IND, true);
    subCriteria.addEqualToField(KFSPropertyConstants.DOCUMENT_NUMBER, Criteria.PARENT_QUERY_PREFIX + KFSPropertyConstants.DOCUMENT_NUMBER);

    ReportQueryByCriteria subReportQuery = new ReportQueryByCriteria(CustomerInvoiceDetail.class, new String[] { ArPropertyConstants.CustomerInvoiceDetailFields.INVOICE_ITEM_DISCOUNT_LINE_NUMBER }, subCriteria);

    Criteria criteria = new Criteria();
    criteria.addIn(KFSPropertyConstants.SEQUENCE_NUMBER, subReportQuery);
    ReportQueryByCriteria reportByCriteria = new ReportQueryByCriteria(CustomerInvoiceDetail.class, new String[] { ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NUMBER, ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NAME, "sum(" + ArPropertyConstants.CustomerInvoiceDetailFields.AMOUNT + ")" }, criteria);
    reportByCriteria.addGroupBy(ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NUMBER);
    reportByCriteria.addGroupBy(ArPropertyConstants.CustomerInvoiceDetailFields.ACCOUNTS_RECEIVABLE_CUSTOMER_NAME);
    Iterator<?> iterator = getPersistenceBrokerTemplate().getReportQueryIteratorByQuery(reportByCriteria);

    while (ObjectUtils.isNotNull(iterator) && iterator.hasNext()) {
        Object[] data = (Object[]) iterator.next();
        map.put((String) data[0] + "-" + data[1], (KualiDecimal) data[2]);
    }
    return map;

}
 
开发者ID:kuali,项目名称:kfs,代码行数:38,代码来源:CustomerAgingReportDaoOjb.java

示例14: findSumRowCountGreaterOrEqualThan

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * @see org.kuali.ole.gl.dataaccess.LedgerEntryHistoryBalancingDao#findSumRowCountGreaterOrEqualThan(java.lang.Integer)
 */
public Integer findSumRowCountGreaterOrEqualThan(Integer year) {
    Criteria criteria = new Criteria();
    criteria.addGreaterOrEqualThan(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, year);
    
    ReportQueryByCriteria reportQuery = QueryFactory.newReportQuery(EntryHistory.class, criteria);
    reportQuery.setAttributes(new String[] { "sum(" + OLEPropertyConstants.ROW_COUNT  + ")"});
    
    Iterator<Object[]> iterator = getPersistenceBrokerTemplate().getReportQueryIteratorByQuery(reportQuery);
    Object[] returnResult = TransactionalServiceUtils.retrieveFirstAndExhaustIterator(iterator);
    
    return ObjectUtils.isNull(returnResult[0]) ? 0 : ((BigDecimal) returnResult[0]).intValue();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:16,代码来源:EntryHistoryDaoOjb.java

示例15: findCountGreaterOrEqualThan

import org.apache.ojb.broker.query.Criteria; //导入方法依赖的package包/类
/**
 * @see org.kuali.ole.gl.dataaccess.LedgerEntryBalancingDao#findCountGreaterOrEqualThan(java.lang.Integer)
 */
public Integer findCountGreaterOrEqualThan(Integer year) {
    Criteria criteria = new Criteria();
    criteria.addGreaterOrEqualThan(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, year);
    
    ReportQueryByCriteria query = QueryFactory.newReportQuery(Entry.class, criteria);
    
    return getPersistenceBrokerTemplate().getCount(query);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:12,代码来源:EntryDaoOjb.java


注:本文中的org.apache.ojb.broker.query.Criteria.addGreaterOrEqualThan方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。