Top Description Fields Constructors Methods
org.eclipse.persistence.internal.queries

public Class CallQueryMechanism

extends DatasourceCallQueryMechanism
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.queries.StatementQueryMechanism
Imports
java.util.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.internal.databaseaccess.*, org.eclipse.persistence.internal.expressions.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.queries.*

Purpose: Mechanism used for custom SQL and stored procedure queries.

Responsibilities: Executes the appropriate call.

Author
James Sutherland
Since
TOPLink/Java 2.0

Field Summary

Inherited from org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism:
callcalls

Constructor Summary

AccessConstructor and Description
public
public
CallQueryMechanism(DatabaseQuery
- owner of mechanism
query
)

Initialize the state of the query

public
CallQueryMechanism(DatabaseQuery
- owner of mechanism
query
,
DatabaseCall
- sql call
call
)

Initialize the state of the query

Method Summary

Modifier and TypeMethod and Description
protected void
configureDatabaseCall(DatabaseCall call)

Set the call level query options into the call.

public DatabaseCall
getDatabaseCall()

Return the call.

public void
prepareCall()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.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.
public void
public void
public void
public void
public void
prepareExecute()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareExecute.

Pre-build configure the SQL call for an execute call.
public void
protected void
prepareJoining(ObjectLevelReadQuery query)

Prepare the joining indexes if joining.

public void
public void
public void
public void
setCallHasCustomSQLArguments()

INTERNAL: Configure the call to be a dynamic custom SQL call, so that it ignores the # token.

public void
protected void
updateForeignKeyFieldAfterInsert(WriteObjectQuery writeQuery)

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateForeignKeyFieldAfterInsert.

Update the foreign key fields when resolving a bi-directional reference in a UOW.
public void
Inherited from org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism:
addCallclonecomputeAndSetItemOffsetcursorSelectAllRowsdeleteAlldeleteAllUsingTempTablesdeleteObjectexecuteexecuteCallexecuteCallexecuteDeferredCallexecuteNoSelectexecuteNoSelectCallexecuteSelectexecuteSelectCallgenerateKeysExecuteNoSelectgetCallgetCallshasMultipleCallsinsertObjectisCallQueryMechanismprepareprepareExecuteNoSelectprepareInsertObjectprepareReportQueryItemsprepareReportQuerySelectAllRowsprepareReportQuerySubSelectprepareUpdateAllselectAllReportQueryRowsselectAllRowsselectOneRowselectResultSetselectRowForDoesExistsetCallsetCallsupdateAllupdateAllUsingTempTablesupdateObject

Constructor Detail

CallQueryMechanismback to summary
public CallQueryMechanism()
CallQueryMechanismback to summary
public CallQueryMechanism(DatabaseQuery query)

Initialize the state of the query

Parameters
query:DatabaseQuery

- owner of mechanism

CallQueryMechanismback to summary
public CallQueryMechanism(DatabaseQuery query, DatabaseCall call)

Initialize the state of the query

Parameters
query:DatabaseQuery

- owner of mechanism

call:DatabaseCall

- sql call

Method Detail

configureDatabaseCallback to summary
protected void configureDatabaseCall(DatabaseCall call)

Set the call level query options into the call.

getDatabaseCallback to summary
public DatabaseCall getDatabaseCall()

Return the call.

prepareCallback to summary
public void prepareCall() throws QueryException

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.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. This query is copied for concurrency so this prepare can only setup things that will apply to any future execution of this query.

Annotations
@Override
prepareCursorSelectAllRowsback to summary
public void prepareCursorSelectAllRows() throws QueryException

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareCursorSelectAllRows.

Pre-build configure the SQL call.

Annotations
@Override
prepareDeleteAllback to summary
public void prepareDeleteAll()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareDeleteAll.

Pre-build configure the SQL call.

Annotations
@Override
prepareDeleteObjectback to summary
public void prepareDeleteObject()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareDeleteObject.

Pre-build configure the SQL call.

Annotations
@Override
prepareDoesExistback to summary
public void prepareDoesExist(DatabaseField field)

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareDoesExist.

Pre-build configure the SQL call.

Annotations
@Override
prepareExecuteback to summary
public void prepareExecute()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareExecute.

Pre-build configure the SQL call for an execute call.

Annotations
@Override
prepareExecuteSelectback to summary
public void prepareExecuteSelect()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareExecuteSelect.

Pre-build configure the SQL call.

Annotations
@Override
prepareJoiningback to summary
protected void prepareJoining(ObjectLevelReadQuery query)

Prepare the joining indexes if joining.

prepareSelectAllRowsback to summary
public void prepareSelectAllRows()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareSelectAllRows.

Pre-build configure the SQL call.

Annotations
@Override
prepareSelectOneRowback to summary
public void prepareSelectOneRow()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareSelectOneRow.

Pre-build configure the SQL call.

Annotations
@Override
prepareUpdateObjectback to summary
public void prepareUpdateObject()

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.prepareUpdateObject.

Pre-build configure the SQL call.

Annotations
@Override
setCallHasCustomSQLArgumentsback to summary
public void setCallHasCustomSQLArguments()

INTERNAL: Configure the call to be a dynamic custom SQL call, so that it ignores the # token.

unprepareback to summary
public void unprepare()

Overrides org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.unprepare.

Unprepare the call if required. Clone and unprepare stored procedure calls, so they can be reprepared with possible different optional arguments.

Annotations
@Override
updateForeignKeyFieldAfterInsertback to summary
protected void updateForeignKeyFieldAfterInsert(WriteObjectQuery writeQuery)

Overrides org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateForeignKeyFieldAfterInsert.

Update the foreign key fields when resolving a bi-directional reference in a UOW. This must always be dynamic as it is called within an insert query and is really part of the insert and does not fire update events or worry about locking.

Annotations
@Override
updateForeignKeyFieldBeforeDeleteback to summary
public void updateForeignKeyFieldBeforeDelete()

Overrides org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateForeignKeyFieldBeforeDelete.

Update the foreign key fields to null when resolving a deletion cycle. This must always be dynamic as it is called within an delete query and is really part of the delete and does not fire update events or worry about locking.

Annotations
@Override