org.apache.cayenne.access.trans
Class DeleteTranslator
java.lang.Object
org.apache.cayenne.access.QueryTranslator
org.apache.cayenne.access.trans.QueryAssembler
org.apache.cayenne.access.trans.DeleteTranslator
public class DeleteTranslator
- extends QueryAssembler
Class implements default translation mechanism of org.apache.cayenne.query.DeleteQuery
objects to SQL DELETE statements.
- Author:
- Andrus Adamchik
Methods inherited from class org.apache.cayenne.access.QueryTranslator |
getAdapter, getConnection, getEntityResolver, getQuery, getRootDbEntity, getRootEntity, getRootInheritanceTree, setAdapter, setConnection, setEntityResolver, setQuery |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteTranslator
public DeleteTranslator()
aliasForTable
public 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:
- 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(DbRelationship dbRel)
- Description copied from class:
QueryAssembler
- Processes a join being added.
- Specified by:
dbRelationshipAdded
in class QueryAssembler
createSqlString
public String createSqlString()
throws Exception
- Main method of DeleteTranslator class. Translates DeleteQuery
into a JDBC PreparedStatement
- Specified by:
createSqlString
in class QueryAssembler
- Throws:
Exception
Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.