Class IntegerEntityId

java.lang.Object
org.fuin.ddd4j.ddd.IntegerEntityId
All Implemented Interfaces:
Serializable, Comparable<IntegerEntityId>, EntityId, TechnicalId, org.fuin.objects4j.vo.ValueObject, org.fuin.objects4j.vo.ValueObjectWithBaseType<Integer>

public abstract class IntegerEntityId extends Object implements EntityId, Comparable<IntegerEntityId>, org.fuin.objects4j.vo.ValueObjectWithBaseType<Integer>
Integer based entity identifier.
See Also:
  • Constructor Details

    • IntegerEntityId

      public IntegerEntityId(@NotNull @NotNull EntityType entityType, @NotNull @NotNull Integer id)
      Constructor with Integer.
      Parameters:
      entityType - Entity type.
      id - Integer.
  • Method Details

    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public final int compareTo(IntegerEntityId other)
      Specified by:
      compareTo in interface Comparable<IntegerEntityId>
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • asString

      public final String asString()
      Description copied from interface: EntityId
      Returns the entity identifier as string.
      Specified by:
      asString in interface EntityId
      Returns:
      Entity identifier.
    • asTypedString

      public final String asTypedString()
      Description copied from interface: EntityId
      Returns the entity identifier as string with type and identifier.
      Specified by:
      asTypedString in interface EntityId
      Returns:
      Type and identifier.
    • getType

      public final EntityType getType()
      Description copied from interface: EntityId
      Returns the type represented by this identifier.
      Specified by:
      getType in interface EntityId
      Returns:
      Type of entity.
    • getBaseType

      public final Class<Integer> getBaseType()
      Specified by:
      getBaseType in interface org.fuin.objects4j.vo.ValueObjectWithBaseType<Integer>
    • asBaseType

      public final Integer asBaseType()
      Specified by:
      asBaseType in interface org.fuin.objects4j.vo.ValueObjectWithBaseType<Integer>