org.apache.cayenne.access.trans
Class UpdateTranslator

java.lang.Object
  extended by org.apache.cayenne.access.QueryTranslator
      extended by org.apache.cayenne.access.trans.QueryAssembler
          extended by org.apache.cayenne.access.trans.UpdateTranslator

public class UpdateTranslator
extends QueryAssembler

Class implements default translation mechanism of org.apache.cayenne.query.UpdateQuery objects to SQL UPDATE statements.

Author:
Andrei Adamchik

Field Summary
 
Fields inherited from class org.apache.cayenne.access.trans.QueryAssembler
attributes, values
 
Fields inherited from class org.apache.cayenne.access.QueryTranslator
adapter, connection, engine, entityResolver, query
 
Constructor Summary
UpdateTranslator()
           
 
Method Summary
 java.lang.String aliasForTable(DbEntity dbEnt)
          Returns a name that can be used as column alias.
 java.lang.String createSqlString()
          Method that converts an update query into SQL string
 void dbRelationshipAdded(DbRelationship dbRel)
          Processes a join being added.
 
Methods inherited from class org.apache.cayenne.access.trans.QueryAssembler
addToParamList, aliasForTable, createStatement, initStatement, supportsTableAliases
 
Methods inherited from class org.apache.cayenne.access.QueryTranslator
createStatement, getAdapter, getCon, getConnection, getEngine, getEntityResolver, getQuery, getRootDbEntity, getRootEntity, getRootInheritanceTree, setAdapter, setCon, setConnection, setEngine, setEntityResolver, setQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateTranslator

public UpdateTranslator()
Method Detail

aliasForTable

public java.lang.String aliasForTable(DbEntity dbEnt)
Description copied from class: QueryAssembler
Returns a name that can be used as column alias. This can be one of the following: CayenneRuntimeException is thrown if a table alias can not be created.

Specified by:
aliasForTable in class QueryAssembler

dbRelationshipAdded

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

Specified by:
dbRelationshipAdded in class QueryAssembler

createSqlString

public java.lang.String createSqlString()
                                 throws java.lang.Exception
Method that converts an update query into SQL string

Specified by:
createSqlString in class QueryAssembler
Throws:
java.lang.Exception


Copyright © 2001-2006 Apache.org All Rights Reserved.