Class SubviewAttributeFlusher<E,V>
java.lang.Object
com.blazebit.persistence.view.impl.update.flush.AttributeFetchGraphNode<SubviewAttributeFlusher<E,V>>
com.blazebit.persistence.view.impl.update.flush.SubviewAttributeFlusher<E,V>
- All Implemented Interfaces:
DirtyChecker<V>,DirtyAttributeFlusher<SubviewAttributeFlusher<E,,V>, E, V> FetchGraphNode<SubviewAttributeFlusher<E,V>>
public class SubviewAttributeFlusher<E,V>
extends AttributeFetchGraphNode<SubviewAttributeFlusher<E,V>>
implements DirtyAttributeFlusher<SubviewAttributeFlusher<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.AttributeFetchGraphNode
attributeName, fetch, mapping -
Constructor Summary
ConstructorsConstructorDescriptionSubviewAttributeFlusher(String attributeName, String mapping, boolean optimisticLockProtected, boolean updatable, boolean cascadeDelete, boolean orphanRemoval, boolean viewOnlyDeleteCascaded, TypeConverter<?, ?> converter, boolean fetch, String[] elementIdAttributePaths, String parameterName, boolean passThrough, boolean isEmbedded, AttributeAccessor entityAttributeAccessor, InitialValueAttributeAccessor viewAttributeAccessor, AttributeAccessor subviewIdAccessor, ViewToEntityMapper viewToEntityMapper, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy) -
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) protected final VgetConvertedValue(V value) 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) protected FetchGraphNode<?>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.AttributeFetchGraphNode
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
-
Constructor Details
-
SubviewAttributeFlusher
public SubviewAttributeFlusher(String attributeName, String mapping, boolean optimisticLockProtected, boolean updatable, boolean cascadeDelete, boolean orphanRemoval, boolean viewOnlyDeleteCascaded, TypeConverter<?, ?> converter, boolean fetch, String[] elementIdAttributePaths, String parameterName, boolean passThrough, boolean isEmbedded, AttributeAccessor entityAttributeAccessor, InitialValueAttributeAccessor viewAttributeAccessor, AttributeAccessor subviewIdAccessor, ViewToEntityMapper viewToEntityMapper, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy)
-
-
Method Details
-
getNestedGraphNode
- Overrides:
getNestedGraphNodein classAttributeFetchGraphNode<SubviewAttributeFlusher<E,V>>
-
cloneDeep
- Specified by:
cloneDeepin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
getNewInitialValue
- Specified by:
getNewInitialValuein interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) - Specified by:
appendUpdateQueryFragmentin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlushin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlushin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<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<SubviewAttributeFlusher<E,V>, E, V>
-
flushEntity
public boolean flushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener) - Specified by:
flushEntityin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
getConvertedValue
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
removeByOwnerId
- Specified by:
removeByOwnerIdin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
removeFromEntity
- Specified by:
removeFromEntityin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemovein interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascadedin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThroughin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeNamein interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessorin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessorin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
getLockOwner
- Specified by:
getLockOwnerin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtectedin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersistin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlushin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<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<SubviewAttributeFlusher<E,V>, getDirtyFlusherE, V> (UpdateContext context, Object view, Object initial, Object current) - Specified by:
getDirtyFlusherin interfaceDirtyAttributeFlusher<SubviewAttributeFlusher<E,V>, E, V>
-