edu.jhu.tmaj.beans.data.datatypes
Class LookupRecord

java.lang.Object
  extended by edu.jhu.tmaj.beans.data.datatypes.LookupRecord
All Implemented Interfaces:
MetaObject, java.io.Serializable, java.lang.Comparable<LookupRecord>

public final class LookupRecord
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<LookupRecord>, MetaObject

A record from a lookup table. See LookupTable.java for details on Lookup Tables.

See Also:
Serialized Form

Constructor Summary
LookupRecord(int id, java.lang.String name)
           
 
Method Summary
 int compareTo(LookupRecord arg0)
           
 boolean equals(java.lang.Object obj)
           
 int getID()
          Returns the primary key of the record.
 java.lang.String getName()
          Returns the value the record has for the description field.
 MetaObject getRenamedCopy(java.lang.String newName)
          Returns the same MetaObject, except with a different name.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LookupRecord

public LookupRecord(int id,
                    java.lang.String name)
Method Detail

equals

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

hashCode

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getID

public int getID()
Returns the primary key of the record.

Specified by:
getID in interface MetaObject

getName

public java.lang.String getName()
Returns the value the record has for the description field.


compareTo

public int compareTo(LookupRecord arg0)
Specified by:
compareTo in interface java.lang.Comparable<LookupRecord>

getRenamedCopy

public MetaObject getRenamedCopy(java.lang.String newName)
Description copied from interface: MetaObject
Returns the same MetaObject, except with a different name. The ID and foreign keys will be the exact same.

Specified by:
getRenamedCopy in interface MetaObject