Class BasicAttributeFlusher<E,V>
java.lang.Object
com.blazebit.persistence.view.impl.update.flush.BasicDirtyChecker<V>
com.blazebit.persistence.view.impl.update.flush.BasicAttributeFlusher<E,V>
- All Implemented Interfaces:
DirtyChecker<V>,DirtyAttributeFlusher<BasicAttributeFlusher<E,,V>, E, V> FetchGraphNode<BasicAttributeFlusher<E,V>>
- Direct Known Subclasses:
ParentReferenceAttributeFlusher,VersionAttributeFlusher
public class BasicAttributeFlusher<E,V>
extends BasicDirtyChecker<V>
implements DirtyAttributeFlusher<BasicAttributeFlusher<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
FieldsFields inherited from class com.blazebit.persistence.view.impl.update.flush.BasicDirtyChecker
elementDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionBasicAttributeFlusher(String attributeName, String mapping, boolean supportsQueryFlush, boolean optimisticLockProtected, boolean updatable, boolean cascadeDelete, boolean orphanRemoval, boolean viewOnlyDeleteCascaded, Map.Entry<AttributeAccessor, BasicAttributeFlusher>[] componentFlushers, JpaProvider jpaProvider, TypeDescriptor elementDescriptor, String updateFragment, String parameterName, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, UnmappedBasicAttributeCascadeDeleter deleter, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendFetchJoinQueryFragment(String base, StringBuilder sb) booleanappendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) booleanflushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener) voidflushEntityComponents(UpdateContext context, E entity, V value) 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) getNewInitialValue(UpdateContext context, V clonedValue, V currentValue) booleanbooleanbooleanbooleanmergeWith(List<BasicAttributeFlusher<E, V>> fetchGraphNodes) protected DirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V> mutableFlusher(Object current, boolean update) remove(UpdateContext context, E entity, Object view, V value) voidremove(UpdateContext context, Object id) removeByOwnerId(UpdateContext context, Object ownerId) voidremoveFromEntity(UpdateContext context, E entity) booleanrequiresDeferredFlush(V value) booleanbooleanrequiresFlushAfterPersist(V value) booleanMethods inherited from class com.blazebit.persistence.view.impl.update.flush.BasicDirtyChecker
getDirtyKind, getNestedCheckersMethods 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.change.DirtyChecker
getDirtyKind, getNestedCheckers
-
Field Details
-
parameterName
-
entityAttributeAccessor
-
-
Constructor Details
-
BasicAttributeFlusher
public BasicAttributeFlusher(String attributeName, String mapping, boolean supportsQueryFlush, boolean optimisticLockProtected, boolean updatable, boolean cascadeDelete, boolean orphanRemoval, boolean viewOnlyDeleteCascaded, Map.Entry<AttributeAccessor, BasicAttributeFlusher>[] componentFlushers, JpaProvider jpaProvider, TypeDescriptor elementDescriptor, String updateFragment, String parameterName, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, UnmappedBasicAttributeCascadeDeleter deleter, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy)
-
-
Method Details
-
cloneDeep
- Specified by:
cloneDeepin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getNewInitialValue
- Specified by:
getNewInitialValuein interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getAttributeName
- Specified by:
getAttributeNamein interfaceFetchGraphNode<E>
-
getMapping
- Specified by:
getMappingin interfaceFetchGraphNode<E>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) - Specified by:
appendUpdateQueryFragmentin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
appendFetchJoinQueryFragment
- Specified by:
appendFetchJoinQueryFragmentin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V> - Specified by:
appendFetchJoinQueryFragmentin interfaceFetchGraphNode<E>
-
mergeWith
- Specified by:
mergeWithin interfaceFetchGraphNode<E>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlushin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlushin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<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<BasicAttributeFlusher<E,V>, E, V>
-
getConvertedValue
-
flushEntity
public boolean flushEntity(UpdateContext context, E entity, Object ownerView, Object view, V value, Runnable postReplaceListener) - Specified by:
flushEntityin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
flushEntityComponents
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
removeFromEntity
- Specified by:
removeFromEntityin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
removeByOwnerId
- Specified by:
removeByOwnerIdin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemovein interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascadedin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThroughin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeNamein interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessorin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessorin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getLockOwner
- Specified by:
getLockOwnerin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtectedin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersistin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlushin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
getDirtyFlusher
public DirtyAttributeFlusher<BasicAttributeFlusher<E,V>, getDirtyFlusherE, V> (UpdateContext context, Object view, Object initial, Object current) - Specified by:
getDirtyFlusherin interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>, E, V>
-
mutableFlusher
protected DirtyAttributeFlusher<BasicAttributeFlusher<E,V>, mutableFlusherE, V> (Object current, boolean update)
-