Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.objectstyle.cayenne.access.trans
Class SqlModifyTranslator  view SqlModifyTranslator download SqlModifyTranslator.java

java.lang.Object
  extended byorg.objectstyle.cayenne.access.QueryTranslator
      extended byorg.objectstyle.cayenne.access.trans.QueryAssembler
          extended byorg.objectstyle.cayenne.access.trans.SqlModifyTranslator

public class SqlModifyTranslator
extends QueryAssembler

Class works as a translator of raw SELECT queries to JDBC statements.


Field Summary
 
Fields inherited from class org.objectstyle.cayenne.access.trans.QueryAssembler
attributes, values
 
Fields inherited from class org.objectstyle.cayenne.access.QueryTranslator
adapter, con, engine, query
 
Constructor Summary
SqlModifyTranslator()
           
 
Method Summary
 java.lang.String aliasForTable(org.objectstyle.cayenne.map.DbEntity dbEnt)
          Returns a name that can be used as column alias.
 java.lang.String createSqlString()
          Translates query into sql string.
 void dbRelationshipAdded(org.objectstyle.cayenne.map.DbRelationship dbRel)
          Processes a join being added.
 boolean supportsTableAliases()
          Returns true if table aliases are supported.
 
Methods inherited from class org.objectstyle.cayenne.access.trans.QueryAssembler
addToParamList, aliasForTable, createStatement, initStatement
 
Methods inherited from class org.objectstyle.cayenne.access.QueryTranslator
getAdapter, getCon, getEngine, getQuery, getRootDbEntity, getRootEntity, setAdapter, setCon, setEngine, setQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlModifyTranslator

public SqlModifyTranslator()
Method Detail

createSqlString

public java.lang.String createSqlString()
                                 throws java.lang.Exception
Description copied from class: QueryAssembler
Translates query into sql string. This is a workhorse method of QueryAssembler. It is called internally from createStatement. Usually there is no need to invoke it explicitly.

Specified by:
createSqlString in class QueryAssembler

aliasForTable

public java.lang.String aliasForTable(org.objectstyle.cayenne.map.DbEntity dbEnt)
Description copied from class: QueryAssembler
Returns a name that can be used as column alias. This can be one of the following:
  • an alias for this table, if it uses aliases
  • a fully qualified table name, if not.
CayenneRuntimeException is thrown if a table alias can not be created.

Specified by:
aliasForTable in class QueryAssembler

dbRelationshipAdded

public void dbRelationshipAdded(org.objectstyle.cayenne.map.DbRelationship dbRel)
Description copied from class: QueryAssembler
Processes a join being added.

Specified by:
dbRelationshipAdded in class QueryAssembler

supportsTableAliases

public boolean supportsTableAliases()
Description copied from class: QueryAssembler
Returns true if table aliases are supported. Default implementation returns false.

Overrides:
supportsTableAliases in class QueryAssembler