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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.Object getKeyAsObject()
      Provides the identity in a form that can be used by the database as a key.
      java.lang.String getTargetClassName()
      Accessor for the target class name for the persistable object this represents.
      int hashCode()  
      java.lang.String toString()
      Returns the string representation of the identity.
    • Method Detail

      • getKeyAsObject

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

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

        boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        java.lang.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 java.lang.Object
        Returns:
        the string representation of the identity.