Class SingleIdMapper
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
- All Implemented Interfaces:
IdMapper
,SimpleIdMapperBuilder
,SimpleMapperBuilder
- Direct Known Subclasses:
VirtualEntitySingleIdMapper
An implementation of an identifier mapper for a single basic attribute property.
-
Constructor Summary
ConstructorDescriptionSingleIdMapper
(ServiceRegistry serviceRegistry) SingleIdMapper
(ServiceRegistry serviceRegistry, PropertyData propertyData) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(PropertyData propertyData) void
add
(PropertyData propertyData, AbstractIdMapper idMapper) Add a custom identifier mapper to the builder.void
mapToEntityFromEntity
(Object objTo, Object objFrom) boolean
mapToEntityFromMap
(Object obj, Map data) mapToIdFromEntity
(Object data) mapToIdFromMap
(Map data) void
mapToMapFromEntity
(Map<String, Object> data, Object obj) void
mapToMapFromId
(Map<String, Object> data, Object obj) prefixMappedProperties
(String prefix) Creates a mapper with all mapped properties prefixed.Methods inherited from class org.hibernate.envers.internal.entities.mapper.id.AbstractIdMapper
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, addNamedIdEqualsToQuery, addNullableIdsEqualToQuery, getAndSetValue, getServiceRegistry, getValueFromObject, setValueOnObject
Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
doPrivileged, getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.envers.internal.entities.mapper.id.IdMapper
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, addNamedIdEqualsToQuery, addNullableIdsEqualToQuery, getServiceRegistry, mapToMapFromId
-
Constructor Details
-
SingleIdMapper
-
SingleIdMapper
-
-
Method Details
-
add
- Specified by:
add
in interfaceSimpleMapperBuilder
-
add
Description copied from interface:SimpleIdMapperBuilder
Add a custom identifier mapper to the builder.- Specified by:
add
in interfaceSimpleIdMapperBuilder
- Parameters:
propertyData
- the property dataidMapper
- the mapper
-
mapToEntityFromMap
- Specified by:
mapToEntityFromMap
in interfaceIdMapper
- Parameters:
obj
- Object to map to.data
- Data to map.- Returns:
- True if data was mapped; false otherwise (when the id is
null
).
-
mapToIdFromMap
- Specified by:
mapToIdFromMap
in interfaceIdMapper
-
mapToIdFromEntity
- Specified by:
mapToIdFromEntity
in interfaceIdMapper
-
mapToMapFromId
- Specified by:
mapToMapFromId
in interfaceIdMapper
-
mapToMapFromEntity
- Specified by:
mapToMapFromEntity
in interfaceIdMapper
-
mapToEntityFromEntity
- Specified by:
mapToEntityFromEntity
in classAbstractIdMapper
-
prefixMappedProperties
Description copied from interface:IdMapper
Creates a mapper with all mapped properties prefixed. A mapped property is a property which is directly mapped to values (not composite).- Specified by:
prefixMappedProperties
in interfaceIdMapper
- Parameters:
prefix
- Prefix to add to mapped properties- Returns:
- A copy of the current property mapper, with mapped properties prefixed.
-
mapToQueryParametersFromId
- Specified by:
mapToQueryParametersFromId
in interfaceIdMapper
- Parameters:
obj
- Id from which to map.- Returns:
- A set parameter data, needed to build a query basing on the given id.
-