Class CompositeAttributeFlusher
java.lang.Object
com.blazebit.persistence.view.impl.update.flush.CompositeAttributeFetchGraphNode<CompositeAttributeFlusher,DirtyAttributeFlusher<?,Object,Object>>
com.blazebit.persistence.view.impl.update.flush.CompositeAttributeFlusher
- All Implemented Interfaces:
DirtyChecker<Object>
,DirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
,FetchGraphNode<CompositeAttributeFlusher>
public class CompositeAttributeFlusher extends CompositeAttributeFetchGraphNode<CompositeAttributeFlusher,DirtyAttributeFlusher<?,Object,Object>> implements DirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
- 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.CompositeAttributeFetchGraphNode
attributeIndexMapping, flushers, persist, viewType
-
Constructor Summary
Constructors Constructor Description CompositeAttributeFlusher(EntityViewManagerImpl evm, Class<?> viewType, Class<?> entityClass, javax.persistence.metamodel.ManagedType<?> managedType, boolean persistable, ViewMapper<Object,Object> persistViewMapper, javax.persistence.metamodel.SingularAttribute<?,?> jpaIdAttribute, javax.persistence.metamodel.SingularAttribute<?,?> viewIdMappingAttribute, AttributeAccessor entityIdAccessor, ViewToEntityMapper viewIdMapper, AttributeAccessor viewIdAccessor, EntityTupleizer tupleizer, EntityLoader jpaIdInstantiator, ObjectBuilder<Object> idViewBuilder, DirtyAttributeFlusher<?,Object,Object> idFlusher, VersionAttributeFlusher<Object,Object> versionFlusher, String lockOwner, UnmappedAttributeCascadeDeleter[] cascadeDeleteUnmappedFlushers, UnmappedAttributeCascadeDeleter[][] flusherWiseCascadeDeleteUnmappedFlushers, DirtyAttributeFlusher[] flushers, FlushMode flushMode, FlushStrategy flushStrategy)
-
Method Summary
Methods inherited from class com.blazebit.persistence.view.impl.update.flush.CompositeAttributeFetchGraphNode
appendFetchJoinQueryFragment, getAttributeName, getMapping, 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, getMapping, mergeWith
-
Constructor Details
-
CompositeAttributeFlusher
public CompositeAttributeFlusher(EntityViewManagerImpl evm, Class<?> viewType, Class<?> entityClass, javax.persistence.metamodel.ManagedType<?> managedType, boolean persistable, ViewMapper<Object,Object> persistViewMapper, javax.persistence.metamodel.SingularAttribute<?,?> jpaIdAttribute, javax.persistence.metamodel.SingularAttribute<?,?> viewIdMappingAttribute, AttributeAccessor entityIdAccessor, ViewToEntityMapper viewIdMapper, AttributeAccessor viewIdAccessor, EntityTupleizer tupleizer, EntityLoader jpaIdInstantiator, ObjectBuilder<Object> idViewBuilder, DirtyAttributeFlusher<?,Object,Object> idFlusher, VersionAttributeFlusher<Object,Object> versionFlusher, String lockOwner, UnmappedAttributeCascadeDeleter[] cascadeDeleteUnmappedFlushers, UnmappedAttributeCascadeDeleter[][] flusherWiseCascadeDeleteUnmappedFlushers, DirtyAttributeFlusher[] flushers, FlushMode flushMode, FlushStrategy flushStrategy)
-
-
Method Details
-
getViewTypeClass
-
hasVersionFlusher
public boolean hasVersionFlusher() -
cloneDeep
- Specified by:
cloneDeep
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getNewInitialValue
- Specified by:
getNewInitialValue
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator)- Specified by:
appendUpdateQueryFragment
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlush
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlush
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
flushQuery
public javax.persistence.Query flushQuery(UpdateContext context, String parameterPrefix, UpdateQueryFactory queryFactory, javax.persistence.Query query, Object ownerView, Object view, Object value, UnmappedOwnerAwareDeleter ownerAwareDeleter, DirtyAttributeFlusher<?,?,?> ownerFlusher)- Specified by:
flushQuery
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getEntityIdCopy
-
createViewIdByEntityId
-
flushEntity
public boolean flushEntity(UpdateContext context, Object entity, Object ownerView, Object view, Object value, Runnable postReplaceListener)- Specified by:
flushEntity
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
remove
public List<PostFlushDeleter> remove(UpdateContext context, Object entity, Object view, Object value)- Specified by:
remove
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
remove
- Specified by:
remove
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
removeFromEntity
- Specified by:
removeFromEntity
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getIdFlusher
-
removeByOwnerId
- Specified by:
removeByOwnerId
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemove
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascaded
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThrough
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeName
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessor
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessor
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getLockOwner
- Specified by:
getLockOwner
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtected
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersist
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlush
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getDirtyFlusher
public DirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object> getDirtyFlusher(UpdateContext context, Object view, Object initial, Object current)- Specified by:
getDirtyFlusher
in interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object,Object>
-
getNestedCheckers
- Specified by:
getNestedCheckers
in interfaceDirtyChecker<Object>
-
getDirtyKind
Description copied from interface:DirtyChecker
Returns the dirty kind of the objects.- Specified by:
getDirtyKind
in interfaceDirtyChecker<Object>
- Returns:
- The dirty kind
-
getNestedDirtyFlusher
public <T extends DirtyAttributeFlusher<T, E, V>, E, V> DirtyAttributeFlusher<T,E,V> getNestedDirtyFlusher(UpdateContext context, MutableStateTrackable updatableProxy)
-