public class StatementQueryMechanism extends CallQueryMechanism
Purpose: Mechanism used for all statement objects.
Responsibilities: Executes the appropriate statement.
| Constructor and Description |
|---|
StatementQueryMechanism() |
StatementQueryMechanism(DatabaseQuery query)
INTERNAL:
Return a new mechanism for the query
|
StatementQueryMechanism(DatabaseQuery query,
SQLStatement statement)
Return a new mechanism for the query
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearStatement()
The statement is no longer require after prepare so can be released.
|
DatabaseQueryMechanism |
clone(DatabaseQuery queryClone)
Clone the mechanism for the specified query clone.
|
java.lang.Integer |
deleteObject()
INTERNAL:
delete the object
|
java.lang.Integer |
executeNoSelect()
Update the object
|
Expression |
getSelectionCriteria()
Return the selection criteria for the statement.
|
SQLStatement |
getSQLStatement()
INTERNAL:
Return the sqlStatement
|
java.util.Vector |
getSQLStatements()
Normally only a single statement is used, however multiple table may require multiple statements on write.
|
boolean |
hasMultipleStatements()
Normally only a single statement is used, however multiple table may require multiple statements on write.
|
void |
insertObject()
Insert the object
|
void |
insertObject(boolean reprepare)
Insert the object if the reprepare flag is set, first reprepare the query.
|
boolean |
isCallQueryMechanism()
Return true if this is a call query mechanism
|
boolean |
isStatementQueryMechanism()
Return true if this is a statement query mechanism
|
void |
prepare()
INTERNAL:
This is different from 'prepareForExecution' in that this is called on the original query,
and the other is called on the copy of the query.
|
void |
prepareCursorSelectAllRows()
Pre-build the SQL call from the statement.
|
void |
prepareDeleteAll()
Pre-build the SQL call from the statement.
|
void |
prepareDeleteObject()
Pre-build the SQL call from the statement.
|
void |
prepareDoesExist(DatabaseField field)
Pre-build the SQL call from the statement.
|
void |
prepareExecuteNoSelect()
Pre-build the SQL call from the statement.
|
void |
prepareExecuteSelect()
Pre-build the SQL call from the statement.
|
void |
prepareInsertObject()
Pre-build the SQL call from the statement.
|
void |
prepareSelectAllRows()
Pre-build the SQL call from the statement.
|
void |
prepareSelectOneRow()
Pre-build the SQL call from the statement.
|
void |
prepareUpdateAll()
Pre-build the SQL call from the statement.
|
void |
prepareUpdateObject()
Pre-build the SQL call from the statement.
|
void |
setSQLStatement(SQLStatement statement)
Set the sqlStatement
|
void |
trimFieldsForInsert()
INTERNAL
Remove a potential sequence number field and invoke the ReturningPolicy trimModifyRowsForInsert method
|
java.lang.Integer |
updateObject()
Update the object
|
getDatabaseCall, prepareCall, prepareExecute, setCallHasCustomSQLArguments, unprepare, updateForeignKeyFieldBeforeDeleteaddCall, cursorSelectAllRows, deleteAll, deleteAllUsingTempTables, execute, executeDeferredCall, executeNoSelectCall, executeSelect, executeSelectCall, getCall, getCalls, hasMultipleCalls, prepareReportQuerySelectAllRows, prepareReportQuerySubSelect, selectAllReportQueryRows, selectAllRows, selectOneRow, selectResultSet, selectRowForDoesExist, setCall, updateAll, updateAllUsingTempTablesbuildSelectionCriteria, checkCacheForObject, clone, executeWrite, executeWriteWithChangeSet, getModifyRow, getQuery, insertObjectForWrite, isExpressionQueryMechanism, isJPQLCallQueryMechanism, isQueryByExampleMechanism, setQuery, updateObjectForWrite, updateObjectForWriteWithChangeSetpublic StatementQueryMechanism()
public StatementQueryMechanism(DatabaseQuery query)
query - - owner of mechanismpublic StatementQueryMechanism(DatabaseQuery query, SQLStatement statement)
query - - owner of mechanismstatement - - sql statementpublic void clearStatement()
public DatabaseQueryMechanism clone(DatabaseQuery queryClone)
clone in class DatabaseQueryMechanismpublic java.lang.Integer deleteObject()
throws DatabaseException
deleteObject in class DatasourceCallQueryMechanismDatabaseException - - an error has occurred on the database.public java.lang.Integer executeNoSelect()
throws DatabaseException
executeNoSelect in class DatasourceCallQueryMechanismDatabaseException - - an error has occurred on the database.public Expression getSelectionCriteria()
getSelectionCriteria in class DatabaseQueryMechanismpublic SQLStatement getSQLStatement()
public java.util.Vector getSQLStatements()
public boolean hasMultipleStatements()
public void insertObject()
throws DatabaseException
insertObject in class DatasourceCallQueryMechanismDatabaseException - - an error has occurred on the database.public void insertObject(boolean reprepare)
insertObject in class DatabaseQueryMechanismboolean - reprepare - whether to reprepare the query.public void trimFieldsForInsert()
public boolean isCallQueryMechanism()
isCallQueryMechanism in class DatasourceCallQueryMechanismpublic boolean isStatementQueryMechanism()
isStatementQueryMechanism in class DatabaseQueryMechanismpublic void prepare()
prepare in class DatasourceCallQueryMechanismpublic void prepareCursorSelectAllRows()
prepareCursorSelectAllRows in class CallQueryMechanismpublic void prepareDeleteAll()
prepareDeleteAll in class CallQueryMechanismpublic void prepareDeleteObject()
prepareDeleteObject in class CallQueryMechanismpublic void prepareDoesExist(DatabaseField field)
prepareDoesExist in class CallQueryMechanismpublic void prepareExecuteNoSelect()
prepareExecuteNoSelect in class DatasourceCallQueryMechanismpublic void prepareExecuteSelect()
prepareExecuteSelect in class CallQueryMechanismpublic void prepareInsertObject()
prepareInsertObject in class DatasourceCallQueryMechanismpublic void prepareSelectAllRows()
prepareSelectAllRows in class CallQueryMechanismpublic void prepareSelectOneRow()
prepareSelectOneRow in class CallQueryMechanismpublic void prepareUpdateObject()
prepareUpdateObject in class CallQueryMechanismpublic void prepareUpdateAll()
prepareUpdateAll in class DatasourceCallQueryMechanismpublic void setSQLStatement(SQLStatement statement)
public java.lang.Integer updateObject()
throws DatabaseException
updateObject in class DatasourceCallQueryMechanismDatabaseException - - an error has occurred on the database.EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference