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, updateForeignKeyFieldBeforeDelete
addCall, cursorSelectAllRows, deleteAll, deleteAllUsingTempTables, execute, executeDeferredCall, executeNoSelectCall, executeSelect, executeSelectCall, getCall, getCalls, hasMultipleCalls, prepareReportQuerySelectAllRows, prepareReportQuerySubSelect, selectAllReportQueryRows, selectAllRows, selectOneRow, selectResultSet, selectRowForDoesExist, setCall, updateAll, updateAllUsingTempTables
buildSelectionCriteria, checkCacheForObject, clone, executeWrite, executeWriteWithChangeSet, getModifyRow, getQuery, insertObjectForWrite, isExpressionQueryMechanism, isJPQLCallQueryMechanism, isQueryByExampleMechanism, setQuery, updateObjectForWrite, updateObjectForWriteWithChangeSet
public 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 DatabaseQueryMechanism
public java.lang.Integer deleteObject() throws DatabaseException
deleteObject
in class DatasourceCallQueryMechanism
DatabaseException
- - an error has occurred on the database.public java.lang.Integer executeNoSelect() throws DatabaseException
executeNoSelect
in class DatasourceCallQueryMechanism
DatabaseException
- - an error has occurred on the database.public Expression getSelectionCriteria()
getSelectionCriteria
in class DatabaseQueryMechanism
public SQLStatement getSQLStatement()
public java.util.Vector getSQLStatements()
public boolean hasMultipleStatements()
public void insertObject() throws DatabaseException
insertObject
in class DatasourceCallQueryMechanism
DatabaseException
- - an error has occurred on the database.public void insertObject(boolean reprepare)
insertObject
in class DatabaseQueryMechanism
boolean
- reprepare - whether to reprepare the query.public void trimFieldsForInsert()
public boolean isCallQueryMechanism()
isCallQueryMechanism
in class DatasourceCallQueryMechanism
public boolean isStatementQueryMechanism()
isStatementQueryMechanism
in class DatabaseQueryMechanism
public void prepare()
prepare
in class DatasourceCallQueryMechanism
public void prepareCursorSelectAllRows()
prepareCursorSelectAllRows
in class CallQueryMechanism
public void prepareDeleteAll()
prepareDeleteAll
in class CallQueryMechanism
public void prepareDeleteObject()
prepareDeleteObject
in class CallQueryMechanism
public void prepareDoesExist(DatabaseField field)
prepareDoesExist
in class CallQueryMechanism
public void prepareExecuteNoSelect()
prepareExecuteNoSelect
in class DatasourceCallQueryMechanism
public void prepareExecuteSelect()
prepareExecuteSelect
in class CallQueryMechanism
public void prepareInsertObject()
prepareInsertObject
in class DatasourceCallQueryMechanism
public void prepareSelectAllRows()
prepareSelectAllRows
in class CallQueryMechanism
public void prepareSelectOneRow()
prepareSelectOneRow
in class CallQueryMechanism
public void prepareUpdateObject()
prepareUpdateObject
in class CallQueryMechanism
public void prepareUpdateAll()
prepareUpdateAll
in class DatasourceCallQueryMechanism
public void setSQLStatement(SQLStatement statement)
public java.lang.Integer updateObject() throws DatabaseException
updateObject
in class DatasourceCallQueryMechanism
DatabaseException
- - an error has occurred on the database.EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference