Class OrderingTranslator

  extended by org.apache.cayenne.access.trans.QueryAssemblerHelper
      extended by org.apache.cayenne.access.trans.OrderingTranslator

public class OrderingTranslator
extends QueryAssemblerHelper

Translates query ordering to SQL.

Andrei Adamchik, Craig Miskell

Field Summary
protected  java.util.List orderByColumnList
Fields inherited from class org.apache.cayenne.access.trans.QueryAssemblerHelper
Constructor Summary
OrderingTranslator(QueryAssembler queryAssembler)
Method Summary
 java.lang.String doTranslation()
          Translates query Ordering list to SQL ORDER BY clause.
 java.util.List getOrderByColumnList()
          Returns the column expressions (not Expressions) used in the order by clause.
Methods inherited from class org.apache.cayenne.access.trans.QueryAssemblerHelper
appendDbPath, appendLiteral, appendLiteralDirect, appendObjPath, getDbEntity, getObjEntity, getQueryAssembler, paramsDbType, processColumn, processColumn, processColumn, processRelTermination, processRelTermination, setQueryAssembler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected java.util.List orderByColumnList
Constructor Detail


public OrderingTranslator(QueryAssembler queryAssembler)
Method Detail


public java.lang.String doTranslation()
Translates query Ordering list to SQL ORDER BY clause. Ordering list is obtained from queryAssembler's query object. In a process of building of ORDER BY clause, queryAssembler is notified when a join needs to be added.

Specified by:
doTranslation in class QueryAssemblerHelper


public java.util.List getOrderByColumnList()
Returns the column expressions (not Expressions) used in the order by clause. E.g., in the case of an case-insensitive order by, an element of the list would be UPPER(<column reference>)

Copyright © 2001-2006 All Rights Reserved.