コード例 #1
0
  /**
   * Generate Query object for GeneralLedgerEntry search.
   *
   * @param fieldValues
   * @return
   */
  protected ReportQueryByCriteria getGeneralLedgerReportQuery(Map fieldValues) {
    Collection docTypeCodes = getDocumentType(fieldValues);
    Collection activityStatusCodes = getActivityStatusCode(fieldValues);

    Criteria criteria = OJBUtility.buildCriteriaFromMap(fieldValues, new GeneralLedgerEntry());

    // set document type code criteria
    if (!docTypeCodes.isEmpty()) {
      criteria.addIn(
          CabPropertyConstants.GeneralLedgerEntry.FINANCIAL_DOCUMENT_TYPE_CODE, docTypeCodes);
    }
    // set activity status code criteria
    if (!activityStatusCodes.isEmpty()) {
      criteria.addIn(
          CabPropertyConstants.GeneralLedgerEntry.ACTIVITY_STATUS_CODE, activityStatusCodes);
    }
    ReportQueryByCriteria query = QueryFactory.newReportQuery(GeneralLedgerEntry.class, criteria);

    List attributeList = buildAttributeList(false);

    // set the selection attributes
    String[] attributes = (String[]) attributeList.toArray(new String[attributeList.size()]);
    query.setAttributes(attributes);
    return query;
  }
コード例 #2
0
 /**
  * @see
  *     org.kuali.kfs.module.cab.dataaccess.PurchasingAccountsPayableReportDao#findPurchasingAccountsPayableDocuments(java.util.Map)
  */
 @Override
 public Collection findPurchasingAccountsPayableDocuments(Map fieldValues) {
   Criteria criteria =
       OJBUtility.buildCriteriaFromMap(fieldValues, new PurchasingAccountsPayableDocument());
   QueryByCriteria query =
       QueryFactory.newQuery(PurchasingAccountsPayableDocument.class, criteria);
   return getPersistenceBrokerTemplate().getCollectionByQuery(query);
 }