edu.vt.middleware.ed
Class AbstractDataType

java.lang.Object
  extended by edu.vt.middleware.ed.AbstractDataType
All Implemented Interfaces:
DataType, Serializable, Comparable<DataType>
Direct Known Subclasses:
AbstractAttribute, AcademicLevel, AccountState, AccountTransition, AccountType, AddressType, ArbitratedDataSource, ArbitratedNamespace, ArchiveType, BannerAcademicLevel, Campus, CertificateType, College, Country, Department, EmailAccountType, EmailAddressType, ExternalEmailAddressType, IdentifierType, Major, PasswordType, PersonAffiliation, PersonNameType, PersonType, PhoneNumberType, RoleType, ServiceType, StateProv, Term, TicketType

public abstract class AbstractDataType
extends Object
implements DataType, Serializable, Comparable<DataType>

Base implementation of a DataType.

Version:
$Revision: 7963 $
Author:
Daniel Fisher
See Also:
Serialized Form

Field Summary
protected static int HASH_CODE_SEED
          hash code seed
private static long serialVersionUID
          Serialization version marker
private  String typeCode
          type code
private  String typeName
          type name
 
Constructor Summary
AbstractDataType()
           
 
Method Summary
 int compareTo(DataType other)
          
 boolean equals(Object o)
          This returns whether the supplied object is equal to this object.
protected static DataType getDataType(DataType[] dataTypes, String typeCode)
          This returns the data type in the supplied set for the supplied type code.
 String getTypeCode()
          This returns the type code.
 String getTypeName()
          This returns the type name.
 int hashCode()
          This returns the hash code for this object.
 void setTypeCode(String s)
          This sets the type code.
 void setTypeName(String s)
          This sets the type name.
 String toString()
          Returns a String representation of this data type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HASH_CODE_SEED

protected static final int HASH_CODE_SEED
hash code seed

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
Serialization version marker

See Also:
Constant Field Values

typeCode

private String typeCode
type code


typeName

private String typeName
type name

Constructor Detail

AbstractDataType

public AbstractDataType()
Method Detail

getTypeCode

public String getTypeCode()
This returns the type code.

Specified by:
getTypeCode in interface DataType
Returns:
String - code

setTypeCode

public void setTypeCode(String s)
This sets the type code.

Specified by:
setTypeCode in interface DataType
Parameters:
s - String to set

getTypeName

public String getTypeName()
This returns the type name.

Specified by:
getTypeName in interface DataType
Returns:
String - name

setTypeName

public void setTypeName(String s)
This sets the type name.

Specified by:
setTypeName in interface DataType
Parameters:
s - String to set

compareTo

public int compareTo(DataType other)

Specified by:
compareTo in interface Comparable<DataType>

getDataType

protected static DataType getDataType(DataType[] dataTypes,
                                      String typeCode)
This returns the data type in the supplied set for the supplied type code.

Parameters:
dataTypes - DataType[]
typeCode - String
Returns:
DataType

equals

public boolean equals(Object o)
This returns whether the supplied object is equal to this object.

Overrides:
equals in class Object
Parameters:
o - Object
Returns:
boolean

hashCode

public int hashCode()
This returns the hash code for this object.

Overrides:
hashCode in class Object
Returns:
int

toString

public String toString()
Returns a String representation of this data type.

Overrides:
toString in class Object
Returns:
String


Copyright © 2008 Virginia Tech. All Rights Reserved.