CompositeComparator compositePropertyComparator = new CompositeComparator(
new PropertyComparator("lastName"), new PropertyComparator(
"firstName"));
NeighborComparator neighborComparator = new NeighborComparator(
"user", compositePropertyComparator);
OrderCriteria criteria = OrderCriteria.defineOrder(
neighborComparator, ascending);
orderByUser = (Interests) getEntities(criteria);
} catch (OrderException e) {
log.error("Error in Interests.getOrderByUser: " + e.getMessage());
}