Class VirtualEntitySingleIdMapper
java.lang.Object
org.hibernate.envers.internal.entities.mapper.AbstractMapper
org.hibernate.envers.internal.entities.mapper.id.AbstractIdMapper
org.hibernate.envers.internal.entities.mapper.id.SingleIdMapper
org.hibernate.envers.internal.entities.mapper.id.VirtualEntitySingleIdMapper
- All Implemented Interfaces:
IdMapper,SimpleIdMapperBuilder,SimpleMapperBuilder
An extension to the
SingleIdMapper implementation that supports the use case of an @IdClass
mapping that contains an entity association where the @IdClass stores the primary key of the
associated entity rather than the entity object itself.
Internally this mapper is capable of transforming the primary key values into the associated entity object and vice versa depending upon the operation.
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualEntitySingleIdMapper(ServiceRegistry serviceRegistry, PropertyData propertyData) -
Method Summary
Modifier and TypeMethodDescriptionvoidmapToEntityFromEntity(Object objTo, Object objFrom) booleanmapToEntityFromMap(Object obj, Map data) voidmapToMapFromEntity(Map<String, Object> data, Object obj) voidMethods inherited from class org.hibernate.envers.internal.entities.mapper.id.SingleIdMapper
add, add, mapToIdFromEntity, mapToIdFromMap, mapToMapFromId, mapToQueryParametersFromId, prefixMappedPropertiesMethods inherited from class org.hibernate.envers.internal.entities.mapper.id.AbstractIdMapper
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, addNamedIdEqualsToQuery, addNullableIdsEqualToQuery, getAndSetValue, getServiceRegistry, getValueFromObject, setValueOnObjectMethods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.envers.internal.entities.mapper.id.IdMapper
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, addNamedIdEqualsToQuery, addNullableIdsEqualToQuery, getServiceRegistry
-
Constructor Details
-
VirtualEntitySingleIdMapper
-
-
Method Details
-
mapToMapFromId
-
mapToEntityFromEntity
- Overrides:
mapToEntityFromEntityin classSingleIdMapper
-
mapToEntityFromMap
- Specified by:
mapToEntityFromMapin interfaceIdMapper- Overrides:
mapToEntityFromMapin classSingleIdMapper- Parameters:
obj- Object to map to.data- Data to map.- Returns:
- True if data was mapped; false otherwise (when the id is
null).
-
mapToMapFromEntity
- Specified by:
mapToMapFromEntityin interfaceIdMapper- Overrides:
mapToMapFromEntityin classSingleIdMapper
-