Class CollectionElementAttributeFlusher<E,V>
java.lang.Object
com.blazebit.persistence.view.impl.update.flush.CollectionElementFetchGraphNode<CollectionElementAttributeFlusher<E,V>,DirtyAttributeFlusher<?,E,V>>
com.blazebit.persistence.view.impl.update.flush.CollectionElementAttributeFlusher<E,V>
- All Implemented Interfaces:
DirtyChecker<V>,DirtyAttributeFlusher<CollectionElementAttributeFlusher<E,,V>, E, V> FetchGraphNode<CollectionElementAttributeFlusher<E,V>>
- Direct Known Subclasses:
CascadingCollectionElementAttributeFlusher,InverseCollectionElementAttributeFlusher,MergeCollectionElementAttributeFlusher,PersistCollectionElementAttributeFlusher,UpdateCollectionElementAttributeFlusher
public abstract class CollectionElementAttributeFlusher<E,V>
extends CollectionElementFetchGraphNode<CollectionElementAttributeFlusher<E,V>,DirtyAttributeFlusher<?,E,V>>
implements DirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>,E,V>
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blazebit.persistence.view.impl.change.DirtyChecker
DirtyChecker.DirtyKind -
Field Summary
FieldsFields inherited from class com.blazebit.persistence.view.impl.update.flush.CollectionElementFetchGraphNode
nestedGraphNode -
Constructor Summary
ConstructorsConstructorDescriptionCollectionElementAttributeFlusher(DirtyAttributeFlusher<?, E, V> nestedGraphNode, Object element, boolean optimisticLockProtected) -
Method Summary
Modifier and TypeMethodDescriptionbooleanappendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) booleanflushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener) javax.persistence.QueryflushQuery(UpdateContext context, String parameterPrefix, UpdateQueryFactory queryFactory, javax.persistence.Query query, Object ownerView, Object view, V value, UnmappedOwnerAwareDeleter ownerAwareDeleter, DirtyAttributeFlusher<?, ?, ?> ownerFlusher) getDirtyFlusher(UpdateContext context, Object view, Object initial, Object current) getDirtyKind(V initial, V current) Returns the dirty kind of the objects.<X> DirtyChecker<X>[]getNestedCheckers(V current) getNewInitialValue(UpdateContext context, V clonedValue, V currentValue) booleanbooleanbooleanbooleanremove(UpdateContext context, E entity, Object view, V value) voidremove(UpdateContext context, Object id) removeByOwnerId(UpdateContext context, Object id) voidremoveFromEntity(UpdateContext context, E entity) booleanrequiresDeferredFlush(V value) booleanbooleanrequiresFlushAfterPersist(V value) booleanMethods inherited from class com.blazebit.persistence.view.impl.update.flush.CollectionElementFetchGraphNode
appendFetchJoinQueryFragment, getAttributeName, getMapping, mergeWithMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blazebit.persistence.view.impl.update.flush.DirtyAttributeFlusher
appendFetchJoinQueryFragmentMethods inherited from interface com.blazebit.persistence.view.impl.update.flush.FetchGraphNode
getAttributeName, getMapping, mergeWith
-
Field Details
-
element
-
-
Constructor Details
-
CollectionElementAttributeFlusher
public CollectionElementAttributeFlusher(DirtyAttributeFlusher<?, E, V> nestedGraphNode, Object element, boolean optimisticLockProtected)
-
-
Method Details
-
getElement
-
cloneDeep
- Specified by:
cloneDeepin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
getNewInitialValue
- Specified by:
getNewInitialValuein interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) - Specified by:
appendUpdateQueryFragmentin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlushin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlushin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
flushQuery
public javax.persistence.Query flushQuery(UpdateContext context, String parameterPrefix, UpdateQueryFactory queryFactory, javax.persistence.Query query, Object ownerView, Object view, V value, UnmappedOwnerAwareDeleter ownerAwareDeleter, DirtyAttributeFlusher<?, ?, ?> ownerFlusher) - Specified by:
flushQueryin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
flushEntity
public boolean flushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener) - Specified by:
flushEntityin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
removeByOwnerId
- Specified by:
removeByOwnerIdin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
removeFromEntity
- Specified by:
removeFromEntityin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeNamein interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemovein interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascadedin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThroughin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessorin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessorin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
getLockOwner
- Specified by:
getLockOwnerin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtectedin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersistin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlushin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-
getNestedCheckers
- Specified by:
getNestedCheckersin interfaceDirtyChecker<E>
-
getDirtyKind
Description copied from interface:DirtyCheckerReturns the dirty kind of the objects.- Specified by:
getDirtyKindin interfaceDirtyChecker<E>- Returns:
- The dirty kind
-
getDirtyFlusher
public DirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, getDirtyFlusherE, V> (UpdateContext context, Object view, Object initial, Object current) - Specified by:
getDirtyFlusherin interfaceDirtyAttributeFlusher<CollectionElementAttributeFlusher<E,V>, E, V>
-