|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.queries.DatabaseQuery org.eclipse.persistence.queries.ModifyQuery org.eclipse.persistence.queries.ModifyAllQuery
public abstract class ModifyAllQuery
PUBLIC: Query used to perform a bulk delete using TopLink's expression framework.
Field Summary | |
---|---|
protected ExpressionBuilder |
defaultBuilder
Provide a default builder so that it's easier to be consistent |
static int |
INVALIDATE_CACHE
|
protected boolean |
isPreparedUsingTempStorage
Indicates whether the query was prepared so that it will execute using temp storage |
static int |
NO_CACHE
Cache usage flags |
protected java.lang.Class |
referenceClass
|
protected java.lang.String |
referenceClassName
|
protected java.lang.Integer |
result
Number of modified objects |
Fields inherited from class org.eclipse.persistence.queries.ModifyQuery |
---|
forceBatchStatementExecution, modifyRow |
Constructor Summary | |
---|---|
ModifyAllQuery()
PUBLIC: |
|
ModifyAllQuery(java.lang.Class referenceClass)
PUBLIC: Create a new update all query for the class specified. |
|
ModifyAllQuery(java.lang.Class referenceClass,
Expression selectionCriteria)
PUBLIC: Create a new update all query for the class and the selection criteria specified. |
Method Summary | |
---|---|
protected void |
clonedQueryExecutionComplete(DatabaseQuery query,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL Used to give the subclasses opportunity to copy aspects of the cloned query to the original query. |
java.lang.Object |
executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
INTERNAL: Override query execution where Session is a UnitOfWork. |
int |
getCacheUsage()
PUBLIC: Return the cache usage for this query. |
ExpressionBuilder |
getExpressionBuilder()
PUBLIC: Get the expression builder which should be used for this query. |
java.lang.Class |
getReferenceClass()
PUBLIC: Return the reference class for this query. |
java.lang.String |
getReferenceClassName()
INTERNAL: Return the name of the reference class of the query. |
protected void |
initializeDefaultBuilder()
INTERNAL: Initialize the expression builder which should be used for this query. |
protected void |
initializeQuerySpecificDefaultBuilder()
INTERNAL: Initialize the expression builder which should be used for this query. |
protected void |
invalidateCache()
INTERNAL: Invalid the cache, that is, those objects in the cache that were affected by the query. |
boolean |
isModifyQuery()
PUBLIC: Return true if this is a modify query. |
boolean |
isPreparedUsingTempStorage()
INTERNAL: |
void |
mergeChangesIntoSharedCache()
INTERNAL: After execution we need to merge the changes into the shared cache |
void |
setCacheUsage(int cacheUsage)
PUBLIC: Set the level of cache support for this query, either NONE or INVALIDATE. |
void |
setExpressionBuilder(ExpressionBuilder builder)
INTERNAL Sets the default expression builder for this query. |
void |
setIsPreparedUsingTempStorage(boolean isPreparedUsingTempStorage)
INTERNAL: |
void |
setReferenceClass(java.lang.Class referenceClass)
PUBLIC: Set the reference class this query. |
void |
setReferenceClassName(java.lang.String className)
INTERNAL: Set the class name of the reference class of this query. |
void |
setShouldDeferExecutionInUOW(boolean shouldDeferExecutionInUOW)
PUBLIC: Set a flag indicating whether execution should be deferred in UOW until commit. |
boolean |
shouldDeferExecutionInUOW()
PUBLIC: Indicates whether execution should be deferred in UOW until commit. |
protected boolean |
shouldInvalidateCache()
INTERNAL: |
Methods inherited from class org.eclipse.persistence.queries.ModifyQuery |
---|
forceBatchStatementExecution, getModifyRow, setForceBatchStatementExecution, setModifyRow |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_CACHE
public static final int INVALIDATE_CACHE
protected java.lang.Class referenceClass
protected java.lang.String referenceClassName
protected transient java.lang.Integer result
protected ExpressionBuilder defaultBuilder
protected boolean isPreparedUsingTempStorage
Constructor Detail |
---|
public ModifyAllQuery()
public ModifyAllQuery(java.lang.Class referenceClass)
public ModifyAllQuery(java.lang.Class referenceClass, Expression selectionCriteria)
Method Detail |
---|
public boolean isModifyQuery()
isModifyQuery
in class ModifyQuery
public void setIsPreparedUsingTempStorage(boolean isPreparedUsingTempStorage)
public boolean isPreparedUsingTempStorage()
protected void clonedQueryExecutionComplete(DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
clonedQueryExecutionComplete
in class DatabaseQuery
public java.lang.Object executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) throws DatabaseException, OptimisticLockException
If there are objects in the cache return the results of the cache lookup.
executeInUnitOfWork
in class DatabaseQuery
unitOfWork
- - the session in which the receiver will be executed.translationRow
- - the arguments
DatabaseException
- - an error has occurred on the database.
OptimisticLockException
- - an error has occurred using the optimistic lock feature.public int getCacheUsage()
public ExpressionBuilder getExpressionBuilder()
public void setExpressionBuilder(ExpressionBuilder builder)
public java.lang.String getReferenceClassName()
getReferenceClassName
in class DatabaseQuery
public java.lang.Class getReferenceClass()
getReferenceClass
in class DatabaseQuery
protected void invalidateCache()
public void mergeChangesIntoSharedCache()
public void setCacheUsage(int cacheUsage)
public void setReferenceClass(java.lang.Class referenceClass)
public void setReferenceClassName(java.lang.String className)
public void setShouldDeferExecutionInUOW(boolean shouldDeferExecutionInUOW)
public boolean shouldDeferExecutionInUOW()
protected boolean shouldInvalidateCache()
protected void initializeDefaultBuilder()
protected void initializeQuerySpecificDefaultBuilder()
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |