criteria.addOrder(Order.asc("dateAdded"));
// set the result transformer - transforms tuples into
// DomainGroupModelViews
ModelViewResultTransformer<DomainGroupModelView> resultTransformer;
resultTransformer = new ModelViewResultTransformer<DomainGroupModelView>(new DomainGroupModelViewFactory());
criteria.setResultTransformer(resultTransformer);
//The First result sets the start row offset for the dataset
//The Max result denotes the no. of rows fetched from the dataset
criteria.setFirstResult(inRequest.getPageStart());