Class AbstractViewToEntityMapper
java.lang.Object
com.blazebit.persistence.view.impl.entity.AbstractViewToEntityMapper
- All Implemented Interfaces:
ElementToEntityMapper
,ViewToEntityMapper
,UpdateQueryFactory
- Direct Known Subclasses:
EmbeddableUpdaterBasedViewToEntityMapper
,LoadOrPersistViewToEntityMapper
,UpdaterBasedViewToEntityMapper
public abstract class AbstractViewToEntityMapper extends Object implements ViewToEntityMapper
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Field Summary
Fields Modifier and Type Field Description protected String
attributeLocation
protected EntityViewUpdater
defaultUpdater
protected AttributeAccessor
entityIdAccessor
protected EntityLoader
entityLoader
protected boolean
isEmbeddable
protected boolean
persistAllowed
protected Map<Class<?>,EntityViewUpdater>
persistUpdater
protected Map<Class<?>,EntityViewUpdater>
removeUpdater
protected Map<Class<?>,EntityViewUpdater>
updateUpdater
protected AttributeAccessor
viewIdAccessor
protected Set<Class<?>>
viewTypeClasses
-
Constructor Summary
Constructors Constructor Description 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 Summary
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.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:
getFullGraphNode
in interfaceViewToEntityMapper
-
getIdFlusher
- Specified by:
getIdFlusher
in interfaceViewToEntityMapper
-
getUpdater
- Specified by:
getUpdater
in interfaceViewToEntityMapper
-
remove
- Specified by:
remove
in interfaceElementToEntityMapper
-
cascades
- Specified by:
cascades
in interfaceViewToEntityMapper
-
removeById
- Specified by:
removeById
in interfaceElementToEntityMapper
-
applyToEntity
- Specified by:
applyToEntity
in interfaceElementToEntityMapper
-
applyAll
- Specified by:
applyAll
in interfaceElementToEntityMapper
-
loadEntities
- Specified by:
loadEntities
in interfaceViewToEntityMapper
-
loadEntity
- Specified by:
loadEntity
in interfaceViewToEntityMapper
-
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
-
createUpdateQuery
public javax.persistence.Query createUpdateQuery(UpdateContext context, MutableStateTrackable view, DirtyAttributeFlusher<?,?,?> nestedGraphNode)- Specified by:
createUpdateQuery
in interfaceUpdateQueryFactory
-
persist
-
shouldPersist
-
getViewTypeClass
-
names
-
getViewIdAccessor
- Specified by:
getViewIdAccessor
in interfaceViewToEntityMapper
-
getEntityIdAccessor
- Specified by:
getEntityIdAccessor
in interfaceViewToEntityMapper
-