public interface IdMapper
Modifier and Type | Method and Description |
---|---|
void |
addIdEqualsToQuery(Parameters parameters,
Object id,
String prefix,
boolean equals)
Adds query statements, which contains restrictions, which express the property that the id of the entity
with alias prefix, is equal to the given object.
|
void |
addIdsEqualToQuery(Parameters parameters,
String prefix1,
IdMapper mapper2,
String prefix2)
Adds query statements, which contains restrictions, which express the property that the id of the entity
with alias prefix1, is equal to the id of the entity with alias prefix2 mapped by the second mapper
(the second mapper must be for the same entity, but it can have, for example, prefixed properties).
|
void |
addIdsEqualToQuery(Parameters parameters,
String prefix1,
String prefix2)
Adds query statements, which contains restrictions, which express the property that the id of the entity
with alias prefix1, is equal to the id of the entity with alias prefix2 (the entity is the same).
|
void |
addNamedIdEqualsToQuery(Parameters parameters,
String prefix,
boolean equals)
Adds query statements, which contains named parameters, which express the property that the id of the entity
with alias prefix, is equal to the given object.
|
ServiceRegistry |
getServiceRegistry() |
boolean |
mapToEntityFromMap(Object obj,
Map data) |
Object |
mapToIdFromEntity(Object data) |
Object |
mapToIdFromMap(Map 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.
|
ServiceRegistry getServiceRegistry()
boolean mapToEntityFromMap(Object obj, Map data)
obj
- Object to map to.data
- Data to map.null
).IdMapper prefixMappedProperties(String prefix)
prefix
- Prefix to add to mapped propertiesList<QueryParameterData> mapToQueryParametersFromId(Object obj)
obj
- Id from which to map.void addIdsEqualToQuery(Parameters parameters, String prefix1, String prefix2)
parameters
- Parameters, to which to add the statements.prefix1
- First alias of the entity + prefix to add to the properties.prefix2
- Second alias of the entity + prefix to add to the properties.void addIdsEqualToQuery(Parameters parameters, String prefix1, IdMapper mapper2, String prefix2)
parameters
- Parameters, to which to add the statements.prefix1
- First alias of the entity + prefix to add to the properties.mapper2
- Second mapper for the same entity, which will be used to get properties for the right side
of the equation.prefix2
- Second alias of the entity + prefix to add to the properties.void addIdEqualsToQuery(Parameters parameters, Object id, String prefix, boolean equals)
parameters
- Parameters, to which to add the statements.id
- Value of id.prefix
- Prefix to add to the properties (may be null).equals
- Should this query express the "=" relation or the "<>" relation.void addNamedIdEqualsToQuery(Parameters parameters, String prefix, boolean equals)
parameters
- Parameters, to which to add the statements.prefix
- Prefix to add to the properties (may be null).equals
- Should this query express the "=" relation or the "<>" relation.Copyright © 2016 JBoss by Red Hat. All rights reserved.