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>
@Scriptable public final class ApplicationOrder extends Object implements IOrder
Order messages by application GUID and creation time.
-
-
Constructor Summary
Constructors Constructor Description ApplicationOrder()Construct aApplicationOrder.for ascending order.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(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.voidsetAscending(boolean p_bAscending)Set ascending (default) or descending sort order.voidsetCreationTimeAscending(boolean p_bAscending)Set ascending or descending (default) sort order for the creation time.StringsqlOrderExpression()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
-
-
-
-
Method Detail
-
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.
-
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:
comparein interfaceComparator<de.uplanet.lucy.server.newsagent.IMessage>- See Also:
Comparator.compare(Object, Object)
-
sqlOrderExpression
public String sqlOrderExpression()
The creation order SQL-expression.- Specified by:
sqlOrderExpressionin interfaceIOrder- Returns:
- The creation order SQL-expression.
-
-