Class AbstractIdMapper
java.lang.Object
org.hibernate.envers.internal.entities.mapper.AbstractMapper
org.hibernate.envers.internal.entities.mapper.id.AbstractIdMapper
- All Implemented Interfaces:
IdMapper
- Direct Known Subclasses:
AbstractCompositeIdMapper,SingleIdMapper
The base abstract class implementation for identifier mappers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIdEqualsToQuery(Parameters parameters, Object id, String alias, 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.voidaddIdsEqualToQuery(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).voidaddIdsEqualToQuery(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).voidaddNamedIdEqualsToQuery(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.voidaddNamedIdEqualsToQuery(Parameters parameters, String prefix1, IdMapper mapper, boolean equals) Adds query statements, which contains named parameters that express the property that the id of the entity with alias prefix is equal to the given object using the specified mapper.voidaddNullableIdsEqualToQuery(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).protected voidgetAndSetValue(PropertyData propertyData, Object source, Object destination) protected <T> TgetValueFromObject(PropertyData propertyData, Object object) abstract voidmapToEntityFromEntity(Object objectTo, Object objectFrom) protected voidsetValueOnObject(PropertyData propertyData, Object object, Object value) Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.envers.internal.entities.mapper.id.IdMapper
mapToEntityFromMap, mapToIdFromEntity, mapToIdFromMap, mapToMapFromEntity, mapToMapFromId, mapToMapFromId, mapToQueryParametersFromId, prefixMappedProperties
-
Constructor Details
-
AbstractIdMapper
-
-
Method Details
-
getServiceRegistry
- Specified by:
getServiceRegistryin interfaceIdMapper
-
addIdsEqualToQuery
Description copied from interface:IdMapperAdds 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).- Specified by:
addIdsEqualToQueryin interfaceIdMapper- Parameters:
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.
-
addIdsEqualToQuery
public void addIdsEqualToQuery(Parameters parameters, String prefix1, IdMapper mapper2, String prefix2) Description copied from interface:IdMapperAdds 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).- Specified by:
addIdsEqualToQueryin interfaceIdMapper- Parameters:
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.
-
addNullableIdsEqualToQuery
public void addNullableIdsEqualToQuery(Parameters parameters, String prefix1, IdMapper mapper2, String prefix2) Description copied from interface:IdMapperAdds 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).- Specified by:
addNullableIdsEqualToQueryin interfaceIdMapper- Parameters:
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.
-
addIdEqualsToQuery
public void addIdEqualsToQuery(Parameters parameters, Object id, String alias, String prefix, boolean equals) Description copied from interface:IdMapperAdds query statements, which contains restrictions, which express the property that the id of the entity with alias prefix, is equal to the given object.- Specified by:
addIdEqualsToQueryin interfaceIdMapper- Parameters:
parameters- Parameters, to which to add the statements.id- Value of id.alias- the alias to use in the specified parameters (may be null).prefix- Prefix to add to the properties (may be null).equals- Should this query express the"="relation or the"<>"relation.
-
addNamedIdEqualsToQuery
Description copied from interface:IdMapperAdds 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. It is the responsibility of the using method to read parameter values from the id and specify them on the final query object.- Specified by:
addNamedIdEqualsToQueryin interfaceIdMapper- Parameters:
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.
-
addNamedIdEqualsToQuery
public void addNamedIdEqualsToQuery(Parameters parameters, String prefix1, IdMapper mapper, boolean equals) Description copied from interface:IdMapperAdds query statements, which contains named parameters that express the property that the id of the entity with alias prefix is equal to the given object using the specified mapper.- Specified by:
addNamedIdEqualsToQueryin interfaceIdMapper- Parameters:
parameters- Parameters, to which to add the statements.prefix1- Prefix to add to the properties (may be null).mapper- The identifier mapper to useequals- Should this query express the"="relation or the"<>"relation.
-
mapToEntityFromEntity
-
getValueFromObject
-
setValueOnObject
-
getAndSetValue
-