Interface EntityIdentifier

    • Method Detail

      • fromString

        EntityIdentifier fromString​(String id)
        Sets the identifier's value from its given String representation.
        Parameters:
        id - the encoded value of the identifier.
        Returns:
        the identifier decoded from the specified String representation.
      • generateNewId

        EntityIdentifier generateNewId​(String... parameters)
        Generates a new unique entity identifier. "Auto-Increment" identifiers must implement this method.
        Parameters:
        parameters - the parameters required in the generation of the new identifier. Those depends on the kind of entity identifier and they must be documented in the concrete class.
        Returns:
        a new identifier.
      • compareTo

        default int compareTo​(EntityIdentifier o)
        Compares this identifier of entity with the specified one. The comparing is done by their String representation.
        Specified by:
        compareTo in interface Comparable<EntityIdentifier>
        Parameters:
        o - another entity identifier.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        See Also:
        Comparable.compareTo(Object)