public class VirtualEntitySingleIdMapper extends SingleIdMapper
SingleIdMapper
implementation that supports the use case of an @IdClass
mapping that contains an entity association where the @IdClass
stores the primary key of the
associated entity rather than the entity object itself.
Internally this mapper is capable of transforming the primary key values into the associated entity object
and vice versa depending upon the operation.Constructor and Description |
---|
VirtualEntitySingleIdMapper(ServiceRegistry serviceRegistry,
PropertyData propertyData) |
Modifier and Type | Method and Description |
---|---|
boolean |
mapToEntityFromMap(Object obj,
Map data) |
void |
mapToMapFromEntity(Map<String,Object> data,
Object obj) |
void |
mapToMapFromId(Session session,
Map<String,Object> data,
Object obj) |
add, mapToEntityFromEntity, mapToIdFromEntity, mapToIdFromMap, mapToMapFromId, mapToQueryParametersFromId, prefixMappedProperties
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, addNamedIdEqualsToQuery, getServiceRegistry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addIdEqualsToQuery, addIdsEqualToQuery, addIdsEqualToQuery, addNamedIdEqualsToQuery, addNamedIdEqualsToQuery, getServiceRegistry
public VirtualEntitySingleIdMapper(ServiceRegistry serviceRegistry, PropertyData propertyData)
public boolean mapToEntityFromMap(Object obj, Map data)
mapToEntityFromMap
in interface IdMapper
mapToEntityFromMap
in class SingleIdMapper
obj
- Object to map to.data
- Data to map.null
).public void mapToMapFromEntity(Map<String,Object> data, Object obj)
mapToMapFromEntity
in interface IdMapper
mapToMapFromEntity
in class SingleIdMapper
Copyright © 2021 JBoss by Red Hat. All rights reserved.