org.objectweb.medor.query.api
Interface OrderField

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
BasicOrderField

public interface OrderField
extends java.lang.Cloneable

Represents an element of an "order by" clause, qualified by a field and a boolean indicating whether the order is descendant (false, default) or ascendant.

Author:
Alexandre Lefebvre

Method Summary
 boolean getDesc()
          Returns whether the order is descendant (true) or ascendant (false).
 QueryTreeField getField()
          Obtains the field by which to order.
 void setDesc(boolean desc)
          Sets the descendant order.
 void setField(QueryTreeField field)
          Sets the field of the clause part.
 

Method Detail

setField

public void setField(QueryTreeField field)
Sets the field of the clause part.

Parameters:
field - the field by which to order.

getField

public QueryTreeField getField()
Obtains the field by which to order.

Returns:
the field by which to order.

setDesc

public void setDesc(boolean desc)
Sets the descendant order.

The default value is false.

Parameters:
desc - indicates whether the order is descendant (true) or ascendant (false).

getDesc

public boolean getDesc()
Returns whether the order is descendant (true) or ascendant (false).

Returns:
true if the order is descendant, false if the order is ascendant.