@Override public List<T> getBeanCacheHits() { OrderBy<T> orderBy = query.getOrderBy(); if (orderBy != null) { beanDescriptor.sort(cacheBeans, orderBy.toStringFormat()); } return cacheBeans; }
/** * Merge in prior L2 bean cache hits with the query result. */ public void mergeCacheHits(BeanCollection<T> result) { if (cacheBeans != null && !cacheBeans.isEmpty()) { for (T hit : cacheBeans) { result.internalAdd(hit); } // resort in memory here after merging the cache hits with the DB hits if (result instanceof BeanList) { OrderBy<T> orderBy = query.getOrderBy(); if (orderBy != null) { beanDescriptor.sort(((BeanList<T>)result).getActualList(), orderBy.toStringFormat()); } } } }
sb.append(",orderBy:").append(orderBy.toStringFormat());
@Override public List<T> getBeanCacheHits() { OrderBy<T> orderBy = query.getOrderBy(); if (orderBy != null) { beanDescriptor.sort(cacheBeans, orderBy.toStringFormat()); } return cacheBeans; }
/** * Merge in prior L2 bean cache hits with the query result. */ public void mergeCacheHits(BeanCollection<T> result) { if (cacheBeans != null && !cacheBeans.isEmpty()) { for (T hit : cacheBeans) { result.internalAdd(hit); } // resort in memory here after merging the cache hits with the DB hits if (result instanceof BeanList) { OrderBy<T> orderBy = query.getOrderBy(); if (orderBy != null) { beanDescriptor.sort(((BeanList<T>)result).getActualList(), orderBy.toStringFormat()); } } } }
sb.append(",orderBy:").append(orderBy.toStringFormat());