DirtyChecker<E>
, MapDirtyChecker<V,java.lang.Object,E>
, PluralDirtyChecker<E,V>
, DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V>
, FetchGraphNode<E>
public class MapAttributeFlusher<E,V extends java.util.Map<?,?>> extends AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V>,MapAction<?>,RecordingMap<?,?,?>,E,V> implements DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V>, MapDirtyChecker<V,java.lang.Object,E>
AbstractPluralAttributeFlusher.DeepEqualityChecker, AbstractPluralAttributeFlusher.EntityIdWithViewIdEqualityChecker, AbstractPluralAttributeFlusher.EntityWithViewEqualityChecker, AbstractPluralAttributeFlusher.EqualityChecker, AbstractPluralAttributeFlusher.EqualsEqualityChecker, AbstractPluralAttributeFlusher.IdentityEqualityChecker, AbstractPluralAttributeFlusher.PluralFlushOperation
DirtyChecker.DirtyKind
cascadeDeleteListener, collectionActions, collectionUpdatable, elementDescriptor, elementDirtyChecker, elementEqualityChecker, elementFlushers, entityAttributeMapper, flushOperation, flushStrategy, jpaProviderDeletesCollection, optimisticLockProtected, ownerEntityClass, ownerIdAttributeName, removeListener, viewAttributeAccessor, viewOnlyDeleteCascaded
attributeName, fetch, mapping, nestedGraphNode
Modifier | Constructor | Description |
---|---|---|
protected |
MapAttributeFlusher(MapAttributeFlusher original,
boolean fetch) |
|
protected |
MapAttributeFlusher(MapAttributeFlusher original,
boolean fetch,
AbstractPluralAttributeFlusher.PluralFlushOperation flushOperation,
java.util.List<? extends MapAction<?>> collectionActions,
java.util.List<CollectionElementAttributeFlusher<E,V>> elementFlushers) |
|
|
MapAttributeFlusher(java.lang.String attributeName,
java.lang.String mapping,
java.lang.Class<?> ownerEntityClass,
java.lang.String ownerIdAttributeName,
FlushStrategy flushStrategy,
AttributeAccessor attributeMapper,
InitialValueAttributeAccessor viewAttributeAccessor,
boolean optimisticLockProtected,
boolean collectionUpdatable,
CollectionRemoveListener keyCascadeDeleteListener,
CollectionRemoveListener elementCascadeDeleteListener,
CollectionRemoveListener keyRemoveListener,
CollectionRemoveListener elementRemoveListener,
boolean viewOnlyDeleteCascaded,
boolean jpaProviderDeletesCollection,
TypeDescriptor keyDescriptor,
TypeDescriptor elementDescriptor,
MapViewToEntityMapper mapper,
MapViewToEntityMapper loadOnlyMapper,
MapInstantiator<?,?> mapInstantiator) |
Modifier and Type | Method | Description |
---|---|---|
V |
cloneDeep(java.lang.Object view,
V oldValue,
V newValue) |
|
protected boolean |
collectionEquals(V initial,
V current) |
|
protected V |
createJpaCollection() |
|
protected V |
createJpaMap(int size) |
|
protected V |
createMap(int size) |
|
protected RecordingMap<?,?,?> |
createRecordingMap(int size) |
|
protected java.util.List<MapAction<java.util.Map<java.lang.Object,java.lang.Object>>> |
determineCollectionActions(UpdateContext context,
V initial,
V current,
AbstractPluralAttributeFlusher.EqualityChecker equalityChecker) |
|
protected DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V> |
determineDirtyFlusherForNewCollection(UpdateContext context,
V initial,
V current) |
|
protected java.util.List<MapAction<java.util.Map<java.lang.Object,java.lang.Object>>> |
determineJpaCollectionActions(UpdateContext context,
V initial,
V current,
AbstractPluralAttributeFlusher.EqualityChecker equalityChecker) |
|
boolean |
flushEntity(UpdateContext context,
E entity,
java.lang.Object view,
V value,
java.lang.Runnable postReplaceListener) |
|
DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V> |
getDirtyFlusher(UpdateContext context,
java.lang.Object view,
java.lang.Object initial,
java.lang.Object current) |
|
protected DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V> |
getDirtyFlusherForRecordingCollection(UpdateContext context,
V initial,
RecordingMap<?,?,?> collection) |
|
DirtyChecker.DirtyKind |
getDirtyKind(V initial,
V current) |
Returns the dirty kind of the objects.
|
DirtyChecker<E> |
getElementDirtyChecker(E element) |
|
protected java.util.List<CollectionElementAttributeFlusher<E,V>> |
getElementFlushers(UpdateContext context,
V current) |
|
DirtyChecker<java.lang.Object> |
getKeyDirtyChecker(java.lang.Object element) |
|
<X> DirtyChecker<X>[] |
getNestedCheckers(V current) |
|
java.lang.Object |
getNewInitialValue(UpdateContext context,
V clonedValue,
V currentValue) |
|
protected void |
invokeCollectionAction(UpdateContext context,
V targetCollection,
java.util.List<? extends MapAction<?>> collectionActions) |
|
boolean |
isPassThrough() |
|
boolean |
isViewOnlyDeleteCascaded() |
|
protected boolean |
mergeCollectionElements(UpdateContext context,
java.lang.Object view,
E entity,
V value) |
|
protected MapAttributeFlusher<E,V> |
partialFlusher(boolean fetch,
AbstractPluralAttributeFlusher.PluralFlushOperation operation,
java.util.List<? extends MapAction<?>> collectionActions,
java.util.List<CollectionElementAttributeFlusher<E,V>> elementFlushers) |
|
protected <X> X |
persistOrMergeKey(UpdateContext context,
javax.persistence.EntityManager em,
X object) |
|
java.util.List<PostFlushDeleter> |
remove(UpdateContext context,
E entity,
java.lang.Object view,
V value) |
|
void |
remove(UpdateContext context,
java.lang.Object id) |
|
java.util.List<PostFlushDeleter> |
removeByOwnerId(UpdateContext context,
java.lang.Object id) |
|
void |
removeFromEntity(UpdateContext context,
E entity) |
|
protected void |
replaceCollection(UpdateContext context,
E entity,
V value) |
|
protected V |
replaceWithRecordingCollection(UpdateContext context,
java.lang.Object view,
V value,
java.util.List<? extends MapAction<?>> actions) |
|
boolean |
requiresDeleteCascadeAfterRemove() |
appendUpdateQueryFragment, determineElementFlushers, flushQuery, getElementIdAttributeName, getElementOnlyFlusher, getEntityAttributeValue, getReplaceOrMergeAndElementFlusher, getReplaceOrMergeOnlyFlusher, getReplayAndElementFlusher, getReplayOnlyFlusher, getViewAttributeAccessor, invokeFlushOperation, isOptimisticLockProtected, loadForEntityFlush, persistIfNeeded, persistOrMerge, persistOrMerge, requiresFlushAfterPersist, supportsQueryFlush
appendFetchJoinQueryFragment, getAttributeName, mergeWith
appendFetchJoinQueryFragment, appendUpdateQueryFragment, flushQuery, getElementIdAttributeName, getViewAttributeAccessor, isOptimisticLockProtected, loadForEntityFlush, requiresFlushAfterPersist, supportsQueryFlush
getAttributeName, mergeWith
public MapAttributeFlusher(java.lang.String attributeName, java.lang.String mapping, java.lang.Class<?> ownerEntityClass, java.lang.String ownerIdAttributeName, FlushStrategy flushStrategy, AttributeAccessor attributeMapper, InitialValueAttributeAccessor viewAttributeAccessor, boolean optimisticLockProtected, boolean collectionUpdatable, CollectionRemoveListener keyCascadeDeleteListener, CollectionRemoveListener elementCascadeDeleteListener, CollectionRemoveListener keyRemoveListener, CollectionRemoveListener elementRemoveListener, boolean viewOnlyDeleteCascaded, boolean jpaProviderDeletesCollection, TypeDescriptor keyDescriptor, TypeDescriptor elementDescriptor, MapViewToEntityMapper mapper, MapViewToEntityMapper loadOnlyMapper, MapInstantiator<?,?> mapInstantiator)
protected MapAttributeFlusher(MapAttributeFlusher original, boolean fetch)
protected MapAttributeFlusher(MapAttributeFlusher original, boolean fetch, AbstractPluralAttributeFlusher.PluralFlushOperation flushOperation, java.util.List<? extends MapAction<?>> collectionActions, java.util.List<CollectionElementAttributeFlusher<E,V>> elementFlushers)
protected V createMap(int size)
protected V createJpaMap(int size)
protected V createJpaCollection()
createJpaCollection
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected RecordingMap<?,?,?> createRecordingMap(int size)
public V cloneDeep(java.lang.Object view, V oldValue, V newValue)
cloneDeep
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public java.lang.Object getNewInitialValue(UpdateContext context, V clonedValue, V currentValue)
getNewInitialValue
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public boolean isPassThrough()
isPassThrough
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
isPassThrough
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected void invokeCollectionAction(UpdateContext context, V targetCollection, java.util.List<? extends MapAction<?>> collectionActions)
invokeCollectionAction
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected V replaceWithRecordingCollection(UpdateContext context, java.lang.Object view, V value, java.util.List<? extends MapAction<?>> actions)
replaceWithRecordingCollection
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
public boolean flushEntity(UpdateContext context, E entity, java.lang.Object view, V value, java.lang.Runnable postReplaceListener)
flushEntity
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public java.util.List<PostFlushDeleter> remove(UpdateContext context, E entity, java.lang.Object view, V value)
remove
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public java.util.List<PostFlushDeleter> removeByOwnerId(UpdateContext context, java.lang.Object id)
removeByOwnerId
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public void remove(UpdateContext context, java.lang.Object id)
remove
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public void removeFromEntity(UpdateContext context, E entity)
removeFromEntity
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public boolean requiresDeleteCascadeAfterRemove()
requiresDeleteCascadeAfterRemove
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
public boolean isViewOnlyDeleteCascaded()
isViewOnlyDeleteCascaded
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
protected final <X> X persistOrMergeKey(UpdateContext context, javax.persistence.EntityManager em, X object)
protected boolean mergeCollectionElements(UpdateContext context, java.lang.Object view, E entity, V value)
mergeCollectionElements
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected void replaceCollection(UpdateContext context, E entity, V value)
replaceCollection
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
public <X> DirtyChecker<X>[] getNestedCheckers(V current)
getNestedCheckers
in interface DirtyChecker<E>
public DirtyChecker.DirtyKind getDirtyKind(V initial, V current)
DirtyChecker
getDirtyKind
in interface DirtyChecker<E>
public DirtyChecker<E> getElementDirtyChecker(E element)
getElementDirtyChecker
in interface PluralDirtyChecker<E,V extends java.util.Map<?,?>>
public DirtyChecker<java.lang.Object> getKeyDirtyChecker(java.lang.Object element)
getKeyDirtyChecker
in interface MapDirtyChecker<V extends java.util.Map<?,?>,java.lang.Object,E>
public DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V> getDirtyFlusher(UpdateContext context, java.lang.Object view, java.lang.Object initial, java.lang.Object current)
getDirtyFlusher
in interface DirtyAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,E,V extends java.util.Map<?,?>>
protected DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V> determineDirtyFlusherForNewCollection(UpdateContext context, V initial, V current)
protected java.util.List<MapAction<java.util.Map<java.lang.Object,java.lang.Object>>> determineJpaCollectionActions(UpdateContext context, V initial, V current, AbstractPluralAttributeFlusher.EqualityChecker equalityChecker)
protected java.util.List<MapAction<java.util.Map<java.lang.Object,java.lang.Object>>> determineCollectionActions(UpdateContext context, V initial, V current, AbstractPluralAttributeFlusher.EqualityChecker equalityChecker)
protected final java.util.List<CollectionElementAttributeFlusher<E,V>> getElementFlushers(UpdateContext context, V current)
getElementFlushers
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected MapAttributeFlusher<E,V> partialFlusher(boolean fetch, AbstractPluralAttributeFlusher.PluralFlushOperation operation, java.util.List<? extends MapAction<?>> collectionActions, java.util.List<CollectionElementAttributeFlusher<E,V>> elementFlushers)
partialFlusher
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected boolean collectionEquals(V initial, V current)
collectionEquals
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
protected DirtyAttributeFlusher<MapAttributeFlusher<E,V>,E,V> getDirtyFlusherForRecordingCollection(UpdateContext context, V initial, RecordingMap<?,?,?> collection)
getDirtyFlusherForRecordingCollection
in class AbstractPluralAttributeFlusher<MapAttributeFlusher<E,V extends java.util.Map<?,?>>,MapAction<?>,RecordingMap<?,?,?>,E,V extends java.util.Map<?,?>>
Copyright © 2014–2018 Blazebit. All rights reserved.