Package de.uplanet.lucy.server.newsagent
Class ApplicationOrder
java.lang.Object
de.uplanet.lucy.server.newsagent.ApplicationOrder
- All Implemented Interfaces:
IOrder
,Comparator<de.uplanet.lucy.server.newsagent.IMessage>
Order messages by application GUID and creation time.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(de.uplanet.lucy.server.newsagent.IMessage p_msg1, de.uplanet.lucy.server.newsagent.IMessage p_msg2) Compare two messages using their application GUID and their creation time.void
setAscending
(boolean p_bAscending) Set ascending (default) or descending sort order.void
setCreationTimeAscending
(boolean p_bAscending) Set ascending or descending (default) sort order for the creation time.The creation order SQL-expression.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ApplicationOrder
public ApplicationOrder()Construct aApplicationOrder.
for ascending order.
-
-
Method Details
-
setAscending
public void setAscending(boolean p_bAscending) Description copied from interface:IOrder
Set ascending (default) or descending sort order.- Specified by:
setAscending
in interfaceIOrder
- Parameters:
p_bAscending
-true
if sorting order is ascending, orfalse
otherwise.
-
setCreationTimeAscending
public void setCreationTimeAscending(boolean p_bAscending) Set ascending or descending (default) sort order for the creation time. -
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 application GUID and their creation time.- Specified by:
compare
in interfaceComparator<de.uplanet.lucy.server.newsagent.IMessage>
- See Also:
-
sqlOrderExpression
The creation order SQL-expression.- Specified by:
sqlOrderExpression
in interfaceIOrder
- Returns:
- The creation order SQL-expression.
-