Class MiddleEmbeddableComponentMapper
java.lang.Object
org.hibernate.envers.internal.entities.mapper.AbstractMapper
org.hibernate.envers.internal.entities.mapper.relation.component.AbstractMiddleComponentMapper
org.hibernate.envers.internal.entities.mapper.relation.component.MiddleEmbeddableComponentMapper
- All Implemented Interfaces:
CompositeMapperBuilder,MiddleComponentMapper,SimpleMapperBuilder
public class MiddleEmbeddableComponentMapper
extends AbstractMiddleComponentMapper
implements CompositeMapperBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionMiddleEmbeddableComponentMapper(MultiPropertyMapper delegate, Class<?> componentClass) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(PropertyData propertyData) addComponent(PropertyData propertyData, Class componentClass, EmbeddableInstantiator instantiator) voidaddComposite(PropertyData propertyData, PropertyMapper propertyMapper) protected voidaddMiddleEqualToQuery(CompositeMapperBuilder compositeMapper, Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2) voidaddMiddleEqualToQuery(Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2) Adds query statements, which contains restrictions, which express the property that part of the middle entity with alias prefix1, is equal to part of the middle entity with alias prefix2 (the entity is the same).voidmapToMapFromObject(SessionImplementor session, Map<String, Object> idData, Map<String, Object> data, Object obj) Maps from an object to the object's map representation (for an entity - only its id).mapToObjectFromFullMap(EntityInstantiator entityInstantiator, Map<String, Object> data, Object dataObject, Number revision) Maps from full object data, contained in the given map (or object representation of the map, if available), to an object.Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObject
-
Constructor Details
-
MiddleEmbeddableComponentMapper
-
-
Method Details
-
mapToObjectFromFullMap
public Object mapToObjectFromFullMap(EntityInstantiator entityInstantiator, Map<String, Object> data, Object dataObject, Number revision) Description copied from interface:MiddleComponentMapperMaps from full object data, contained in the given map (or object representation of the map, if available), to an object.- Specified by:
mapToObjectFromFullMapin interfaceMiddleComponentMapper- Parameters:
entityInstantiator- An entity instatiator bound with an open versions reader.data- Full object data.dataObject- An optional object representation of the data.revision- Revision at which the data is read.- Returns:
- An object with data corresponding to the one found in the given map.
-
mapToMapFromObject
public void mapToMapFromObject(SessionImplementor session, Map<String, Object> idData, Map<String, Object> data, Object obj) Description copied from interface:MiddleComponentMapperMaps from an object to the object's map representation (for an entity - only its id).- Specified by:
mapToMapFromObjectin interfaceMiddleComponentMapper- Parameters:
session- The current session.idData- Map to which composite-id data should be added.data- Map to which data should be added.obj- Object to map from.
-
addMiddleEqualToQuery
public void addMiddleEqualToQuery(Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2) Description copied from interface:MiddleComponentMapperAdds query statements, which contains restrictions, which express the property that part of the middle entity with alias prefix1, is equal to part of the middle entity with alias prefix2 (the entity is the same). The part is the component's representation in the middle entity.- Specified by:
addMiddleEqualToQueryin interfaceMiddleComponentMapper- Parameters:
parameters- Parameters, to which to add the statements.idPrefix1- First alias of the entity + prefix + id to add to the properties.prefix1- First alias of the entity + prefix to add to the properties.idPrefix2- Second alias of the entity + prefix + id to add to the properties.prefix2- Second alias of the entity + prefix to add to the properties.
-
addMiddleEqualToQuery
protected void addMiddleEqualToQuery(CompositeMapperBuilder compositeMapper, Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2) -
addComponent
public CompositeMapperBuilder addComponent(PropertyData propertyData, Class componentClass, EmbeddableInstantiator instantiator) - Specified by:
addComponentin interfaceCompositeMapperBuilder
-
addComposite
- Specified by:
addCompositein interfaceCompositeMapperBuilder
-
add
- Specified by:
addin interfaceSimpleMapperBuilder
-
getProperties
- Specified by:
getPropertiesin interfaceCompositeMapperBuilder
-