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
ConstructorsConstructorDescriptionCompositeAttributeFlusher(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
Modifier and TypeMethodDescriptionbooleanappendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) booleanflushEntity(UpdateContext context, Object entity, Object ownerView, Object view, Object value, Runnable postReplaceListener) javax.persistence.QueryflushQuery(UpdateContext context, String parameterPrefix, UpdateQueryFactory queryFactory, javax.persistence.Query query, Object ownerView, Object view, Object value, UnmappedOwnerAwareDeleter ownerAwareDeleter, DirtyAttributeFlusher<?, ?, ?> ownerFlusher) getDirtyFlusher(UpdateContext context, Object view, Object initial, Object current) getDirtyKind(Object initial, Object current) Returns the dirty kind of the objects.getEntityIdCopy(UpdateContext context, EntityViewProxy updatableProxy) <X> DirtyChecker<X>[]getNestedCheckers(Object current) <T extends DirtyAttributeFlusher<T,E, V>, E, V>
DirtyAttributeFlusher<T,E, V> getNestedDirtyFlusher(UpdateContext context, MutableStateTrackable updatableProxy) getNewInitialValue(UpdateContext context, Object clonedValue, Object currentValue) Class<?>booleanbooleanbooleanbooleanbooleanvoidremove(UpdateContext context, Object viewId) remove(UpdateContext context, Object entity, Object view, Object value) removeByOwnerId(UpdateContext context, Object id) voidremoveFromEntity(UpdateContext context, Object entity) booleanrequiresDeferredFlush(Object value) booleanbooleanrequiresFlushAfterPersist(Object value) booleanMethods inherited from class com.blazebit.persistence.view.impl.update.flush.CompositeAttributeFetchGraphNode
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
-
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:
cloneDeepin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getNewInitialValue
- Specified by:
getNewInitialValuein interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
appendUpdateQueryFragment
public boolean appendUpdateQueryFragment(UpdateContext context, StringBuilder sb, String mappingPrefix, String parameterPrefix, String separator) - Specified by:
appendUpdateQueryFragmentin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
supportsQueryFlush
public boolean supportsQueryFlush()- Specified by:
supportsQueryFlushin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
loadForEntityFlush
public boolean loadForEntityFlush()- Specified by:
loadForEntityFlushin 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:
flushQueryin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getEntityIdCopy
-
createViewIdByEntityId
-
flushEntity
public boolean flushEntity(UpdateContext context, Object entity, Object ownerView, Object view, Object value, Runnable postReplaceListener) - Specified by:
flushEntityin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
remove
public List<PostFlushDeleter> remove(UpdateContext context, Object entity, Object view, Object value) - Specified by:
removein interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
remove
- Specified by:
removein interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
removeFromEntity
- Specified by:
removeFromEntityin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getIdFlusher
-
removeByOwnerId
- Specified by:
removeByOwnerIdin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
requiresDeleteCascadeAfterRemove
public boolean requiresDeleteCascadeAfterRemove()- Specified by:
requiresDeleteCascadeAfterRemovein interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
isViewOnlyDeleteCascaded
public boolean isViewOnlyDeleteCascaded()- Specified by:
isViewOnlyDeleteCascadedin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
isPassThrough
public boolean isPassThrough()- Specified by:
isPassThroughin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getElementIdAttributeName
- Specified by:
getElementIdAttributeNamein interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getViewAttributeAccessor
- Specified by:
getViewAttributeAccessorin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getEntityAttributeAccessor
- Specified by:
getEntityAttributeAccessorin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getLockOwner
- Specified by:
getLockOwnerin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
isOptimisticLockProtected
public boolean isOptimisticLockProtected()- Specified by:
isOptimisticLockProtectedin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
requiresFlushAfterPersist
- Specified by:
requiresFlushAfterPersistin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
requiresDeferredFlush
- Specified by:
requiresDeferredFlushin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getDirtyFlusher
public DirtyAttributeFlusher<CompositeAttributeFlusher,Object, getDirtyFlusherObject> (UpdateContext context, Object view, Object initial, Object current) - Specified by:
getDirtyFlusherin interfaceDirtyAttributeFlusher<CompositeAttributeFlusher,Object, Object>
-
getNestedCheckers
- Specified by:
getNestedCheckersin interfaceDirtyChecker<Object>
-
getDirtyKind
Description copied from interface:DirtyCheckerReturns the dirty kind of the objects.- Specified by:
getDirtyKindin interfaceDirtyChecker<Object>- Returns:
- The dirty kind
-
getNestedDirtyFlusher
public <T extends DirtyAttributeFlusher<T,E, DirtyAttributeFlusher<T,V>, E, V> E, getNestedDirtyFlusherV> (UpdateContext context, MutableStateTrackable updatableProxy)
-