Interface DatastoreId

All Known Implementing Classes:
DatastoreIdImpl, DatastoreIdImplKodo, DatastoreIdImplXcalia, DatastoreUniqueLongId

public interface DatastoreId
Interface for a datastore-identity class to implement. Please refer to the JDO specification 5.4.3 for precise requirements of such a class. These include
  • Has to implement Serializable
  • Serializable fields have to be public
  • Has to have a constructor taking a String (the same String that toString() returns)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Provides the identity in a form that can be used by the database as a key.
    Accessor for the target class name for the persistable object this represents.
    int
     
    Returns the string representation of the identity.
  • Method Details

    • getKeyAsObject

      Object getKeyAsObject()
      Provides the identity in a form that can be used by the database as a key.
      Returns:
      The key value
    • getTargetClassName

      String getTargetClassName()
      Accessor for the target class name for the persistable object this represents.
      Returns:
      the class name of the persistable
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      String toString()
      Returns the string representation of the identity. The string representation should contain enough information to be usable as input to a String constructor to create the identity.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the identity.