Class EmbeddableAttributeFlusher<E,V>
java.lang.Object
com.blazebit.persistence.view.impl.update.flush.EmbeddableAttributeFetchGraphNode<EmbeddableAttributeFlusher<E,V>,DirtyAttributeFlusher<?,E,V>>
com.blazebit.persistence.view.impl.update.flush.EmbeddableAttributeFlusher<E,V>
- All Implemented Interfaces:
DirtyChecker<V>
,DirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
,FetchGraphNode<EmbeddableAttributeFlusher<E,V>>
public class EmbeddableAttributeFlusher<E,V> extends EmbeddableAttributeFetchGraphNode<EmbeddableAttributeFlusher<E,V>,DirtyAttributeFlusher<?,E,V>> implements DirtyAttributeFlusher<EmbeddableAttributeFlusher<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
Fields inherited from class com.blazebit.persistence.view.impl.update.flush.EmbeddableAttributeFetchGraphNode
attributeName, mapping, nestedGraphNode
-
Constructor Summary
Constructors Constructor Description EmbeddableAttributeFlusher(String attributeName, String mapping, String updateFragment, String parameterName, boolean optimisticLockProtected, boolean passThrough, boolean supportsQueryFlush, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, EmbeddableUpdaterBasedViewToEntityMapper viewToEntityMapper)
-
Method Summary
Methods inherited from class com.blazebit.persistence.view.impl.update.flush.EmbeddableAttributeFetchGraphNode
appendFetchJoinQueryFragment, getAttributeName, mergeWith
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
Methods inherited from interface com.blazebit.persistence.view.impl.update.flush.FetchGraphNode
getAttributeName, mergeWith
-
Constructor Details
-
EmbeddableAttributeFlusher
public EmbeddableAttributeFlusher(String attributeName, String mapping, String updateFragment, String parameterName, boolean optimisticLockProtected, boolean passThrough, boolean supportsQueryFlush, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, EmbeddableUpdaterBasedViewToEntityMapper viewToEntityMapper)
-
-
Method Details
-
getViewToEntityMapper
-
getMapping
- Specified by:
getMapping
in interfaceFetchGraphNode<E>
- Overrides:
getMapping
in classEmbeddableAttributeFetchGraphNode<EmbeddableAttributeFlusher<E,V>,DirtyAttributeFlusher<?,E,V>>
-
cloneDeep
- Specified by:
cloneDeep
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
getNewInitialValue
- Specified by:
getNewInitialValue
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlush
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlush
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator)- Specified by:
appendUpdateQueryFragment
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<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:
flushQuery
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
flushEntity
public boolean flushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener)- Specified by:
flushEntity
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
remove
- Specified by:
remove
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
remove
- Specified by:
remove
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
removeFromEntity
- Specified by:
removeFromEntity
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
removeByOwnerId
- Specified by:
removeByOwnerId
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemove
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascaded
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThrough
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeName
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessor
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessor
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
getLockOwner
- Specified by:
getLockOwner
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtected
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersist
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlush
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-
getNestedCheckers
- Specified by:
getNestedCheckers
in interfaceDirtyChecker<E>
-
getDirtyKind
Description copied from interface:DirtyChecker
Returns the dirty kind of the objects.- Specified by:
getDirtyKind
in interfaceDirtyChecker<E>
- Returns:
- The dirty kind
-
getDirtyFlusher
public DirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V> getDirtyFlusher(UpdateContext context, Object view, Object initial, Object current)- Specified by:
getDirtyFlusher
in interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>,E,V>
-