Class DatastoreUniqueLongId

    • Field Detail

      • key

        public final long key
    • Constructor Detail

      • DatastoreUniqueLongId

        public DatastoreUniqueLongId()
      • DatastoreUniqueLongId

        public DatastoreUniqueLongId​(long key)
      • DatastoreUniqueLongId

        public DatastoreUniqueLongId​(String str)
                              throws IllegalArgumentException
        Constructs an OID from its string representation that is consistent with the output of toString().
        Parameters:
        str - the string representation of an OID
        Throws:
        IllegalArgumentException - if the given string representation is not valid.
        See Also:
        toString()
    • Method Detail

      • getKeyAsObject

        public Object getKeyAsObject()
        Description copied from interface: DatastoreId
        Provides the identity in a form that can be used by the database as a key.
        Specified by:
        getKeyAsObject in interface DatastoreId
        Returns:
        The key value
      • getKey

        public long getKey()
      • getTargetClassName

        public String getTargetClassName()
        Description copied from interface: DatastoreId
        Accessor for the target class name for the persistable object this represents.
        Specified by:
        getTargetClassName in interface DatastoreId
        Returns:
        the class name of the persistable
      • toString

        public String toString()
        Creates a String representation of the datastore identity, formed from the key value. This will be something like
        3254
        Specified by:
        toString in interface DatastoreId
        Overrides:
        toString in class Object
        Returns:
        The String form of the identity