edu.jhu.tmaj.beans.data
Class StaticEnumeration

java.lang.Object
  extended by edu.jhu.tmaj.beans.data.StaticEnumeration
All Implemented Interfaces:
PickListEnumeration, java.io.Serializable, java.lang.Comparable

public final class StaticEnumeration
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable, PickListEnumeration

Represent a record in a static Lookup table. For example, BlockFixations is a static Lookup table for Blocks. An instance of this class may represent a record that has a BlockFixationID#2 and a value of "Formalin".

See Also:
Serialized Form

Constructor Summary
StaticEnumeration(int id, java.lang.String value)
          Initializes this class.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object obj)
           
 int getID()
          Returns the ID of the enumeration
 int hashCode()
           
 java.lang.String toString()
          Returns the name of the enumeration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StaticEnumeration

public StaticEnumeration(int id,
                         java.lang.String value)
Initializes this class.

Parameters:
id - the value of the "primary key" column in the lookup table (for example, "#2")
value - the value of the "name" column in the lookup table (for example, "Formalin")
Method Detail

toString

public java.lang.String toString()
Returns the name of the enumeration

Overrides:
toString in class java.lang.Object

getID

public int getID()
Returns the ID of the enumeration


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable