@java.lang.SuppressWarnings({"rawtypes", "unchecked"}) public class ManualEntityOrdering extends java.lang.Object
Manual implementation of query ordering for datastores that don't support native ordering. Not all NoSQL datastores support the SQL equivalent of ORDER BY, hence manual in-memory ordering is the only way to simulate such queries.
Modifiers | Name | Description |
---|---|---|
private static java.util.Map<java.lang.String, java.lang.reflect.Method> |
cachedReadMethods |
|
PersistentEntity |
entity |
Constructor and description |
---|
ManualEntityOrdering
(PersistentEntity entity) |
Type Params | Return Type | Name and description |
---|---|---|
|
public java.util.List |
applyOrder(java.util.List results, java.util.List<Query.Order> orderDefinition) |
|
public java.util.List |
applyOrder(java.util.List results, Order order) |
|
public int |
compare(java.lang.Object o1, java.lang.Object o2) |
|
public PersistentEntity |
getEntity() |
|
private static java.util.List |
reverse(java.util.List list) Reverses the list. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Reverses the list. The result is a new List with the identical contents in reverse order.
list
- a List