Package de.uplanet.lucy.server.newsagent
Class CreationOrder
java.lang.Object
de.uplanet.lucy.server.newsagent.CreationOrder
- All Implemented Interfaces:
 IOrder,Comparator<de.uplanet.lucy.server.newsagent.IMessage>
Order messages by their creation timestamp.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintcompare(de.uplanet.lucy.server.newsagent.IMessage p_msg1, de.uplanet.lucy.server.newsagent.IMessage p_msg2) Compare two messages using their creation timestamp.voidsetAscending(boolean p_bAscending) Set ascending (default) or descending sort order.The creation order SQL-expression.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong 
- 
Constructor Details
- 
CreationOrder
public CreationOrder()Construct aCreationOrder.for ascending order. 
 - 
 - 
Method Details
- 
setAscending
public void setAscending(boolean p_bAscending) Description copied from interface:IOrderSet ascending (default) or descending sort order.- Specified by:
 setAscendingin interfaceIOrder- Parameters:
 p_bAscending-trueif sorting order is ascending, orfalseotherwise.
 - 
compare
public int compare(de.uplanet.lucy.server.newsagent.IMessage p_msg1, de.uplanet.lucy.server.newsagent.IMessage p_msg2) Compare two messages using their creation timestamp.- Specified by:
 comparein interfaceComparator<de.uplanet.lucy.server.newsagent.IMessage>- See Also:
 
 - 
sqlOrderExpression
The creation order SQL-expression.- Specified by:
 sqlOrderExpressionin interfaceIOrder- Returns:
 - The creation order SQL-expression.
 
 
 -