## org.hibernate.envers.entities.mapper.id
Class AbstractIdMapper

    java.lang.Object
      org.hibernate.envers.entities.mapper.id.AbstractIdMapper

All Implemented Interfaces:
  IdMapper

Direct Known Subclasses:
  AbstractCompositeIdMapper, SingleIdMapper

    public abstract class AbstractIdMapper

extends Object
implements IdMapper

Constructor Summary
`AbstractIdMapper()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.hibernate.envers.entities.mapper.id.IdMapper
`mapToEntityFromMap, mapToIdFromEntity, mapToIdFromMap, mapToMapFromEntity, mapToMapFromId, mapToQueryParametersFromId, prefixMappedProperties`

Constructor Detail

### AbstractIdMapper

    public AbstractIdMapper()

Method Detail

### addIdsEqualToQuery

    public void addIdsEqualToQuery(Parameters parameters,
                                   String prefix1,
                                   String prefix2)

  Description copied from interface: `IdMapper`
  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).

  Specified by:
    `addIdsEqualToQuery` in interface `IdMapper`
  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: `IdMapper`
  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).

  Specified by:
    `addIdsEqualToQuery` in interface `IdMapper`
  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 prefix,
                                   boolean equals)

  Description copied from interface: `IdMapper`
  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.

  Specified by:
    `addIdEqualsToQuery` in interface `IdMapper`
  Parameters:
    `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.

### addNamedIdEqualsToQuery

    public void addNamedIdEqualsToQuery(Parameters parameters,
                                        String prefix,
                                        boolean equals)

  Description copied from interface: `IdMapper`
  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. 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:
    `addNamedIdEqualsToQuery` in interface `IdMapper`
  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.

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.