FileDocCategorySizeDatePackage
OrderByNode.javaAPI DocGlassfish v2 API3920Tue May 22 16:54:38 BST 2007oracle.toplink.essentials.internal.parsing

OrderByNode

public class OrderByNode extends MajorNode
INTERNAL

Purpose: Represent an ORDER BY

Responsibilities:

  • Generate the correct expression for an ORDER BY
author
Jon Driscoll
since
TopLink 5.0

Fields Summary
List
orderByItems
Constructors Summary
public OrderByNode()
Return a new OrderByNode.


             
      
        super();
    
Methods Summary
private voidaddOrderByItem(java.lang.Object theNode)
INTERNAL Add an Order By Item to this node

        getOrderByItems().add(theNode);
    
public voidaddOrderingToQuery(oracle.toplink.essentials.queryframework.ObjectLevelReadQuery theQuery, oracle.toplink.essentials.internal.parsing.GenerationContext context)
INTERNAL Add the ordering expressions to the passed query

        if (theQuery.isReadAllQuery()) {
            Iterator iter = getOrderByItems().iterator();
            while (iter.hasNext()) {
                Node nextNode = (Node)iter.next();
                ((ReadAllQuery)theQuery).addOrdering(nextNode.generateExpression(context));
            }
        }
    
public java.util.ListgetOrderByItems()
INTERNAL Return the order by statements

        if (orderByItems == null) {
            setOrderByItems(new Vector());
        }
        return orderByItems;
    
public voidsetOrderByItems(java.util.List newItems)
INTERNAL Set the order by statements

        orderByItems = newItems;
    
public voidvalidate(oracle.toplink.essentials.internal.parsing.ParseTreeContext context, oracle.toplink.essentials.internal.parsing.SelectNode selectNode)
INTERNAL Validate node.

        for (Iterator i = orderByItems.iterator(); i.hasNext(); ) {
            Node item = (Node)i.next();
            item.validate(context);
        }