| Modifier and Type | Field and Description |
|---|---|
| protected ExpressionBuilder | defaultBuilder
Provide a default builder so that it's easier to be consistent |
| public static final int | |
| protected boolean | isPreparedUsingTempStorage
Indicates whether the query was prepared so that it will execute using temp storage |
| private int | |
| public static final int | NO_CACHE
Cache usage flags |
| protected Class | |
| protected String | |
| protected transient Integer | result
Number of modified objects |
| private boolean | shouldDeferExecutionInUOW
Indicates whether execution should be deferred in UOW |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | ModifyAllQuery(Class<?> referenceClass)
PUBLIC: Create a new update all query for the class specified. |
| protected | ModifyAllQuery(Class<?> referenceClass, Expression selectionCriteria)
PUBLIC: Create a new update all query for the class and the selection criteria specified. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | clonedQueryExecutionComplete(DatabaseQuery query, AbstractSession session)
Overrides org. |
| public Object | Returns: An object, the result of executing the query.- the session in which the receiver will be executed. unitOfWork, AbstractRecord - the arguments translationRow)Overrides org. |
| public int | |
| public ExpressionBuilder | |
| public Class | getReferenceClass()
Overrides org. |
| public String | getReferenceClassName()
Overrides org. |
| 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. |
| public boolean | isModifyAllQuery()
Overrides org. |
| public boolean | |
| public void | mergeChangesIntoSharedCache()
INTERNAL: After execution we need to merge the changes into the shared cache, unless the query has been tagged to bypass on the store. |
| public void | setCacheUsage(int cacheUsage)
PUBLIC: Set the level of cache support for this query, either NONE or INVALIDATE. |
| public void | setExpressionBuilder(ExpressionBuilder builder)
INTERNAL Sets the default expression builder for this query. |
| public void | |
| public void | |
| public void | setReferenceClassName(String className)
INTERNAL: Set the class name of the reference class of this query. |
| public void | setShouldDeferExecutionInUOW(boolean shouldDeferExecutionInUOW)
PUBLIC: Set a flag indicating whether execution should be deferred in UOW until commit. |
| public boolean | shouldDeferExecutionInUOW()
PUBLIC: Indicates whether execution should be deferred in UOW until commit. |
| protected boolean |
| defaultBuilder | back to summary |
|---|---|
| protected ExpressionBuilder defaultBuilder Provide a default builder so that it's easier to be consistent | |
| INVALIDATE_CACHE | back to summary |
|---|---|
| public static final int INVALIDATE_CACHE | |
| isPreparedUsingTempStorage | back to summary |
|---|---|
| protected boolean isPreparedUsingTempStorage Indicates whether the query was prepared so that it will execute using temp storage | |
| m_cacheUsage | back to summary |
|---|---|
| private int m_cacheUsage | |
| NO_CACHE | back to summary |
|---|---|
| public static final int NO_CACHE Cache usage flags | |
| referenceClass | back to summary |
|---|---|
| protected Class<?> referenceClass | |
| referenceClassName | back to summary |
|---|---|
| protected String referenceClassName | |
| result | back to summary |
|---|---|
| protected transient Integer result Number of modified objects | |
| shouldDeferExecutionInUOW | back to summary |
|---|---|
| private boolean shouldDeferExecutionInUOW Indicates whether execution should be deferred in UOW | |
| ModifyAllQuery | back to summary |
|---|---|
| protected ModifyAllQuery() PUBLIC: | |
| ModifyAllQuery | back to summary |
|---|---|
| protected ModifyAllQuery(Class<?> referenceClass) PUBLIC: Create a new update all query for the class specified. | |
| ModifyAllQuery | back to summary |
|---|---|
| protected ModifyAllQuery(Class<?> referenceClass, Expression selectionCriteria) PUBLIC: Create a new update all query for the class and the selection criteria specified. | |
| clonedQueryExecutionComplete | back to summary |
|---|---|
| protected void clonedQueryExecutionComplete(DatabaseQuery query, AbstractSession session) Overrides org. INTERNAL Used to give the subclasses opportunity to copy aspects of the cloned query to the original query. The clones of all the ModifyAllQueries will be added to modifyAllQueries for validation.
| |
| executeInUnitOfWork | back to summary |
|---|---|
| public Object executeInUnitOfWork(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Override query execution where Session is a UnitOfWork. If there are objects in the cache return the results of the cache lookup.
| |
| getCacheUsage | back to summary |
|---|---|
| public int getCacheUsage() PUBLIC: Return the cache usage for this query. | |
| getExpressionBuilder | back to summary |
|---|---|
| public ExpressionBuilder getExpressionBuilder() PUBLIC: Get the expression builder which should be used for this query. This expression builder should be used to build all expressions used by this query. | |
| getReferenceClass | back to summary |
|---|---|
| public Class Overrides org. PUBLIC: Return the reference class for this query.
| |
| getReferenceClassName | back to summary |
|---|---|
| public String getReferenceClassName() Overrides org. INTERNAL: Return the name of the reference class of the query. Used by the Mapping Workbench to avoid classpath dependencies
| |
| initializeDefaultBuilder | back to summary |
|---|---|
| protected void initializeDefaultBuilder() INTERNAL: Initialize the expression builder which should be used for this query. If there is a where clause, use its expression builder, otherwise generate one and cache it. This helps avoid unnecessary rebuilds. | |
| initializeQuerySpecificDefaultBuilder | back to summary |
|---|---|
| protected void initializeQuerySpecificDefaultBuilder() INTERNAL: Initialize the expression builder which should be used for this query. If there is a where clause, use its expression builder. If after this method defaultBuilder is still null, then initializeDefaultBuilder method will generate and cache it. | |
| invalidateCache | back to summary |
|---|---|
| protected void invalidateCache() INTERNAL: Invalid the cache, that is, those objects in the cache that were affected by the query. | |
| isModifyAllQuery | back to summary |
|---|---|
| public boolean isModifyAllQuery() Overrides org. PUBLIC: Return true if this is a modify all query.
| |
| isPreparedUsingTempStorage | back to summary |
|---|---|
| public boolean isPreparedUsingTempStorage() INTERNAL: | |
| mergeChangesIntoSharedCache | back to summary |
|---|---|
| public void mergeChangesIntoSharedCache() INTERNAL: After execution we need to merge the changes into the shared cache, unless the query has been tagged to bypass on the store. | |
| setCacheUsage | back to summary |
|---|---|
| public void setCacheUsage(int cacheUsage) PUBLIC: Set the level of cache support for this query, either NONE or INVALIDATE. | |
| setExpressionBuilder | back to summary |
|---|---|
| public void setExpressionBuilder(ExpressionBuilder builder) INTERNAL Sets the default expression builder for this query. | |
| setIsPreparedUsingTempStorage | back to summary |
|---|---|
| public void setIsPreparedUsingTempStorage(boolean isPreparedUsingTempStorage) INTERNAL: | |
| setReferenceClass | back to summary |
|---|---|
| public void setReferenceClass(Class<?> referenceClass) PUBLIC: Set the reference class this query. | |
| setReferenceClassName | back to summary |
|---|---|
| public void setReferenceClassName(String className) INTERNAL: Set the class name of the reference class of this query. Used by the Mapping Workbench to avoid classpath dependencies. | |
| setShouldDeferExecutionInUOW | back to summary |
|---|---|
| public void setShouldDeferExecutionInUOW(boolean shouldDeferExecutionInUOW) PUBLIC: Set a flag indicating whether execution should be deferred in UOW until commit. | |
| shouldDeferExecutionInUOW | back to summary |
|---|---|
| public boolean shouldDeferExecutionInUOW() PUBLIC: Indicates whether execution should be deferred in UOW until commit. | |
| shouldInvalidateCache | back to summary |
|---|---|
| protected boolean shouldInvalidateCache() INTERNAL: | |