Class AbstractOneToOneMapper
- java.lang.Object
-
- org.hibernate.envers.internal.entities.mapper.AbstractMapper
-
- org.hibernate.envers.internal.entities.mapper.AbstractPropertyMapper
-
- org.hibernate.envers.internal.entities.mapper.relation.AbstractToOneMapper
-
- org.hibernate.envers.internal.entities.mapper.relation.AbstractOneToOneMapper
-
- All Implemented Interfaces:
DynamicComponentMapperSupport
,ModifiedFlagMapperSupport
,PropertyMapper
- Direct Known Subclasses:
OneToOneNotOwningMapper
,OneToOnePrimaryKeyJoinColumnMapper
public abstract class AbstractOneToOneMapper extends AbstractToOneMapper
Template class for property mappers that manage one-to-one relation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractToOneMapper
AbstractToOneMapper.EntityInfo
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractOneToOneMapper(String entityName, String referencedEntityName, PropertyData propertyData, ServiceRegistry serviceRegistry)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
mapModifiedFlagsToMapForCollectionChange(String collectionPropertyName, Map<String,Object> data)
void
mapModifiedFlagsToMapFromEntity(SessionImplementor session, Map<String,Object> data, Object newObj, Object oldObj)
void
nullSafeMapToEntityFromMap(EnversService enversService, Object obj, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision)
Parameterobj
is nevernull
.Object
nullSafeMapToEntityFromMap(EnversService enversService, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision)
protected abstract Object
queryForReferencedEntity(AuditReaderImplementor versionsReader, AbstractToOneMapper.EntityInfo referencedEntity, Serializable primaryKey, Number revision)
-
Methods inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractToOneMapper
getEntityInfo, getPropertyData, hasPropertiesWithModifiedFlag, mapCollectionChanges, mapToEntityFromMap, mapToEntityFromMap, mapToMapFromEntity, setPropertyValue
-
Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractPropertyMapper
isDynamicComponentMap, markAsDynamicComponentMap
-
Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
doPrivileged, getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObject
-
-
-
-
Constructor Detail
-
AbstractOneToOneMapper
protected AbstractOneToOneMapper(String entityName, String referencedEntityName, PropertyData propertyData, ServiceRegistry serviceRegistry)
-
-
Method Detail
-
nullSafeMapToEntityFromMap
public void nullSafeMapToEntityFromMap(EnversService enversService, Object obj, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision)
Description copied from class:AbstractToOneMapper
Parameterobj
is nevernull
.- Specified by:
nullSafeMapToEntityFromMap
in classAbstractToOneMapper
-
nullSafeMapToEntityFromMap
public Object nullSafeMapToEntityFromMap(EnversService enversService, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision)
- Specified by:
nullSafeMapToEntityFromMap
in classAbstractToOneMapper
-
queryForReferencedEntity
protected abstract Object queryForReferencedEntity(AuditReaderImplementor versionsReader, AbstractToOneMapper.EntityInfo referencedEntity, Serializable primaryKey, Number revision)
- Parameters:
versionsReader
- Audit reader.referencedEntity
- Referenced entity descriptor.primaryKey
- Referenced entity identifier.revision
- Revision number.- Returns:
- Referenced object or proxy of one-to-one relation.
-
mapModifiedFlagsToMapFromEntity
public void mapModifiedFlagsToMapFromEntity(SessionImplementor session, Map<String,Object> data, Object newObj, Object oldObj)
-
-