Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.websphere.query.base
Class OrderByExpressionjava.lang.Objectcom.ibm.websphere.query.base.OrderByExpression
- All Implemented Interfaces:
- IOrderByExpression, IStringBuilder, java.io.Serializable
public class OrderByExpression- extends java.lang.Object
- implements IOrderByExpression
The OrderByExpression class represents an order by expression in an order by clause in the query framework.
This class contains an order by element and an operator to describe a typical order by expression in an order by clause. For example, "order by age in ascending order" will be decomposed as order by element = Attribute("age"), operator = Operator("ASC")
- See Also:
- Serialized Form
Constructor Summary OrderByExpression()
Creates a new OrderByExpression instance, default constructor.OrderByExpression(IOperator newOperator, IOrderByElement newOrderByElement)
Creates a new OrderByExpression instance with the given operator and order by element.
Method Summary java.lang.String buildString(ISelectQueryCallback builder)
Builds a query string for the condition.void buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb)
boolean equals(java.lang.Object o)
Tests for equality with the given object.IOperator getOperator()
Return the operator.IOrderByElement getOrderByElement()
Return the order by element.int hashCode()
Computes a hash code for the order by expression.void setOperator(IOperator newOperator)
Sets the operator of the order by expression.void setOrderByElement(IOrderByElement newOrderByElement)
Sets the order by element of the order by expression.
Methods inherited from class java.lang.Object clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Constructor Detail OrderByExpression
public OrderByExpression()
- Creates a new OrderByExpression instance, default constructor.
OrderByExpression
public OrderByExpression(IOperator newOperator, IOrderByElement newOrderByElement)
- Creates a new OrderByExpression instance with the given operator and order by element.
Method Detail buildString
public java.lang.String buildString(ISelectQueryCallback builder) throws QueryException
- Builds a query string for the condition.
- Specified by:
- buildString in interface IStringBuilder
- Throws:
- QueryException
buildString
public void buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb) throws QueryException
- Specified by:
- buildString in interface IStringBuilder
- Throws:
- QueryException
equals
public boolean equals(java.lang.Object o)
- Tests for equality with the given object.
- Overrides:
- equals in class java.lang.Object
getOperator
public IOperator getOperator()
- Returns the operator.
- Specified by:
- getOperator in interface IOrderByExpression
getOrderByElement
public IOrderByElement getOrderByElement()
- Returns the order by element.
- Specified by:
- getOrderByElement in interface IOrderByExpression
hashCode
public int hashCode()
- Computes a hash code for the order by expression.
- Overrides:
- hashCode in class java.lang.Object
setOperator
public void setOperator(IOperator newOperator)
- Sets the operator of the order by expression.
setOrderByElement
public void setOrderByElement(IOrderByElement newOrderByElement)
- Sets the order by element of the order by expression.
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD