Class IndexedListAttributeFlusher<E,V extends List<?>>
java.lang.Object
com.blazebit.persistence.view.impl.update.flush.AttributeFetchGraphNode<X>
com.blazebit.persistence.view.impl.update.flush.AbstractPluralAttributeFlusher<CollectionAttributeFlusher<E,V>,CollectionAction<?>,RecordingCollection<?,?>,E,V>
com.blazebit.persistence.view.impl.update.flush.CollectionAttributeFlusher<E,V>
com.blazebit.persistence.view.impl.update.flush.IndexedListAttributeFlusher<E,V>
- All Implemented Interfaces:
DirtyChecker<V>
,PluralDirtyChecker<V,E>
,DirtyAttributeFlusher<CollectionAttributeFlusher<E,V>,E,V>
,FetchGraphNode<CollectionAttributeFlusher<E,V>>
public class IndexedListAttributeFlusher<E,V extends List<?>> extends CollectionAttributeFlusher<E,V>
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from class com.blazebit.persistence.view.impl.update.flush.AbstractPluralAttributeFlusher
AbstractPluralAttributeFlusher.DeepEqualityChecker, AbstractPluralAttributeFlusher.EntityIdWithViewIdEqualityChecker, AbstractPluralAttributeFlusher.EntityWithViewEqualityChecker, AbstractPluralAttributeFlusher.EntryState, AbstractPluralAttributeFlusher.EqualityChecker, AbstractPluralAttributeFlusher.EqualsEqualityChecker, AbstractPluralAttributeFlusher.IdentityEqualityChecker, AbstractPluralAttributeFlusher.PluralFlushOperation
Nested classes/interfaces inherited from interface com.blazebit.persistence.view.impl.change.DirtyChecker
DirtyChecker.DirtyKind
-
Field Summary
Fields inherited from class com.blazebit.persistence.view.impl.update.flush.AbstractPluralAttributeFlusher
cascadeDeleteListener, collectionActions, collectionUpdatable, elementDescriptor, elementDirtyChecker, elementEqualityChecker, elementFlusher, elementFlushers, entityAttributeAccessor, flushOperation, flushStrategy, jpaProviderDeletesCollection, optimisticLockProtected, ownerEntityClass, ownerIdAttributeName, ownerIdBindFragments, ownerIdFlusher, ownerIdWhereFragment, ownerMapping, removeListener, replaceWithReferenceContents, supportsCollectionDml, viewAttributeAccessor, viewOnlyDeleteCascaded
Fields inherited from class com.blazebit.persistence.view.impl.update.flush.AttributeFetchGraphNode
attributeName, fetch, mapping
-
Constructor Summary
Constructors Constructor Description IndexedListAttributeFlusher(IndexedListAttributeFlusher<E,V> original, boolean fetch)
IndexedListAttributeFlusher(IndexedListAttributeFlusher<E,V> original, boolean fetch, AbstractPluralAttributeFlusher.PluralFlushOperation flushOperation, List<? extends CollectionAction<?>> collectionActions, List<CollectionElementAttributeFlusher<E,V>> elementFlushers)
IndexedListAttributeFlusher(String attributeName, String mapping, Class<?> ownerEntityClass, String ownerIdAttributeName, String ownerMapping, DirtyAttributeFlusher<?,?,?> ownerIdFlusher, DirtyAttributeFlusher<?,?,?> elementFlusher, boolean supportsCollectionDml, FlushStrategy flushStrategy, AttributeAccessor attributeMapper, InitialValueAttributeAccessor viewAttributeAccessor, boolean optimisticLockProtected, boolean collectionUpdatable, boolean viewOnlyDeleteCascaded, boolean jpaProviderDeletesCollection, CollectionRemoveListener cascadeDeleteListener, CollectionRemoveListener removeListener, CollectionInstantiatorImplementor<?,?> collectionInstantiator, TypeDescriptor elementDescriptor, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy)
-
Method Summary
Modifier and Type Method Description protected void
addElements(UpdateContext context, Object ownerView, Object view, Collection<Object> removedAllObjects, boolean flushAtOnce, boolean removedAllWithoutCollectionActions, V value, List<Object> embeddablesToUpdate, FusedCollectionActions fusedCollectionActions, boolean initialKnown)
protected void
addFlatViewElementFlushActions(UpdateContext context, TypeDescriptor typeDescriptor, List<CollectionAction<?>> actions, V current)
protected Collection<Object>
appendRemoveSpecific(UpdateContext context, DeleteCriteriaBuilder<?> deleteCb, FusedCollectionActions fusedCollectionActions)
protected boolean
canFlushSeparateCollectionOperations()
protected boolean
collectionEquals(V initial, V current)
protected List<CollectionAction<Collection<?>>>
determineCollectionActions(UpdateContext context, V initial, V current, AbstractPluralAttributeFlusher.EqualityChecker equalityChecker)
protected List<CollectionAction<Collection<?>>>
determineJpaCollectionActions(UpdateContext context, V jpaCollection, V value, AbstractPluralAttributeFlusher.EqualityChecker equalityChecker)
DirtyChecker.DirtyKind
getDirtyKind(V initial, V current)
Returns the dirty kind of the objects.protected FusedCollectionActions
getFusedOperations(List<? extends CollectionAction<?>> collectionActions)
protected boolean
isIndexed()
protected boolean
mergeAndRequeue(UpdateContext context, RecordingCollection recordingCollection, Collection<Object> newCollection)
protected CollectionAttributeFlusher<E,V>
partialFlusher(boolean fetch, AbstractPluralAttributeFlusher.PluralFlushOperation operation, List<? extends CollectionAction<?>> collectionActions, List<CollectionElementAttributeFlusher<E,V>> elementFlushers)
protected List<CollectionAction<Collection<?>>>
replaceActions(V value)
Methods inherited from class com.blazebit.persistence.view.impl.update.flush.CollectionAttributeFlusher
areActionsQueueable, cloneDeep, createCollection, createCollectionDeleter, createJpaCollection, createJpaCollection, createMergeFlusher, createPersistFlusher, createRecordingCollection, deleteElements, determineCollectionActionsForNonSubview, determineCollectionActionsForSubview, determineDirtyFlusherForNewCollection, executeActions, flushCollectionOperations, flushEntity, flushQuery, getActionUnrelatedDirtyObjectCount, getDirtyFlusher, getDirtyFlusherForRecordingCollection, getElementDirtyChecker, getElementFlushers, getEntityReferencesForCollectionOperation, getNestedCheckers, getNewInitialValue, invokeCollectionAction, isViewOnlyDeleteCascaded, mergeCollectionElements, mergeWith, remove, remove, removeByOwnerId, removeFromEntity, replaceCollection, replaceWithRecordingCollection, requiresDeferredFlush, requiresDeleteCascadeAfterRemove, requiresFlushAfterPersist, supportsQueryFlush
Methods inherited from class com.blazebit.persistence.view.impl.update.flush.AbstractPluralAttributeFlusher
appendUpdateQueryFragment, determineElementFlushers, getElementIdAttributeName, getElementOnlyFlusher, getEntityAttributeAccessor, getEntityAttributeValue, getLockOwner, getMapping, getNestedGraphNode, getReplaceOrMergeAndElementFlusher, getReplaceOrMergeOnlyFlusher, getReplayAndElementFlusher, getReplayOnlyFlusher, getViewAttributeAccessor, getViewElement, identityContains, invokeFlushOperation, isOptimisticLockProtected, isPassThrough, loadForEntityFlush, persistIfNeeded, persistOrMerge, persistOrMerge
Methods inherited from class com.blazebit.persistence.view.impl.update.flush.AttributeFetchGraphNode
appendFetchJoinQueryFragment, getAttributeName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.blazebit.persistence.view.impl.update.flush.DirtyAttributeFlusher
appendFetchJoinQueryFragment, appendUpdateQueryFragment, getElementIdAttributeName, getEntityAttributeAccessor, getLockOwner, getViewAttributeAccessor, isOptimisticLockProtected, isPassThrough, loadForEntityFlush
Methods inherited from interface com.blazebit.persistence.view.impl.update.flush.FetchGraphNode
getAttributeName, getMapping
-
Constructor Details
-
IndexedListAttributeFlusher
public IndexedListAttributeFlusher(String attributeName, String mapping, Class<?> ownerEntityClass, String ownerIdAttributeName, String ownerMapping, DirtyAttributeFlusher<?,?,?> ownerIdFlusher, DirtyAttributeFlusher<?,?,?> elementFlusher, boolean supportsCollectionDml, FlushStrategy flushStrategy, AttributeAccessor attributeMapper, InitialValueAttributeAccessor viewAttributeAccessor, boolean optimisticLockProtected, boolean collectionUpdatable, boolean viewOnlyDeleteCascaded, boolean jpaProviderDeletesCollection, CollectionRemoveListener cascadeDeleteListener, CollectionRemoveListener removeListener, CollectionInstantiatorImplementor<?,?> collectionInstantiator, TypeDescriptor elementDescriptor, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy) -
IndexedListAttributeFlusher
-
IndexedListAttributeFlusher
public IndexedListAttributeFlusher(IndexedListAttributeFlusher<E,V> original, boolean fetch, AbstractPluralAttributeFlusher.PluralFlushOperation flushOperation, List<? extends CollectionAction<?>> collectionActions, List<CollectionElementAttributeFlusher<E,V>> elementFlushers)
-
-
Method Details
-
collectionEquals
- Overrides:
collectionEquals
in classCollectionAttributeFlusher<E,V extends List<?>>
-
mergeAndRequeue
protected boolean mergeAndRequeue(UpdateContext context, RecordingCollection recordingCollection, Collection<Object> newCollection)- Overrides:
mergeAndRequeue
in classCollectionAttributeFlusher<E,V extends List<?>>
-
partialFlusher
protected CollectionAttributeFlusher<E,V> partialFlusher(boolean fetch, AbstractPluralAttributeFlusher.PluralFlushOperation operation, List<? extends CollectionAction<?>> collectionActions, List<CollectionElementAttributeFlusher<E,V>> elementFlushers)- Overrides:
partialFlusher
in classCollectionAttributeFlusher<E,V extends List<?>>
-
getDirtyKind
Description copied from interface:DirtyChecker
Returns the dirty kind of the objects.- Specified by:
getDirtyKind
in interfaceDirtyChecker<E>
- Overrides:
getDirtyKind
in classCollectionAttributeFlusher<E,V extends List<?>>
- Returns:
- The dirty kind
-
replaceActions
- Overrides:
replaceActions
in classCollectionAttributeFlusher<E,V extends List<?>>
-
appendRemoveSpecific
protected Collection<Object> appendRemoveSpecific(UpdateContext context, DeleteCriteriaBuilder<?> deleteCb, FusedCollectionActions fusedCollectionActions)- Overrides:
appendRemoveSpecific
in classCollectionAttributeFlusher<E,V extends List<?>>
-
addElements
protected void addElements(UpdateContext context, Object ownerView, Object view, Collection<Object> removedAllObjects, boolean flushAtOnce, boolean removedAllWithoutCollectionActions, V value, List<Object> embeddablesToUpdate, FusedCollectionActions fusedCollectionActions, boolean initialKnown)- Overrides:
addElements
in classCollectionAttributeFlusher<E,V extends List<?>>
-
canFlushSeparateCollectionOperations
protected boolean canFlushSeparateCollectionOperations()- Overrides:
canFlushSeparateCollectionOperations
in classCollectionAttributeFlusher<E,V extends List<?>>
-
isIndexed
protected boolean isIndexed()- Overrides:
isIndexed
in classCollectionAttributeFlusher<E,V extends List<?>>
-
addFlatViewElementFlushActions
protected void addFlatViewElementFlushActions(UpdateContext context, TypeDescriptor typeDescriptor, List<CollectionAction<?>> actions, V current)- Overrides:
addFlatViewElementFlushActions
in classCollectionAttributeFlusher<E,V extends List<?>>
-
getFusedOperations
protected FusedCollectionActions getFusedOperations(List<? extends CollectionAction<?>> collectionActions)- Overrides:
getFusedOperations
in classCollectionAttributeFlusher<E,V extends List<?>>
-
determineJpaCollectionActions
protected List<CollectionAction<Collection<?>>> determineJpaCollectionActions(UpdateContext context, V jpaCollection, V value, AbstractPluralAttributeFlusher.EqualityChecker equalityChecker)- Overrides:
determineJpaCollectionActions
in classCollectionAttributeFlusher<E,V extends List<?>>
-
determineCollectionActions
protected List<CollectionAction<Collection<?>>> determineCollectionActions(UpdateContext context, V initial, V current, AbstractPluralAttributeFlusher.EqualityChecker equalityChecker)- Overrides:
determineCollectionActions
in classCollectionAttributeFlusher<E,V extends List<?>>
-