05-31-2012 06:22 PM
taskService.createTaskQuery().taskUnnassigned().orderByTaskPriority().desc().orderByDueDate().asc().listPage(0, num);
06-01-2012 12:53 AM
if(databaseType.equals("mssql") || databaseType.equals("db2")) {
// use mybatis paging (native database paging not yet implemented)
loadedObjects = sqlSession.selectList(statement, parameter, new RowBounds(parameter.getFirstResult(), parameter.getMaxResults()));
} else {
// use native database paging
loadedObjects = sqlSession.selectList(statement, parameter);
}
06-01-2012 05:03 AM
Different drivers are able to achieve different levels of efficiency in this regard. For the best performance, use result set types of SCROLL_SENSITIVE or SCROLL_INSENSITIVE (in other words: not FORWARD_ONLY).
@SuppressWarnings("unchecked")
protected List filterLoadedObjects(List<Object> loadedObjects) {
if (loadedObjects.isEmpty()) {
return loadedObjects;
}
if (! (PersistentObject.class.isAssignableFrom(loadedObjects.get(0).getClass()))) {
return loadedObjects;
}
List<PersistentObject> filteredObjects = new ArrayList<PersistentObject>(loadedObjects.size());
for (Object loadedObject: loadedObjects) {
PersistentObject cachedPersistentObject = cacheFilter((PersistentObject) loadedObject);
filteredObjects.add(cachedPersistentObject);
}
return filteredObjects;
}
06-01-2012 02:43 PM
06-05-2012 02:20 AM
06-06-2012 10:33 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.