public class DatasourceCallQueryMechanism extends DatabaseQueryMechanism
Purpose: Mechanism used for call queries.
Responsibilities: Executes the appropriate call.
Modifier and Type | Field and Description |
---|---|
protected DatasourceCall |
call |
protected Vector |
calls
Normally only a single call is used, however multiple table may require multiple calls on write.
|
query
Constructor and Description |
---|
DatasourceCallQueryMechanism(DatabaseQuery query)
Initialize the state of the query
|
DatasourceCallQueryMechanism(DatabaseQuery query,
DatasourceCall call)
Initialize the state of the query
|
Modifier and Type | Method and Description |
---|---|
void |
addCall(DatasourceCall call)
Add the call.
|
DatabaseCall |
cursorSelectAllRows()
Read all rows from the database using a cursored stream.
|
Integer |
deleteAll()
INTERNAL:
Delete a collection of objects.
|
Integer |
deleteAllUsingTempTables()
Execute deleteAll using temp tables
|
Integer |
deleteObject()
INTERNAL:
Delete an object.
|
protected Object |
executeCall()
Execute the call.
|
protected Object |
executeCall(DatasourceCall databaseCall)
Execute the call.
|
Integer |
executeNoSelect()
Execute a non selecting call.
|
Integer |
executeNoSelectCall()
Execute a non selecting call.
|
Vector |
executeSelect()
INTERNAL:
Execute a selecting call.
|
Vector |
executeSelectCall()
INTERNAL:
Execute a selecting call.
|
DatasourceCall |
getCall()
Return the call.
|
Vector |
getCalls()
Normally only a single call is used, however multiple table may require multiple calls on write.
|
boolean |
hasMultipleCalls()
Normally only a single call is used, however multiple table may require multiple calls on write.
|
void |
insertObject()
Insert the object.
|
boolean |
isCallQueryMechanism()
Return true if this is a call 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 |
prepareCall()
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 configure the call.
|
void |
prepareDeleteAll()
Pre-build configure the call.
|
void |
prepareDeleteObject()
Pre-build configure the call.
|
void |
prepareDoesExist(DatabaseField field)
Pre-build configure the call.
|
void |
prepareExecuteNoSelect()
Pre-build configure the call.
|
void |
prepareExecuteSelect()
Pre-build configure the call.
|
void |
prepareInsertObject()
Pre-build configure the call.
|
protected void |
prepareReportQueryItems()
Prepare the report items.
|
void |
prepareReportQuerySelectAllRows()
Pre-build configure the call.
|
void |
prepareReportQuerySubSelect()
Prepare for a sub select using a call.
|
void |
prepareSelectAllRows()
Pre-build configure the call.
|
void |
prepareSelectOneRow()
Pre-build configure the call.
|
void |
prepareUpdateAll()
Pre-build configure the call.
|
void |
prepareUpdateObject()
Pre-build configure the call.
|
Vector |
selectAllReportQueryRows()
Read all rows from the database.
|
Vector |
selectAllRows()
Read all rows from the database.
|
AbstractRecord |
selectOneRow()
Read a single row from the database.
|
AbstractRecord |
selectRowForDoesExist(DatabaseField field)
Perform a does exist check
|
void |
setCall(DatasourceCall call)
Set the call.
|
protected void |
setCalls(Vector calls)
Normally only a single call is used, however multiple table may require multiple calls on write.
|
Integer |
updateAll()
Update the rows on the database.
|
Integer |
updateAllUsingTempTables()
Execute updateAll using temp tables
|
protected void |
updateForeignKeyFieldShallow(WriteObjectQuery writeQuery)
Update the foreign key fields when resolving a bi-directonal reference in a UOW.
|
Integer |
updateObject()
Update the object.
|
addObjectDeletedDuringCommit, addWriteLockFieldForInsert, buildObjectsFromRows, buildSelectionCriteria, checkCacheForObject, clone, clone, deleteObjectForWrite, executeWrite, executeWriteWithChangeSet, getDescriptor, getModifyRow, getQuery, getReadObjectQuery, getSelectionCriteria, getSession, getTranslationRow, getWriteObjectQuery, insertObject, insertObjectForWrite, insertObjectForWriteWithChangeSet, isEJBQLCallQueryMechanism, isExpressionQueryMechanism, isQueryByExampleMechanism, isStatementQueryMechanism, performUserDefinedDelete, performUserDefinedInsert, performUserDefinedUpdate, performUserDefinedWrite, prepareForExecution, registerObjectInIdentityMap, setQuery, shallowDeleteObjectForWrite, shallowInsertObjectForWrite, updateChangeSet, updateChangeSet, updateChangeSet, updateChangeSet, updateForeignKeyFieldAfterInsert, updateForeignKeyFieldBeforeDelete, updateObjectAndRowWithReturnRow, updateObjectAndRowWithSequenceNumber, updateObjectForWrite, updateObjectForWriteWithChangeSet
protected DatasourceCall call
protected Vector calls
public DatasourceCallQueryMechanism(DatabaseQuery query)
query
- - owner of mechanismpublic DatasourceCallQueryMechanism(DatabaseQuery query, DatasourceCall call)
query
- - owner of mechanismpublic void addCall(DatasourceCall call)
public DatabaseCall cursorSelectAllRows() throws DatabaseException
cursorSelectAllRows
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic Integer deleteAll() throws DatabaseException
deleteAll
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic Integer deleteAllUsingTempTables() throws DatabaseException
DatabaseException
- - an error has occurred on the database.public Integer deleteObject() throws DatabaseException
deleteObject
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databaseprotected Object executeCall() throws DatabaseException
DatabaseException
- - an error has occurred on the database.protected Object executeCall(DatasourceCall databaseCall) throws DatabaseException
DatabaseException
- - an error has occurred on the database.public Integer executeNoSelect() throws DatabaseException
executeNoSelect
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the database.public Integer executeNoSelectCall() throws DatabaseException
DatabaseException
- - an error has occurred on the database.public Vector executeSelect() throws DatabaseException
executeSelect
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic Vector executeSelectCall() throws DatabaseException
DatabaseException
- - an error has occurred on the databasepublic DatasourceCall getCall()
public Vector getCalls()
public boolean hasMultipleCalls()
public void insertObject() throws DatabaseException
insertObject
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic boolean isCallQueryMechanism()
isCallQueryMechanism
in class DatabaseQueryMechanism
public void prepare()
prepare
in class DatabaseQueryMechanism
public void prepareCall() throws QueryException
QueryException
public void prepareCursorSelectAllRows() throws QueryException
prepareCursorSelectAllRows
in class DatabaseQueryMechanism
QueryException
public void prepareDeleteAll()
prepareDeleteAll
in class DatabaseQueryMechanism
public void prepareDeleteObject()
prepareDeleteObject
in class DatabaseQueryMechanism
public void prepareDoesExist(DatabaseField field)
prepareDoesExist
in class DatabaseQueryMechanism
public void prepareExecuteNoSelect()
prepareExecuteNoSelect
in class DatabaseQueryMechanism
public void prepareExecuteSelect()
prepareExecuteSelect
in class DatabaseQueryMechanism
public void prepareInsertObject()
prepareInsertObject
in class DatabaseQueryMechanism
protected void prepareReportQueryItems()
public void prepareReportQuerySelectAllRows()
prepareReportQuerySelectAllRows
in class DatabaseQueryMechanism
public void prepareReportQuerySubSelect()
prepareReportQuerySubSelect
in class DatabaseQueryMechanism
public void prepareSelectAllRows()
prepareSelectAllRows
in class DatabaseQueryMechanism
public void prepareSelectOneRow()
prepareSelectOneRow
in class DatabaseQueryMechanism
public void prepareUpdateObject()
prepareUpdateObject
in class DatabaseQueryMechanism
public void prepareUpdateAll()
prepareUpdateAll
in class DatabaseQueryMechanism
public Vector selectAllReportQueryRows() throws DatabaseException
selectAllReportQueryRows
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic Vector selectAllRows() throws DatabaseException
selectAllRows
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic AbstractRecord selectOneRow() throws DatabaseException
selectOneRow
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the databasepublic AbstractRecord selectRowForDoesExist(DatabaseField field) throws DatabaseException
selectRowForDoesExist
in class DatabaseQueryMechanism
field
- - the field used for does exist checkDatabaseException
- - an error has occurred on the databasepublic void setCall(DatasourceCall call)
protected void setCalls(Vector calls)
public Integer updateObject() throws DatabaseException
updateObject
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the database.public Integer updateAll() throws DatabaseException
updateAll
in class DatabaseQueryMechanism
DatabaseException
- - an error has occurred on the database.public Integer updateAllUsingTempTables() throws DatabaseException
DatabaseException
- - an error has occurred on the database.protected void updateForeignKeyFieldShallow(WriteObjectQuery writeQuery)
updateForeignKeyFieldShallow
in class DatabaseQueryMechanism
Copyright © 2023. All rights reserved.