Class EntityKey

  • All Implemented Interfaces:
    Serializable

    public final class EntityKey
    extends Object
    implements Serializable
    Uniquely identifies of an entity instance in a particular Session by identifier. Note that it's only safe to be used within the scope of a Session: it doesn't consider for example the tenantId as part of the equality definition.

    Information used to determine uniqueness consists of the entity-name and the identifier value (see equals(java.lang.Object)).

    Performance considerations: lots of instances of this type are created at runtime. Make sure each one is as small as possible by storing just the essential needed.

    See Also:
    Serialized Form