Class ToOneIdMapper
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.ToOneIdMapper
- All Implemented Interfaces:
DynamicComponentMapperSupport
,ModifiedFlagMapperSupport
,PropertyMapper
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractToOneMapper
AbstractToOneMapper.EntityInfo
-
Constructor Summary
ConstructorDescriptionToOneIdMapper
(IdMapper delegate, PropertyData propertyData, String referencedEntityName, boolean nonInsertableFake, boolean lazyMapping) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMiddleEqualToQuery
(Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2) protected boolean
checkModified
(SessionImplementor session, Object newObj, Object oldObj) void
mapModifiedFlagsToMapForCollectionChange
(String collectionPropertyName, Map<String, Object> data) void
mapModifiedFlagsToMapFromEntity
(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) boolean
mapToMapFromEntity
(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) Maps properties to the given map, basing on differences between properties of new and old objects.void
nullSafeMapToEntityFromMap
(EnversService enversService, Object obj, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision) Parameterobj
is nevernull
.nullSafeMapToEntityFromMap
(EnversService enversService, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision) Methods inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractToOneMapper
getEntityInfo, getPropertyData, hasPropertiesWithModifiedFlag, mapCollectionChanges, mapToEntityFromMap, mapToEntityFromMap, 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 Details
-
ToOneIdMapper
public ToOneIdMapper(IdMapper delegate, PropertyData propertyData, String referencedEntityName, boolean nonInsertableFake, boolean lazyMapping)
-
-
Method Details
-
mapToMapFromEntity
public boolean mapToMapFromEntity(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) Description copied from interface:PropertyMapper
Maps properties to the given map, basing on differences between properties of new and old objects.- Specified by:
mapToMapFromEntity
in interfacePropertyMapper
- Overrides:
mapToMapFromEntity
in classAbstractToOneMapper
- Parameters:
session
- The current session.data
- Data to map to.newObj
- New state of the entity.oldObj
- Old state of the entity.- Returns:
- True if there are any differences between the states represented by newObj and oldObj.
-
mapModifiedFlagsToMapFromEntity
-
mapModifiedFlagsToMapForCollectionChange
-
checkModified
-
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
-
addMiddleEqualToQuery
public void addMiddleEqualToQuery(Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2)
-