Class AbstractViewToEntityMapper
java.lang.Object
com.blazebit.persistence.view.impl.entity.AbstractViewToEntityMapper
- All Implemented Interfaces:
ElementToEntityMapper,ViewToEntityMapper,UpdateQueryFactory
- Direct Known Subclasses:
EmbeddableUpdaterBasedViewToEntityMapper,LoadOrPersistViewToEntityMapper,UpdaterBasedViewToEntityMapper
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final EntityViewUpdaterprotected final AttributeAccessorprotected final EntityLoaderprotected final booleanprotected final booleanprotected final Map<Class<?>,EntityViewUpdater> protected final Map<Class<?>,EntityViewUpdater> protected final Map<Class<?>,EntityViewUpdater> protected final AttributeAccessor -
Constructor Summary
ConstructorsConstructorDescriptionAbstractViewToEntityMapper(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 TypeMethodDescriptionvoidapplyAll(UpdateContext context, List<Object> elements) applyToEntity(UpdateContext context, Object entity, Object element) booleanjavax.persistence.QuerycreateUpdateQuery(UpdateContext context, MutableStateTrackable view, DirtyAttributeFlusher<?, ?, ?> nestedGraphNode) DirtyAttributeFlusher<?,?, ?> <T extends DirtyAttributeFlusher<T,E, V>, E, V>
DirtyAttributeFlusher<T,E, V> getNestedDirtyFlusher(UpdateContext context, MutableStateTrackable current, DirtyAttributeFlusher<T, E, V> fullFlusher) getUpdater(Object current) protected Class<?>getViewTypeClass(Object view) voidloadEntities(UpdateContext context, List<Object> views) loadEntity(UpdateContext context, Object view) protected static Stringprotected Objectpersist(UpdateContext context, Object entity, Object view) voidremove(UpdateContext context, Object element) voidremoveById(UpdateContext context, Object id) protected booleanshouldPersist(Object view, Object id) Methods 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.entity.ViewToEntityMapper
flushToEntity
-
Field Details
-
attributeLocation
-
viewTypeClasses
-
isEmbeddable
protected final boolean isEmbeddable -
defaultUpdater
-
persistUpdater
-
updateUpdater
-
removeUpdater
-
entityLoader
-
viewIdAccessor
-
entityIdAccessor
-
persistAllowed
protected final boolean persistAllowed
-
-
Constructor Details
-
AbstractViewToEntityMapper
public AbstractViewToEntityMapper(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
-
getFullGraphNode
- Specified by:
getFullGraphNodein interfaceViewToEntityMapper
-
getIdFlusher
- Specified by:
getIdFlusherin interfaceViewToEntityMapper
-
getUpdater
- Specified by:
getUpdaterin interfaceViewToEntityMapper
-
remove
- Specified by:
removein interfaceElementToEntityMapper
-
cascades
- Specified by:
cascadesin interfaceViewToEntityMapper
-
removeById
- Specified by:
removeByIdin interfaceElementToEntityMapper
-
applyToEntity
- Specified by:
applyToEntityin interfaceElementToEntityMapper
-
applyAll
- Specified by:
applyAllin interfaceElementToEntityMapper
-
loadEntities
- Specified by:
loadEntitiesin interfaceViewToEntityMapper
-
loadEntity
- Specified by:
loadEntityin interfaceViewToEntityMapper
-
getNestedDirtyFlusher
public <T extends DirtyAttributeFlusher<T,E, DirtyAttributeFlusher<T,V>, E, V> E, getNestedDirtyFlusherV> (UpdateContext context, MutableStateTrackable current, DirtyAttributeFlusher<T, E, V> fullFlusher) - Specified by:
getNestedDirtyFlusherin interfaceViewToEntityMapper
-
createUpdateQuery
public javax.persistence.Query createUpdateQuery(UpdateContext context, MutableStateTrackable view, DirtyAttributeFlusher<?, ?, ?> nestedGraphNode) - Specified by:
createUpdateQueryin interfaceUpdateQueryFactory
-
persist
-
shouldPersist
-
getViewTypeClass
-
names
-
getViewIdAccessor
- Specified by:
getViewIdAccessorin interfaceViewToEntityMapper
-
getEntityIdAccessor
- Specified by:
getEntityIdAccessorin interfaceViewToEntityMapper
-