Class AbstractCompositeIdMapper
- 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.AbstractCompositeIdMapper
-
- All Implemented Interfaces:
IdMapper
,SimpleIdMapperBuilder
,SimpleMapperBuilder
- Direct Known Subclasses:
EmbeddedIdMapper
,MultipleIdMapper
public abstract class AbstractCompositeIdMapper extends AbstractIdMapper implements SimpleIdMapperBuilder
An abstract identifier mapper implementation specific for composite identifiers.
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<?>
compositeIdClass
protected Map<PropertyData,AbstractIdMapper>
ids
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCompositeIdMapper(Class<?> compositeIdClass, ServiceRegistry serviceRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(PropertyData propertyData)
void
add(PropertyData propertyData, AbstractIdMapper idMapper)
Add a custom identifier mapper to the builder.protected Object
instantiateCompositeId()
void
mapToEntityFromEntity(Object objectTo, Object objectFrom)
Object
mapToIdFromMap(Map data)
-
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, mapToEntityFromMap, mapToIdFromEntity, mapToMapFromEntity, mapToMapFromId, mapToMapFromId, mapToQueryParametersFromId, prefixMappedProperties
-
-
-
-
Field Detail
-
compositeIdClass
protected final Class<?> compositeIdClass
-
ids
protected Map<PropertyData,AbstractIdMapper> ids
-
-
Constructor Detail
-
AbstractCompositeIdMapper
protected AbstractCompositeIdMapper(Class<?> compositeIdClass, ServiceRegistry serviceRegistry)
-
-
Method Detail
-
add
public void add(PropertyData propertyData)
- Specified by:
add
in interfaceSimpleMapperBuilder
-
add
public void add(PropertyData propertyData, AbstractIdMapper idMapper)
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
-
mapToIdFromMap
public Object mapToIdFromMap(Map data)
- Specified by:
mapToIdFromMap
in interfaceIdMapper
-
mapToEntityFromEntity
public void mapToEntityFromEntity(Object objectTo, Object objectFrom)
- Specified by:
mapToEntityFromEntity
in classAbstractIdMapper
-
instantiateCompositeId
protected Object instantiateCompositeId()
-
-