Class Id

All Implemented Interfaces:
Serializable, Comparable

public final class Id extends OpenJPAId
Datastore identity type. Implementations may choose to use this type, or choose to use their own datastore identity values.
Author:
Abe White
See Also:
  • Constructor Details

  • Method Details

    • newInstance

      public static Id newInstance(Class cls, Object val)
      Create an id from the given type and value; the value might be an id instance, a stringified id, or a primary key value.
    • getId

      public long getId()
      Primary key.
    • getIdObject

      public Object getIdObject()
      Description copied from class: OpenJPAId
      Return the identity value as an object.
      Specified by:
      getIdObject in class OpenJPAId
    • idHash

      protected int idHash()
      Description copied from class: OpenJPAId
      Return the id's hash code.
      Specified by:
      idHash in class OpenJPAId
    • idEquals

      protected boolean idEquals(OpenJPAId other)
      Description copied from class: OpenJPAId
      Compare the id to the id of the given instance.
      Specified by:
      idEquals in class OpenJPAId