Class IdTestEntity<O extends IdTestEntity<O>>

java.lang.Object
org.fastnate.generator.test.ids.IdTestEntity<O>
Type Parameters:
O - the type of this class for referencing our self in getOther()
Direct Known Subclasses:
FixedIdTestEntity, IdentityTestEntity, PrimitiveIdTestEntity, SequenceTestEntity, TableTestEntity

@MappedSuperclass public abstract class IdTestEntity<O extends IdTestEntity<O>> extends Object
Base class for all test entities that test the writing of ids.
Author:
Tobias Liefke
  • Constructor Details

    • IdTestEntity

      public IdTestEntity(String name)
    • IdTestEntity

      public IdTestEntity()
  • Method Details

    • getId

      public abstract Serializable getId()
      The ID of this entity.
      Returns:
      the ID - the type depends on the kind of generation
    • getOther

      @Nullable public abstract O getOther()
      The other entity of the same type.
      Returns:
      another entity, for testing references with the id
    • setOther

      public abstract void setOther(@Nullable O other)
      Sets the other entity.
      Parameters:
      other - another entity of the same type, for testing references with the id
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
    • setName

      public void setName(String name)