Pages

08 September, 2012

Create Filter to reduce the list elements instead of iterating all (Oracle CC&B)

This is useful to filter the number of elements you are going to work with and not to iterate all of them also depends on the information you have in oder to filter, the more info you got more specific and short is the retrieved list. See the hibernate mapping for the corresponding entity before do the filter.

ServiceAgreementContractQuantities contractQuantities = sa.getContractQuantities();
ListFilter list = contractQuantities.createFilter("WHERE this.id.contractQuantityType= : contractType AND this.id.effectiveDate <= :today" );
list.bindDate("today", getSystemDateTime().getDate());
list.bindEntity("contractType", contractQntType);



No comments:

Post a Comment