public class MiddleEmbeddableComponentMapper extends Object implements MiddleComponentMapper, CompositeMapperBuilder
Constructor and Description |
---|
MiddleEmbeddableComponentMapper(MultiPropertyMapper delegate,
Class componentClass) |
Modifier and Type | Method and Description |
---|---|
void |
add(PropertyData propertyData) |
CompositeMapperBuilder |
addComponent(PropertyData propertyData,
Class componentClass) |
void |
addComposite(PropertyData propertyData,
PropertyMapper propertyMapper) |
protected void |
addMiddleEqualToQuery(CompositeMapperBuilder compositeMapper,
Parameters parameters,
String idPrefix1,
String prefix1,
String idPrefix2,
String prefix2) |
void |
addMiddleEqualToQuery(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).
|
Map<PropertyData,PropertyMapper> |
getProperties() |
void |
mapToMapFromObject(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).
|
Object |
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.
|
public MiddleEmbeddableComponentMapper(MultiPropertyMapper delegate, Class componentClass)
public Object mapToObjectFromFullMap(EntityInstantiator entityInstantiator, Map<String,Object> data, Object dataObject, Number revision)
MiddleComponentMapper
mapToObjectFromFullMap
in interface MiddleComponentMapper
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.public void mapToMapFromObject(SessionImplementor session, Map<String,Object> idData, Map<String,Object> data, Object obj)
MiddleComponentMapper
mapToMapFromObject
in interface MiddleComponentMapper
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.public void addMiddleEqualToQuery(Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2)
MiddleComponentMapper
addMiddleEqualToQuery
in interface MiddleComponentMapper
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.protected void addMiddleEqualToQuery(CompositeMapperBuilder compositeMapper, Parameters parameters, String idPrefix1, String prefix1, String idPrefix2, String prefix2)
public CompositeMapperBuilder addComponent(PropertyData propertyData, Class componentClass)
addComponent
in interface CompositeMapperBuilder
public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper)
addComposite
in interface CompositeMapperBuilder
public void add(PropertyData propertyData)
add
in interface SimpleMapperBuilder
public Map<PropertyData,PropertyMapper> getProperties()
getProperties
in interface CompositeMapperBuilder
Copyright © 2019 JBoss by Red Hat. All rights reserved.