criteriaCount
Returns
Arguments
Examples
// The following is handler code which has been wired with a virtual entity service
property name="authorService" inject="entityService:Author";
function showAuthors(event){
var rc = event.getCollection();
// Get the hibernate restrictions proxy object
var restrictions = authorService.getRestrictions();
// build criteria
var criteria = [];
// Apply a "greater than" constraint to the named property
ArrayAppend(criteria, restrictions.ge("firstName","M"));
// Get the criteria query first
prc.example1 = authorService.criteriaQuery(criteria=criteria, offset=(prc.boundaries.STARTROW-1), max=getSetting("PagingMaxRows"), sortOrder="firstName ASC");
// get the total records found via projections
prc.foundcount = authorService.criteriaCount(criteria=criteria);
}Last updated
Was this helpful?