/**
   * 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;
  }
 /**
  * @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);
 }