org.hibernate.envers.entities.mapper.relation
Class AbstractOneToOneMapper
java.lang.Object
org.hibernate.envers.entities.mapper.relation.AbstractToOneMapper
org.hibernate.envers.entities.mapper.relation.AbstractOneToOneMapper
- All Implemented Interfaces:
- PropertyMapper
- Direct Known Subclasses:
- OneToOneNotOwningMapper, OneToOnePrimaryKeyJoinColumnMapper
public abstract class AbstractOneToOneMapper
- extends AbstractToOneMapper
Template class for property mappers that manage one-to-one relation.
Method Summary |
void |
mapModifiedFlagsToMapForCollectionChange(String collectionPropertyName,
Map<String,Object> data)
|
void |
mapModifiedFlagsToMapFromEntity(SessionImplementor session,
Map<String,Object> data,
Object newObj,
Object oldObj)
|
void |
nullSafeMapToEntityFromMap(AuditConfiguration verCfg,
Object obj,
Map data,
Object primaryKey,
AuditReaderImplementor versionsReader,
Number revision)
Parameter obj is never null . |
protected abstract Object |
queryForReferencedEntity(AuditReaderImplementor versionsReader,
AbstractToOneMapper.EntityInfo referencedEntity,
Serializable primaryKey,
Number revision)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractOneToOneMapper
protected AbstractOneToOneMapper(String entityName,
String referencedEntityName,
PropertyData propertyData)
nullSafeMapToEntityFromMap
public void nullSafeMapToEntityFromMap(AuditConfiguration verCfg,
Object obj,
Map data,
Object primaryKey,
AuditReaderImplementor versionsReader,
Number revision)
- Description copied from class:
AbstractToOneMapper
- Parameter
obj
is never null
.
- Specified by:
nullSafeMapToEntityFromMap
in class AbstractToOneMapper
- See Also:
PropertyMapper.mapToEntityFromMap(AuditConfiguration, Object, Map, Object, AuditReaderImplementor, Number)
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)
mapModifiedFlagsToMapForCollectionChange
public void mapModifiedFlagsToMapForCollectionChange(String collectionPropertyName,
Map<String,Object> data)
Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.