Class CreationOrder

  • All Implemented Interfaces:
    IOrder, Comparator<de.uplanet.lucy.server.newsagent.IMessage>

    @Scriptable
    public final class CreationOrder
    extends Object
    implements IOrder
    Order messages by their creation timestamp.
    • Constructor Detail

      • CreationOrder

        public CreationOrder()
        Construct a CreationOrder. for ascending order.
    • Method Detail

      • setAscending

        public void setAscending​(boolean p_bAscending)
        Description copied from interface: IOrder
        Set ascending (default) or descending sort order.
        Specified by:
        setAscending in interface IOrder
        Parameters:
        p_bAscending - true if sorting order is ascending, or false otherwise.
      • 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:
        compare in interface Comparator<de.uplanet.lucy.server.newsagent.IMessage>
        See Also:
        Comparator.compare(Object, Object)
      • sqlOrderExpression

        public String sqlOrderExpression()
        The creation order SQL-expression.
        Specified by:
        sqlOrderExpression in interface IOrder
        Returns:
        The creation order SQL-expression.