org.jaffa.metadata
Class FieldMetaData

java.lang.Object
  extended byorg.jaffa.metadata.FieldMetaData
All Implemented Interfaces:
Cloneable, Comparable, Serializable
Direct Known Subclasses:
BooleanFieldMetaData, CurrencyFieldMetaData, DateOnlyFieldMetaData, DateTimeFieldMetaData, DecimalFieldMetaData, IntegerFieldMetaData, RawFieldMetaData, StringFieldMetaData

public abstract class FieldMetaData
extends Object
implements Cloneable, Comparable, Serializable

This is the base class for all the meta objects.

See Also:
Serialized Form

Field Summary
static String LOWER_CASE
          A constant indicating lowercase.
static String MIXED_CASE
          A constant indicating mixedcase.
static String UPPER_CASE
          A constant indicating uppercase.
 
Constructor Summary
protected FieldMetaData(String name, String dataType, String labelToken, Boolean isMandatory)
          Creates an instance.
 
Method Summary
 Object clone()
          Returns a clone of the object.
 int compareTo(Object obj)
          Compares this object with another FieldMetaData object.
 boolean equals(Object obj)
          Compares this object with another FieldMetaData object.
 String getDataType()
          Getter for property dataType.
 String getLabelToken()
          Getter for property labelToken.
 String getName()
          Getter for property layout.
abstract  int getWidth()
          Getter for property width.
 int hashCode()
          Returns the hash code.
 Boolean isMandatory()
          Getter for property isMandatory.
 String toString()
          Returns the diagnostic information.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UPPER_CASE

public static final String UPPER_CASE
A constant indicating uppercase.

See Also:
Constant Field Values

LOWER_CASE

public static final String LOWER_CASE
A constant indicating lowercase.

See Also:
Constant Field Values

MIXED_CASE

public static final String MIXED_CASE
A constant indicating mixedcase.

See Also:
Constant Field Values
Constructor Detail

FieldMetaData

protected FieldMetaData(String name,
                        String dataType,
                        String labelToken,
                        Boolean isMandatory)
Creates an instance.

Parameters:
name - The field name.
dataType - The data type.
labelToken - The token used for displaying labels.
isMandatory - Indicates if the field is mandatory.
Method Detail

getName

public String getName()
Getter for property layout.

Returns:
Value of property layout.

getDataType

public String getDataType()
Getter for property dataType.

Returns:
Value of property dataType.

getLabelToken

public String getLabelToken()
Getter for property labelToken.

Returns:
Value of property labelToken.

isMandatory

public Boolean isMandatory()
Getter for property isMandatory.

Returns:
Value of property isMandatory.

clone

public Object clone()
Returns a clone of the object.

Returns:
a clone of the object.

hashCode

public int hashCode()
Returns the hash code.

Returns:
the hash code.

equals

public boolean equals(Object obj)
Compares this object with another FieldMetaData object. Returns a true if both the objects have the same properties.

Parameters:
obj - the other FieldMetaData object.
Returns:
a true if both the objects have the same properties.

compareTo

public int compareTo(Object obj)
Compares this object with another FieldMetaData object. Note: this class has a natural ordering that is inconsistent with equals Only the field name is compared.

Specified by:
compareTo in interface Comparable
Parameters:
obj - the other FieldMetaData object.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

toString

public String toString()
Returns the diagnostic information.

Returns:
the diagnostic information.

getWidth

public abstract int getWidth()
Getter for property width.

Returns:
Value of property width.


Copyright © 2002-2004 JAFFA Project.