org.eclipse.persistence.queries
Class DataModifyQuery

java.lang.Object
  extended by org.eclipse.persistence.queries.DatabaseQuery
      extended by org.eclipse.persistence.queries.ModifyQuery
          extended by org.eclipse.persistence.queries.DataModifyQuery
All Implemented Interfaces:
Serializable, Cloneable

public class DataModifyQuery
extends ModifyQuery

Purpose: Concrete class used for executing non selecting SQL strings.

Responsibilities:

Since:
TOPLink/Java 1.0
Author:
Yvon Lavoie
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.persistence.queries.DatabaseQuery
BATCH_FETCH_PROPERTY, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, CascadePrivateParts, NoCascading
 
Constructor Summary
DataModifyQuery()
           
DataModifyQuery(Call call)
           
DataModifyQuery(String sqlString)
          Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.
 
Method Summary
 Object executeDatabaseQuery()
          INTERNAL: Perform the work to execute the SQL call.
 boolean hasModifyRow()
          Return if a modify row has been set.
 boolean isDataModifyQuery()
          PUBLIC: Return if this is a data modify query.
 void prepareForExecution()
          INTERNAL: Prepare the receiver for execution in a session.
 void setHasModifyRow(boolean hasModifyRow)
          Set if a modify row has been set.
 
Methods inherited from class org.eclipse.persistence.queries.ModifyQuery
forceBatchStatementExecution, getModifyRow, isModifyQuery, setForceBatchStatementExecution, setModifyRow
 
Methods inherited from class org.eclipse.persistence.queries.DatabaseQuery
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkPrepare, checkPrepare, clone, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeInUnitOfWork, extractRemoteResult, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getName, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getRedirector, getReferenceClass, getReferenceClassName, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSourceMapping, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isDataReadQuery, isDefaultPropertiesQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareFromQuery, redirectQuery, remoteExecute, removeProperty, replaceValueHoldersIn, retrieveBypassCache, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setBatchObjects, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setFlushOnExecute, setHintString, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setJPQLString, setName, setProperties, setProperty, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldRetrieveBypassCache, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, storeBypassCache, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataModifyQuery

public DataModifyQuery()

DataModifyQuery

public DataModifyQuery(String sqlString)
Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.


DataModifyQuery

public DataModifyQuery(Call call)
Method Detail

hasModifyRow

public boolean hasModifyRow()
Return if a modify row has been set. Allows distinguishing query that have a different modify row than translation row.


setHasModifyRow

public void setHasModifyRow(boolean hasModifyRow)
Set if a modify row has been set. Allows distinguishing query that have a different modify row than translation row.


executeDatabaseQuery

public Object executeDatabaseQuery()
                            throws DatabaseException
INTERNAL: Perform the work to execute the SQL call. Return the row count of the number of rows effected by the SQL call.

Specified by:
executeDatabaseQuery in class DatabaseQuery
Returns:
- the result of executing the query.
Throws:
DatabaseException - - an error has occurred on the database.

isDataModifyQuery

public boolean isDataModifyQuery()
PUBLIC: Return if this is a data modify query.

Overrides:
isDataModifyQuery in class DatabaseQuery

prepareForExecution

public void prepareForExecution()
                         throws QueryException
INTERNAL: Prepare the receiver for execution in a session. In particular, set the descriptor of the receiver to the ClassDescriptor for the appropriate class for the receiver's object.

Overrides:
prepareForExecution in class DatabaseQuery
Throws:
QueryException