|
Oracle Application Server TopLink API Reference 10g (9.0.4.3) B10491-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.toplink.queryframework.DatabaseQuery
Purpose: Abstract class for all database query objects. DatabaseQuery is a visible class to the TopLink user. Users create an appropriate query by creating an instance of a concrete subclasses of DatabaseQuery.
Responsibilities:
| Field Summary | |
static int |
CascadeAggregateDelete |
static int |
CascadeAllParts |
static int |
CascadeDependentParts |
static int |
CascadePrivateParts |
static int |
NoCascading |
static java.lang.String |
QUERY_PREPARE |
| Fields inherited from interface oracle.toplink.internal.helper.FalseUndefinedTrue |
False, True, Undefined |
| Constructor Summary | |
DatabaseQuery()PUBLIC: Initialize the state of the query | |
| Method Summary | |
void |
addArgument(java.lang.String argumentName)PUBLIC: Add the argument named argumentName. |
void |
addArgument(java.lang.String argumentName, java.lang.Class type)PUBLIC: Add the argument named argumentName and its class type. |
void |
addArgument(java.lang.String argumentName, java.lang.String typeAsString)PUBLIC: Add the argument named argumentName and its class type. |
void |
addArgumentValue(java.lang.String argumentValue)PUBLIC: Add the argumentValue named argumentName. |
void |
addArgumentValues(java.util.Vector theArgumentValues)PUBLIC: Add the argumentValues to the query |
void |
addCall(Call call)PUBLIC: Used to define a store procedure or SQL query. |
void |
addStatement(oracle.toplink.internal.expressions.SQLStatement statement)PUBLIC: Used to define a statement level query. |
void |
bindAllParameters()PUBLIC: Bind all arguments to any SQL statement. |
void |
cacheStatement()PUBLIC: Cache the prepared statements, this requires full parameter binding as well. |
void |
cascadeAllParts()PUBLIC: Cascade the query and its properties on the queries object(s) and all objects related to the queries object(s). |
void |
cascadeOnlyDependentParts()INTERNAL: Used by unit of work, only cascades constraint dependecies. |
void |
cascadePrivateParts()PUBLIC: Cascade the query and its properties on the queries object(s) and all privately owned objects related to the queries object(s). |
java.lang.Object |
checkEarlyReturn(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)INTERNAL: Check to see if this query already knows the return vale without preforming any further work. |
void |
checkPrepare(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)INTERNAL: Check to see if this query needs to be prepare and prepare it. |
java.lang.Object |
clone()INTERNAL: Clone the query |
void |
dontBindAllParameters()PUBLIC: Do not Bind all arguments to any SQL statement. |
void |
dontCacheStatement()PUBLIC: Dont cache the prepared statements, this requires full parameter binding as well. |
void |
dontCascadeParts()PUBLIC: Do not cascade the query and its properties on the queries object(s) relationships. |
void |
dontMaintainCache()PUBLIC: Set for the identity map (cache) to be ignored completely. |
abstract java.lang.Object |
execute()INTERNAL: Execute the query |
java.lang.Object |
execute(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)INTERNAL: Execute the query. |
java.lang.Object |
extractRemoteResult(oracle.toplink.internal.remote.Transporter transporter)INTERNAL: Extract the correct query result from the transporter. |
oracle.toplink.internal.databaseaccess.Accessor |
getAccessor()INTERNAL: Return the accessor. |
java.util.Vector |
getArguments()INTERNAL: Return the arguments for use with the pre-defined query option |
java.util.Vector |
getArgumentTypes()INTERNAL: Return the argumentTypes for use with the pre-defined query option |
java.util.Vector |
getArgumentValues()INTERNAL: Return the argumentValues for use with the pre-defined query option |
oracle.toplink.internal.databaseaccess.DatabaseCall |
getCall()ADVANCED: Return the call for this query. |
int |
getCascadePolicy()INTERNAL: Return the cascade policy. |
Descriptor |
getDescriptor()INTERNAL: Return the descriptor assigned with the reference class |
java.lang.String |
getEJBQLString()PUBLIC: Return the SQL string of the query. |
java.lang.String |
getHintString()PUBLIC: Return the current Oracle Hint string of the query |
java.lang.String |
getName()PUBLIC: Return the name of the query |
java.util.Hashtable |
getProperties()INTERNAL: Property support for use by mappings. |
java.lang.Object |
getProperty(java.lang.Object property)INTERNAL: Property support used by mappings to stach temporary stuff in the query. |
oracle.toplink.internal.queryframework.DatabaseQueryMechanism |
getQueryMechanism()INTERNAL: Return the mechanism assigned to the query |
int |
getQueryTimeout()PUBLIC: Return the number of seconds the driver will wait for a Statement to execute to the given number of seconds. |
QueryRedirector |
getRedirector()PUBLIC: Return the query redirector. |
java.lang.Class |
getReferenceClass()PUBLIC: Return the domain class associated with this query. |
Expression |
getSelectionCriteria()PUBLIC: Return the selection criteria of the query. |
oracle.toplink.publicinterface.Session |
getSession()INTERNAL: Return the current session. |
java.lang.String |
getSessionName()PUBLIC: Return the name of the session that the query should be executed under. |
oracle.toplink.internal.expressions.SQLStatement |
getSQLStatement()PUBLIC: Return the SQL statement of the query. |
java.lang.String |
getSQLString()PUBLIC: Return the SQL string of the query. |
java.lang.String |
getTranslatedSQLString(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)ADVANCED: This can be used to access a queries translated SQL if they have been prepared, (i.e. query.prepareCall()). |
DatabaseRow |
getTranslationRow()INTERNAL: Return the row for translation |
boolean |
hasAccessor()INTERNAL: returns true if the accessor has already been set. |
boolean |
hasProperties()INTERNAL: Return if any properties exist in the query. |
boolean |
hasSessionName()PUBLIC: Return if a name of the session that the query should be executed under has been specified. |
void |
ignoreBindAllParameters()PUBLIC: Session's shouldBindAllParameters() defines whether to bind or not (default setting) |
void |
ignoreCacheStatement()PUBLIC: Session's shouldCacheAllStatements() defines whether to cache or not (default setting) |
boolean |
isCallQuery()PUBLIC: Return true if this query uses an SQL, stored procedure, or SDK call. |
boolean |
isCascadeOfAggregateDelete()INTERNAL: Returns true if this query has been created as the result of cascading a delete of an aggregate collection in a UnitOfWork CR 2811 |
boolean |
isDataModifyQuery()PUBLIC: Return if this is a data modify query. |
boolean |
isDataReadQuery()PUBLIC: Return if this is a data read query. |
boolean |
isDeleteObjectQuery()PUBLIC: Return if this is a delete object query. |
boolean |
isExpressionQuery()PUBLIC: Return true if this query uses an expression query mechanism |
boolean |
isModifyQuery()PUBLIC: Return if this is a modify query. |
boolean |
isObjectLevelModifyQuery()PUBLIC: Return if this is an object level modify query. |
boolean |
isObjectLevelReadQuery()PUBLIC: Return if this is an object level read query. |
boolean |
isReadAllQuery()PUBLIC: Return if this is a read all query. |
boolean |
isReadObjectQuery()PUBLIC: Return if this is a read object query. |
boolean |
isReadQuery()PUBLIC: Return if this is a read query. |
boolean |
isReportQuery()PUBLIC: Return if this is a report query. |
boolean |
isSQLCallQuery()PUBLIC: Return true if this query uses an SQL query mechanism . |
boolean |
isUserDefined()INTERNAL: Return true if the query is a custom user defined query. |
boolean |
isWriteObjectQuery()PUBLIC: Return if this is a write object query. |
void |
maintainCache()PUBLIC: Set for the identity map (cache) to be maintained. |
void |
prepareCall(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)ADVANCED: Pre-generate the call/SQL for the query. |
void |
prepareForExecution()INTERNAL: Prepare the receiver for execution in a session. |
java.lang.Object |
redirectQuery(DatabaseQuery queryToRedirect, oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)INTERNAL: Use a TopLink redirector to redirect this query to a method. |
java.lang.Object |
remoteExecute(oracle.toplink.publicinterface.Session session)INTERNAL: |
void |
removeProperty(java.lang.Object property)INTERNAL: Property support used by mappings. |
oracle.toplink.internal.helper.IdentityHashtable |
replaceValueHoldersIn(java.lang.Object object, oracle.toplink.internal.remote.RemoteSessionController controller)INTERNAL: replace the value holders in the specified result object(s) |
DatabaseRow |
rowFromArguments(java.util.Vector argumentValues)INTERNAL: Translate argumentValues into a database row. |
void |
setAccessor(oracle.toplink.internal.databaseaccess.Accessor accessor)INTERNAL: Set the accessor, the query must always use the same accessor for database access. |
void |
setArguments(java.util.Vector arguments)INTERNAL: Set the arguments for use with the pre-defined query option. |
void |
setArgumentTypes(java.util.Vector argumentTypes)INTERNAL: Set the argumentTypes for use with the pre-defined query option |
void |
setArgumentValues(java.util.Vector theArgumentValues)INTERNAL: Return the argumentValues for use with the pre-defined query option |
void |
setCall(Call call)PUBLIC: Used to define a store procedure or SQL query. |
void |
setCascadePolicy(int policyConstant)INTERNAL: Set the cascade policy. |
void |
setDescriptor(Descriptor descriptor)INTERNAL: Set the descriptor for the query. |
void |
setEJBQLString(java.lang.String ejbqlString)PUBLIC: To any user of this object. |
void |
setHintString(java.lang.String newHintString)PUBLIC: Used to set the Oracle Hint string on the query. |
void |
setIsUserDefined(boolean isUserDefined)INTERNAL: Set if the query is a custom user defined query. |
void |
setName(java.lang.String queryName)PUBLIC: Set the query's name. |
void |
setProperties(java.util.Hashtable properties)INTERNAL: Property support used by mappings. |
void |
setProperty(java.lang.Object property, java.lang.Object value)INTERNAL: Property support used by mappings to stache temporary stuff. |
void |
setQueryTimeout(int queryTimeout)PUBLIC: Set the number of seconds the driver will wait for a Statement to execute to the given number of seconds. |
void |
setRedirector(QueryRedirector redirector)PUBLIC: Set the query redirector. |
void |
setSelectionCriteria(Expression expression)PUBLIC: To any user of this object. |
void |
setSession(oracle.toplink.publicinterface.Session session)INTERNAL: Set the session for the query |
void |
setSessionName(java.lang.String sessionName)PUBLIC: Set the name of the session that the query should be executed under. |
void |
setShouldBindAllParameters(boolean shouldBindAllParameters)PUBLIC: Bind all arguments to any SQL statement. |
void |
setShouldCacheStatement(boolean shouldCacheStatement)PUBLIC: Cache the prepared statements, this requires full parameter binding as well. |
void |
setShouldMaintainCache(boolean shouldMaintainCache)PUBLIC: Set if the identity map (cache) should be used or not. |
void |
setShouldPrepare(boolean shouldPrepare)PUBLIC: Set if the query should be prepared. |
void |
setShouldUseWrapperPolicy(boolean shouldUseWrapperPolicy)ADVANCED: The wrapper policy can be enable on a query. |
void |
setSQLStatement(oracle.toplink.internal.expressions.SQLStatement sqlStatement)PUBLIC: To any user of this object. |
void |
setSQLString(java.lang.String sqlString)PUBLIC: To any user of this object. |
void |
setTranslationRow(DatabaseRow translationRow)INTERNAL: Set the row for translation |
boolean |
shouldBindAllParameters()PUBLIC: Bind all arguments to any SQL statement. |
boolean |
shouldCacheStatement()PUBLIC: Cache the prepared statements, this requires full parameter binding as well. |
boolean |
shouldCascadeAllParts()PUBLIC: Flag used to determine if all parts should be cascaded |
boolean |
shouldCascadeOnlyDependentParts()INTERNAL: Flag used for unit of works cascade policy. |
boolean |
shouldCascadeParts()PUBLIC: Flag used to determine if any parts should be cascaded |
boolean |
shouldCascadePrivateParts()PUBLIC: Flag used to determine if any private parts should be cascaded |
boolean |
shouldIgnoreBindAllParameters()PUBLIC: Local shouldBindAllParameters() should be ignored, Session's shouldBindAllParameters() should be used. |
boolean |
shouldIgnoreCacheStatement()PUBLIC: Local shouldCacheStatement() should be ignored, Session's shouldCacheAllStatements() should be used. |
boolean |
shouldIgnoreMaintainCache()INTERNAL: Local shouldMaintainCache() should be ignored, Descriptor's shouldDisableCacheHits() should be used. |
boolean |
shouldMaintainCache()PUBLIC: Return if the identity map (cache) should be used or not. |
boolean |
shouldPrepare()PUBLIC: Return if the query should be prepared. |
boolean |
shouldUseWrapperPolicy()ADVANCED: The wrapper policy can be enabled on a query. |
java.lang.String |
toString() |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String QUERY_PREPARE
public static final int NoCascading
public static final int CascadePrivateParts
public static final int CascadeAllParts
public static final int CascadeDependentParts
public static final int CascadeAggregateDelete
| Constructor Detail |
public DatabaseQuery()
| Method Detail |
public void addArgument(java.lang.String argumentName)
public void addArgument(java.lang.String argumentName,
java.lang.Class type)
public void addArgument(java.lang.String argumentName,
java.lang.String typeAsString)
public void addArgumentValue(java.lang.String argumentValue)
public void addArgumentValues(java.util.Vector theArgumentValues)
public void addCall(Call call)
public void addStatement(oracle.toplink.internal.expressions.SQLStatement statement)
public void bindAllParameters()
public void cacheStatement()
public void cascadeAllParts()
public void cascadeOnlyDependentParts()
public void cascadePrivateParts()
public java.lang.Object checkEarlyReturn(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)
public void checkPrepare(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)
public java.lang.Object clone()
public void dontBindAllParameters()
public void dontCacheStatement()
public void dontCascadeParts()
public void dontMaintainCache()
public abstract java.lang.Object execute()
throws DatabaseException,
OptimisticLockException
DatabaseException - - an error has occurred on the database.OptimisticLockException - - an error has occurred using the optimistic lock feature.
public java.lang.Object execute(oracle.toplink.publicinterface.Session session,
DatabaseRow translationRow)
throws DatabaseException,
OptimisticLockException
session - - the session in which the receiver will be executed.DatabaseException - - an error has occurred on the database.OptimisticLockException - - an error has occurred using the optimistic lock feature.public java.lang.Object extractRemoteResult(oracle.toplink.internal.remote.Transporter transporter)
public oracle.toplink.internal.databaseaccess.Accessor getAccessor()
public java.util.Vector getArguments()
public java.util.Vector getArgumentTypes()
public void setArgumentTypes(java.util.Vector argumentTypes)
public void setArguments(java.util.Vector arguments)
public java.util.Vector getArgumentValues()
public void setArgumentValues(java.util.Vector theArgumentValues)
public oracle.toplink.internal.databaseaccess.DatabaseCall getCall()
prepareCall(Session, DatabaseRow);public int getCascadePolicy()
public Descriptor getDescriptor()
public java.lang.String getName()
public java.util.Hashtable getProperties()
public java.lang.Object getProperty(java.lang.Object property)
public oracle.toplink.internal.queryframework.DatabaseQueryMechanism getQueryMechanism()
public int getQueryTimeout()
public QueryRedirector getRedirector()
QueryRedirectorpublic java.lang.Class getReferenceClass()
public Expression getSelectionCriteria()
public oracle.toplink.publicinterface.Session getSession()
public java.lang.String getSessionName()
public oracle.toplink.internal.expressions.SQLStatement getSQLStatement()
public java.lang.String getEJBQLString()
prepareCall(Session, DatabaseRow)public java.lang.String getHintString()
public java.lang.String getSQLString()
prepareCall(Session, DatabaseRow)public java.lang.String getTranslatedSQLString(oracle.toplink.publicinterface.Session session, DatabaseRow translationRow)
prepareCall(Session, DatabaseRow)public DatabaseRow getTranslationRow()
public boolean hasAccessor()
public boolean hasProperties()
public boolean hasSessionName()
public void ignoreBindAllParameters()
public void ignoreCacheStatement()
public boolean isCallQuery()
public boolean isCascadeOfAggregateDelete()
public boolean isDataModifyQuery()
public boolean isDataReadQuery()
public boolean isDeleteObjectQuery()
public boolean isExpressionQuery()
public boolean isModifyQuery()
public boolean isObjectLevelModifyQuery()
public boolean isObjectLevelReadQuery()
public boolean isReadAllQuery()
public boolean isReadObjectQuery()
public boolean isReadQuery()
public boolean isReportQuery()
public boolean isSQLCallQuery()
public boolean isUserDefined()
public boolean isWriteObjectQuery()
public void maintainCache()
public void prepareCall(oracle.toplink.publicinterface.Session session,
DatabaseRow translationRow)
throws QueryException
QueryExceptiongetCall(), getSQLString(), getTranslatedSQLString(Session, DatabaseRow)
public void prepareForExecution()
throws QueryException
QueryException
public java.lang.Object redirectQuery(DatabaseQuery queryToRedirect,
oracle.toplink.publicinterface.Session session,
DatabaseRow translationRow)
public java.lang.Object remoteExecute(oracle.toplink.publicinterface.Session session)
public void removeProperty(java.lang.Object property)
public oracle.toplink.internal.helper.IdentityHashtable replaceValueHoldersIn(java.lang.Object object,
oracle.toplink.internal.remote.RemoteSessionController controller)
public DatabaseRow rowFromArguments(java.util.Vector argumentValues)
throws QueryException
QueryExceptionpublic void setAccessor(oracle.toplink.internal.databaseaccess.Accessor accessor)
public void setCall(Call call)
public void setCascadePolicy(int policyConstant)
public void setDescriptor(Descriptor descriptor)
public void setEJBQLString(java.lang.String ejbqlString)
public void setHintString(java.lang.String newHintString)
public void setIsUserDefined(boolean isUserDefined)
public void setName(java.lang.String queryName)
public void setProperties(java.util.Hashtable properties)
public void setProperty(java.lang.Object property,
java.lang.Object value)
public void setQueryTimeout(int queryTimeout)
public void setRedirector(QueryRedirector redirector)
QueryRedirectorpublic void setSelectionCriteria(Expression expression)
public void setSession(oracle.toplink.publicinterface.Session session)
public void setSessionName(java.lang.String sessionName)
public void setShouldBindAllParameters(boolean shouldBindAllParameters)
public void setShouldCacheStatement(boolean shouldCacheStatement)
public void setShouldMaintainCache(boolean shouldMaintainCache)
public void setShouldPrepare(boolean shouldPrepare)
These queries include:
public void setShouldUseWrapperPolicy(boolean shouldUseWrapperPolicy)
public void setSQLStatement(oracle.toplink.internal.expressions.SQLStatement sqlStatement)
public void setSQLString(java.lang.String sqlString)
public void setTranslationRow(DatabaseRow translationRow)
public boolean shouldBindAllParameters()
public boolean shouldCacheStatement()
public boolean shouldCascadeAllParts()
public boolean shouldCascadeOnlyDependentParts()
public boolean shouldCascadeParts()
public boolean shouldCascadePrivateParts()
public boolean shouldIgnoreBindAllParameters()
public boolean shouldIgnoreCacheStatement()
public boolean shouldMaintainCache()
public boolean shouldIgnoreMaintainCache()
public boolean shouldPrepare()
These queries include:
public boolean shouldUseWrapperPolicy()
public java.lang.String toString()
|
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||