use of org.apache.ojb.broker.query.Criteria in project cu-kfs by CU-CommunityApps.
the class EzraAwardProposalDaoOjb method getProposals.
public List<EzraProposalAward> getProposals() {
Criteria criteria = new Criteria();
criteria.addLike("awardProposalId", "A%");
criteria.addGreaterThan("budgetAmt", KualiDecimal.ZERO);
criteria.addEqualTo("status", "ASAP");
// KFSPTS-1920 Edits associated with Award Descriptions of MTA(M), NDA(N), RDA(R) should not be picked up for edits to KFS Awards.
criteria.addNotIn("awardDescriptionCode", getExcludedAwardDescriptions());
return (List<EzraProposalAward>) getPersistenceBrokerTemplate().getCollectionByQuery(QueryFactory.newQuery(EzraProposalAward.class, criteria));
}
use of org.apache.ojb.broker.query.Criteria in project cu-kfs by CU-CommunityApps.
the class SponsorDaoOjb method getSponsorsUpdatedSince.
public List<Sponsor> getSponsorsUpdatedSince(Date date) {
Criteria criteria = new Criteria();
if (date != null) {
criteria.addGreaterThan("lastUpdated", date);
}
Criteria criteria2 = new Criteria();
criteria.addNotNull("lastUpdated");
criteria.addAndCriteria(criteria2);
return (List<Sponsor>) getPersistenceBrokerTemplate().getCollectionByQuery(QueryFactory.newQuery(Sponsor.class, criteria));
}
use of org.apache.ojb.broker.query.Criteria 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.Criteria in project cu-kfs by CU-CommunityApps.
the class CheckReconciliationDaoOjb method getAllPaymentGroupForSearchCriteria.
/**
* @see com.rsmart.kuali.kfs.cr.dataaccess.CheckReconciliationDao#getAllPaymentGroupForSearchCriteria(java.lang.String, java.util.Collection)
*/
public List<PaymentGroup> getAllPaymentGroupForSearchCriteria(KualiInteger disbNbr, Collection<String> bankCodes) {
LOG.info("getAllPaymentGroupForSearchCriteria() starting");
Criteria criteria = new Criteria();
criteria.addEqualTo(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_DISBURSEMENT_NBR, disbNbr);
criteria.addEqualTo(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_DISBURSEMENT_TYPE_CODE, DisbursementTypeCodes.CHECK);
criteria.addIn(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_BANK_CODE, bankCodes);
QueryByCriteria qbc = new QueryByCriteria(PaymentGroup.class, criteria);
LOG.info("getAllPaymentGroupForSearchCriteria() Query = " + qbc.toString());
List list = (List) getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
return list;
}
use of org.apache.ojb.broker.query.Criteria in project cu-kfs by CU-CommunityApps.
the class CuDisbursementVoucherDaoOjb method getDocumentsByHeaderStatus.
/**
* @see org.kuali.kfs.fp.dataaccess.DisbursementVoucherDao#getDocumentsByHeaderStatus(java.lang.String, boolean)
*/
public Collection getDocumentsByHeaderStatus(String statusCode, boolean immediatesOnly) {
LOG.debug("getDocumentsByHeaderStatus() started");
Criteria criteria = new Criteria();
criteria.addEqualTo("documentHeader.financialDocumentStatusCode", statusCode);
criteria.addEqualTo("disbVchrPaymentMethodCode", KFSConstants.PaymentSourceConstants.PAYMENT_METHOD_CHECK);
if (immediatesOnly) {
criteria.addEqualTo("immediatePaymentIndicator", Boolean.TRUE);
}
return getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(getDisbursementVoucherDocumentClass(), criteria));
}
Aggregations