Class TzDbentity<T extends TzDbentity>

java.lang.Object
org.bedework.timezones.common.db.TzDbentity<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, Comparable<T>
Direct Known Subclasses:
LocalizedString, TzAlias, TzDbSpec

public class TzDbentity<T extends TzDbentity> extends Object implements Comparable<T>, Serializable
Base type for a database entity. We require an id and the subclasses must implement hashcode and compareTo.
Version:
1.0
Author:
Mike Douglass
See Also:
  • Constructor Details

    • TzDbentity

      public TzDbentity()
  • Method Details

    • setId

      public void setId(long val)
      Parameters:
      val - tzid
    • getId

      public long getId()
      Returns:
      long id
    • setSeq

      public void setSeq(int val)
      Set the seq for this entity
      Parameters:
      val - int seq
    • getSeq

      public int getSeq()
      Get the entity seq
      Returns:
      int the entity seq
    • unsaved

      public boolean unsaved()
      Returns:
      true if this entity is not saved.
    • toStringSegment

      protected void toStringSegment(org.bedework.util.misc.ToString ts)
      Add our stuff to the ToString builder
      Parameters:
      ts - for result
    • clone

      public Object clone()
      Make visible
      Overrides:
      clone in class Object
      Returns:
      Object of class T
    • compareTo

      public int compareTo(T o)
      Specified by:
      compareTo in interface Comparable<T extends TzDbentity>
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object