de.uplanet.lucy.server.newsagent
Class CreationOrder

java.lang.Object
  extended by de.uplanet.lucy.server.newsagent.CreationOrder
All Implemented Interfaces:
IOrder, java.util.Comparator<de.uplanet.lucy.server.newsagent.IMessage>

@Scriptable
public final class CreationOrder
extends java.lang.Object
implements IOrder

Order messages by their creation timestamp.

Version:
$Revision: 72022 $

Constructor Summary
CreationOrder()
          Construct a CreationOrder.
 
Method Summary
 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.
 void setAscending(boolean p_bAscending)
          Set ascending (default) or descending sort order.
 java.lang.String sqlOrderExpression()
          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
 

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 java.util.Comparator<de.uplanet.lucy.server.newsagent.IMessage>
See Also:
Comparator.compare(Object, Object)

sqlOrderExpression

public java.lang.String sqlOrderExpression()
The creation order SQL-expression.

Specified by:
sqlOrderExpression in interface IOrder
Returns:
The creation order SQL-expression.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.