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
Fields Modifier and Type Field Description protected AttributeAccessor
entityAttributeAccessor
protected String
parameterName
Fields inherited from class com.blazebit.persistence.view.impl.update.flush.BasicDirtyChecker
elementDescriptor
-
Constructor Summary
Constructors Constructor Description BasicAttributeFlusher(String attributeName, String mapping, boolean supportsQueryFlush, boolean optimisticLockProtected, boolean updatable, boolean cascadeDelete, boolean orphanRemoval, boolean viewOnlyDeleteCascaded, Map.Entry<AttributeAccessor,BasicAttributeFlusher>[] componentFlushers, TypeDescriptor elementDescriptor, String updateFragment, String parameterName, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, UnmappedBasicAttributeCascadeDeleter deleter, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy)
-
Method Summary
Methods inherited from class com.blazebit.persistence.view.impl.update.flush.BasicDirtyChecker
getDirtyKind, getNestedCheckers
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.change.DirtyChecker
getDirtyKind, getNestedCheckers
-
Field Details
-
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, TypeDescriptor elementDescriptor, String updateFragment, String parameterName, AttributeAccessor entityAttributeAccessor, AttributeAccessor viewAttributeAccessor, UnmappedBasicAttributeCascadeDeleter deleter, InverseFlusher<E> inverseFlusher, InverseRemoveStrategy inverseRemoveStrategy)
-
-
Method Details
-
cloneDeep
- Specified by:
cloneDeep
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getNewInitialValue
- Specified by:
getNewInitialValue
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getAttributeName
- Specified by:
getAttributeName
in interfaceFetchGraphNode<E>
-
getMapping
- Specified by:
getMapping
in interfaceFetchGraphNode<E>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator)- Specified by:
appendUpdateQueryFragment
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
appendFetchJoinQueryFragment
- Specified by:
appendFetchJoinQueryFragment
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
- Specified by:
appendFetchJoinQueryFragment
in interfaceFetchGraphNode<E>
-
mergeWith
- Specified by:
mergeWith
in interfaceFetchGraphNode<E>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlush
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlush
in 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:
flushQuery
in 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:
flushEntity
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
flushEntityComponents
-
remove
- Specified by:
remove
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
removeFromEntity
- Specified by:
removeFromEntity
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
removeByOwnerId
- Specified by:
removeByOwnerId
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
remove
- Specified by:
remove
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemove
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascaded
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThrough
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeName
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessor
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessor
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getLockOwner
- Specified by:
getLockOwner
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtected
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersist
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlush
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
getDirtyFlusher
public DirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V> getDirtyFlusher(UpdateContext context, Object view, Object initial, Object current)- Specified by:
getDirtyFlusher
in interfaceDirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V>
-
mutableFlusher
protected DirtyAttributeFlusher<BasicAttributeFlusher<E,V>,E,V> mutableFlusher(Object current, boolean update)
-