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
ConstructorsConstructorDescriptionEmbeddableAttributeFlusher(String attributeName, String mapping, String updateFragment, String parameterName, boolean optimisticLockProtected, boolean passThrough, boolean supportsQueryFlush, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, EmbeddableUpdaterBasedViewToEntityMapper viewToEntityMapper) -
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.EmbeddableAttributeFetchGraphNode
appendFetchJoinQueryFragment, getAttributeName, 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, 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:
getMappingin interfaceFetchGraphNode<E>- Overrides:
getMappingin classEmbeddableAttributeFetchGraphNode<EmbeddableAttributeFlusher<E,V>, DirtyAttributeFlusher<?, E, V>>
-
cloneDeep
- Specified by:
cloneDeepin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
getNewInitialValue
- Specified by:
getNewInitialValuein interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlushin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlushin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) - Specified by:
appendUpdateQueryFragmentin 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:
flushQueryin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
flushEntity
public boolean flushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener) - Specified by:
flushEntityin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
removeFromEntity
- Specified by:
removeFromEntityin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
removeByOwnerId
- Specified by:
removeByOwnerIdin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemovein interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascadedin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThroughin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeNamein interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessorin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessorin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
getLockOwner
- Specified by:
getLockOwnerin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtectedin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersistin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlushin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<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<EmbeddableAttributeFlusher<E,V>, getDirtyFlusherE, V> (UpdateContext context, Object view, Object initial, Object current) - Specified by:
getDirtyFlusherin interfaceDirtyAttributeFlusher<EmbeddableAttributeFlusher<E,V>, E, V>
-