org.hibernate.envers.entities.mapper.id
Class EmbeddedIdMapper

java.lang.Object
  extended by org.hibernate.envers.entities.mapper.id.AbstractIdMapper
      extended by org.hibernate.envers.entities.mapper.id.AbstractCompositeIdMapper
          extended by org.hibernate.envers.entities.mapper.id.EmbeddedIdMapper
All Implemented Interfaces:
IdMapper, SimpleIdMapperBuilder, SimpleMapperBuilder

public class EmbeddedIdMapper
extends AbstractCompositeIdMapper
implements SimpleIdMapperBuilder

Author:
Adam Warski (adam at warski dot org)

Field Summary
 
Fields inherited from class org.hibernate.envers.entities.mapper.id.AbstractCompositeIdMapper
compositeIdClass, ids
 
Constructor Summary
EmbeddedIdMapper(PropertyData idPropertyData, String compositeIdClass)
           
 
Method Summary
 void mapToEntityFromMap(Object obj, Map data)
           
 Object mapToIdFromEntity(Object data)
           
 void mapToMapFromEntity(Map<String,Object> data, Object obj)
           
 void mapToMapFromId(Map<String,Object> data, Object obj)
           
 List<QueryParameterData> mapToQueryParametersFromId(Object obj)
           
 IdMapper prefixMappedProperties(String prefix)
          Creates a mapper with all mapped properties prefixed.
 
Methods inherited from class org.hibernate.envers.entities.mapper.id.AbstractCompositeIdMapper
add, mapToIdFromMap
 
Methods inherited from class org.hibernate.envers.entities.mapper.id.AbstractIdMapper
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery
 
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.entities.mapper.id.IdMapper
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, mapToIdFromMap
 
Methods inherited from interface org.hibernate.envers.entities.mapper.SimpleMapperBuilder
add
 

Constructor Detail

EmbeddedIdMapper

public EmbeddedIdMapper(PropertyData idPropertyData,
                        String compositeIdClass)
Method Detail

mapToMapFromId

public void mapToMapFromId(Map<String,Object> data,
                           Object obj)
Specified by:
mapToMapFromId in interface IdMapper

mapToMapFromEntity

public void mapToMapFromEntity(Map<String,Object> data,
                               Object obj)
Specified by:
mapToMapFromEntity in interface IdMapper

mapToEntityFromMap

public void mapToEntityFromMap(Object obj,
                               Map data)
Specified by:
mapToEntityFromMap in interface IdMapper

prefixMappedProperties

public IdMapper prefixMappedProperties(String prefix)
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 interface IdMapper
Parameters:
prefix - Prefix to add to mapped properties
Returns:
A copy of the current property mapper, with mapped properties prefixed.

mapToIdFromEntity

public Object mapToIdFromEntity(Object data)
Specified by:
mapToIdFromEntity in interface IdMapper

mapToQueryParametersFromId

public List<QueryParameterData> mapToQueryParametersFromId(Object obj)
Specified by:
mapToQueryParametersFromId in interface IdMapper
Parameters:
obj - Id from which to map.
Returns:
A set parameter data, needed to build a query basing on the given id.


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.