use of org.apache.ojb.broker.query.QueryByCriteria in project cu-kfs by CU-CommunityApps.
the class CuCreditMemoDaoOjb method getCreditMemosToExtract.
@Override
public List<VendorCreditMemoDocument> getCreditMemosToExtract(String chartCode) {
LOG.debug("getCreditMemosToExtract() started");
Criteria criteria = new Criteria();
criteria.addEqualTo("processingCampusCode", chartCode);
criteria.addIsNull("extractedTimestamp");
criteria.addEqualTo("holdIndicator", Boolean.FALSE);
criteria.addEqualTo("paymentMethodCode", "P");
return (List<VendorCreditMemoDocument>) getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(CuVendorCreditMemoDocument.class, criteria));
}
use of org.apache.ojb.broker.query.QueryByCriteria in project cu-kfs by CU-CommunityApps.
the class CuPaymentRequestDaoOjb method getPaymentRequestsToExtractForVendor.
public Collection<PaymentRequestDocument> getPaymentRequestsToExtractForVendor(String campusCode, VendorGroupingHelper vendor, Date onOrBeforePaymentRequestPayDate) {
LOG.debug("getPaymentRequestsToExtract() started");
Criteria criteria = new Criteria();
criteria.addEqualTo("processingCampusCode", campusCode);
// criteria.addIn(PurapPropertyConstants.STATUS_CODE, statuses);
criteria.addIsNull("extractedTimestamp");
criteria.addEqualTo("holdIndicator", Boolean.FALSE);
criteria.addEqualTo("paymentMethodCode", "P");
Criteria c1 = new Criteria();
c1.addLessOrEqualThan("paymentRequestPayDate", onOrBeforePaymentRequestPayDate);
Criteria c2 = new Criteria();
c2.addEqualTo("immediatePaymentIndicator", Boolean.TRUE);
c1.addOrCriteria(c2);
criteria.addAndCriteria(c1);
criteria.addEqualTo("vendorHeaderGeneratedIdentifier", vendor.getVendorHeaderGeneratedIdentifier());
criteria.addEqualTo("vendorDetailAssignedIdentifier", vendor.getVendorDetailAssignedIdentifier());
criteria.addEqualTo("vendorCountryCode", vendor.getVendorCountry());
criteria.addLike("vendorPostalCode", vendor.getVendorPostalCode() + "%");
return (List<PaymentRequestDocument>) getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(CuPaymentRequestDocument.class, criteria));
}
use of org.apache.ojb.broker.query.QueryByCriteria in project cu-kfs by CU-CommunityApps.
the class CuPurchaseOrderDaoOjb method getAllOpenPurchaseOrders.
public List<AutoClosePurchaseOrderView> getAllOpenPurchaseOrders(List<String> excludedVendorChoiceCodes) {
LOG.info("getAllOpenPurchaseOrders() started");
Criteria criteria = new Criteria();
criteria.addIsNull(PurapPropertyConstants.RECURRING_PAYMENT_TYPE_CODE);
criteria.addEqualTo(PurapPropertyConstants.TOTAL_ENCUMBRANCE, new KualiDecimal(0));
criteria.addEqualTo(PurapPropertyConstants.PURCHASE_ORDER_CURRENT_INDICATOR, true);
criteria.addEqualTo(KewApiConstants.APP_DOC_STATUS_DETAIL, PurapConstants.PurchaseOrderStatuses.APPDOC_OPEN);
for (String excludeCode : excludedVendorChoiceCodes) {
criteria.addNotEqualTo(PurapPropertyConstants.VENDOR_CHOICE_CODE, excludeCode);
}
QueryByCriteria qbc = new QueryByCriteria(CuAutoClosePurchaseOrderView.class, criteria);
LOG.info("getAllOpenPurchaseOrders() Query criteria is " + criteria.toString());
// KFSUPGRADE-363
limitResultSize(qbc);
List<AutoClosePurchaseOrderView> l = (List<AutoClosePurchaseOrderView>) getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
LOG.info("getAllOpenPurchaseOrders() ended.");
return l;
}
use of org.apache.ojb.broker.query.QueryByCriteria in project cu-kfs by CU-CommunityApps.
the class CheckReconciliationDaoOjb method getAllCheckReconciliationForSearchCriteria.
/**
* Get All Check Reconciliation For Search Criteria
*
* @see com.rsmart.kuali.kfs.cr.dataaccess.CheckReconciliationDao#getAllCheckReconciliationForSearchCriteria(java.util.Date, java.util.Date)
*/
public List getAllCheckReconciliationForSearchCriteria(Date startDate, Date endDate) {
LOG.info("getAllCheckReconciliationForSearchCriteria() starting");
Criteria criteria = new Criteria();
criteria.addEqualTo("status", CRConstants.ISSUED);
if (!(startDate == null)) {
criteria.addGreaterOrEqualThan("checkDate", startDate);
}
if (!(endDate == null)) {
GregorianCalendar gc = new GregorianCalendar();
gc.setTime(endDate);
// gc.add(Calendar.DATE, 1);
criteria.addLessOrEqualThan("checkDate", new Timestamp(gc.getTimeInMillis()));
}
QueryByCriteria qbc = new QueryByCriteria(CheckReconciliation.class, criteria);
qbc.addOrderBy("bankAccountNumber", true);
qbc.addOrderBy("checkDate", true);
LOG.info("getAllCheckReconciliationForSearchCriteria() Query = " + qbc.toString());
List list = (List) getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
return list;
}
use of org.apache.ojb.broker.query.QueryByCriteria in project cu-kfs by CU-CommunityApps.
the class CheckReconciliationDaoOjb method getAll.
/**
* Get All
*
* @see com.rsmart.kuali.kfs.cr.dataaccess.CheckReconciliationDao#getAll()
*/
public List getAll() {
LOG.info("getAll() started");
QueryByCriteria qbc = new QueryByCriteria(CheckReconciliationDaoOjb.class);
List list = (List) getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
return list;
}
Aggregations