Class UpdaterBasedViewToEntityMapper
java.lang.Object
com.blazebit.persistence.view.impl.entity.AbstractViewToEntityMapper
com.blazebit.persistence.view.impl.entity.UpdaterBasedViewToEntityMapper
- All Implemented Interfaces:
ElementToEntityMapper
,ViewToEntityMapper
,UpdateQueryFactory
public class UpdaterBasedViewToEntityMapper extends AbstractViewToEntityMapper
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Field Summary
Fields inherited from class com.blazebit.persistence.view.impl.entity.AbstractViewToEntityMapper
attributeLocation, defaultUpdater, entityIdAccessor, entityLoader, isEmbeddable, persistAllowed, persistUpdater, removeUpdater, updateUpdater, viewIdAccessor, viewTypeClasses
-
Constructor Summary
Constructors Constructor Description UpdaterBasedViewToEntityMapper(String attributeLocation, EntityViewManagerImpl evm, Class<?> viewTypeClass, Set<Type<?>> readOnlyAllowedSubtypes, Set<Type<?>> persistAllowedSubtypes, Set<Type<?>> updateAllowedSubtypes, EntityLoader entityLoader, AttributeAccessor viewIdAccessor, AttributeAccessor entityIdAccessor, boolean persistAllowed, EntityViewUpdaterImpl owner, String ownerMapping, Map<Object,EntityViewUpdaterImpl> localCache)
-
Method Summary
Modifier and Type Method Description Object
applyToEntity(UpdateContext context, Object entity, Object view)
javax.persistence.Query
createUpdateQuery(UpdateContext context, MutableStateTrackable view, DirtyAttributeFlusher<?,?,?> nestedGraphNode)
Object
flushToEntity(UpdateContext context, Object entity, Object view)
<T extends DirtyAttributeFlusher<T, E, V>, E, V>
DirtyAttributeFlusher<T,E,V>getNestedDirtyFlusher(UpdateContext context, MutableStateTrackable current, DirtyAttributeFlusher<T,E,V> fullFlusher)
EntityViewUpdater
getUpdater(Object current)
Methods inherited from class com.blazebit.persistence.view.impl.entity.AbstractViewToEntityMapper
applyAll, cascades, getEntityIdAccessor, getFullGraphNode, getIdFlusher, getViewIdAccessor, getViewTypeClass, loadEntities, loadEntity, names, persist, remove, removeById, shouldPersist
-
Constructor Details
-
UpdaterBasedViewToEntityMapper
public UpdaterBasedViewToEntityMapper(String attributeLocation, EntityViewManagerImpl evm, Class<?> viewTypeClass, Set<Type<?>> readOnlyAllowedSubtypes, Set<Type<?>> persistAllowedSubtypes, Set<Type<?>> updateAllowedSubtypes, EntityLoader entityLoader, AttributeAccessor viewIdAccessor, AttributeAccessor entityIdAccessor, boolean persistAllowed, EntityViewUpdaterImpl owner, String ownerMapping, Map<Object,EntityViewUpdaterImpl> localCache)
-
-
Method Details
-
getUpdater
- Specified by:
getUpdater
in interfaceViewToEntityMapper
- Overrides:
getUpdater
in classAbstractViewToEntityMapper
-
getNestedDirtyFlusher
public <T extends DirtyAttributeFlusher<T, E, V>, E, V> DirtyAttributeFlusher<T,E,V> getNestedDirtyFlusher(UpdateContext context, MutableStateTrackable current, DirtyAttributeFlusher<T,E,V> fullFlusher)- Specified by:
getNestedDirtyFlusher
in interfaceViewToEntityMapper
- Overrides:
getNestedDirtyFlusher
in classAbstractViewToEntityMapper
-
applyToEntity
- Specified by:
applyToEntity
in interfaceElementToEntityMapper
- Overrides:
applyToEntity
in classAbstractViewToEntityMapper
-
flushToEntity
-
createUpdateQuery
public javax.persistence.Query createUpdateQuery(UpdateContext context, MutableStateTrackable view, DirtyAttributeFlusher<?,?,?> nestedGraphNode)- Specified by:
createUpdateQuery
in interfaceUpdateQueryFactory
- Overrides:
createUpdateQuery
in classAbstractViewToEntityMapper
-