org.jaffa.metadata
Class StringFieldMetaData

java.lang.Object
  extended byorg.jaffa.metadata.FieldMetaData
      extended byorg.jaffa.metadata.StringFieldMetaData
All Implemented Interfaces:
Cloneable, Comparable, Serializable

public class StringFieldMetaData
extends FieldMetaData

An instance of this class will hold meta information for a String field.

See Also:
Serialized Form

Field Summary
static int DEFAULT_WIDTH
          Default width.
 
Fields inherited from class org.jaffa.metadata.FieldMetaData
LOWER_CASE, MIXED_CASE, UPPER_CASE
 
Constructor Summary
StringFieldMetaData()
          Creates an instance.
StringFieldMetaData(String name, String labelToken, Boolean isMandatory, String pattern, Integer length, String caseType)
          Creates an instance.
StringFieldMetaData(String name, String labelToken, Boolean isMandatory, String pattern, Integer length, String caseType, Integer minLength)
          Creates an instance.
 
Method Summary
 Object clone()
          Returns a clone of the object.
 int compareTo(Object obj)
          Compares this object with another StringFieldMetaData object.
 boolean equals(Object obj)
          Compares this object with another StringFieldMetaData object.
 String getCaseType()
          Getter for property caseType.
 Integer getLength()
          Getter for property length.
 Integer getMinLength()
          Getter for property minLength.
 String getPattern()
          Getter for property pattern.
 int getWidth()
          Getter for property width.
 int hashCode()
          Returns the hash code.
 String toString()
          Returns the diagnostic information.
 
Methods inherited from class org.jaffa.metadata.FieldMetaData
getDataType, getLabelToken, getName, isMandatory
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
Default width.

See Also:
Constant Field Values
Constructor Detail

StringFieldMetaData

public StringFieldMetaData()
Creates an instance.


StringFieldMetaData

public StringFieldMetaData(String name,
                           String labelToken,
                           Boolean isMandatory,
                           String pattern,
                           Integer length,
                           String caseType)
Creates an instance.

Parameters:
name - The field name.
labelToken - The token used for displaying labels.
isMandatory - Indicates if the field is mandatory.
pattern - The pattern.
length - The maximum length.
caseType - The case type (upper, lower or mixed).

StringFieldMetaData

public StringFieldMetaData(String name,
                           String labelToken,
                           Boolean isMandatory,
                           String pattern,
                           Integer length,
                           String caseType,
                           Integer minLength)
Creates an instance.

Parameters:
name - The field name.
labelToken - The token used for displaying labels.
isMandatory - Indicates if the field is mandatory.
pattern - The pattern.
length - The maximum length.
caseType - The case type (upper, lower or mixed).
minLength - The minimum length.
Method Detail

getPattern

public String getPattern()
Getter for property pattern.

Returns:
Value of property pattern.

getLength

public Integer getLength()
Getter for property length.

Returns:
Value of property length.

getCaseType

public String getCaseType()
Getter for property caseType.

Returns:
Value of property caseType.

getMinLength

public Integer getMinLength()
Getter for property minLength.

Returns:
Value of property minLength.

clone

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

Overrides:
clone in class FieldMetaData
Returns:
a clone of the object.

hashCode

public int hashCode()
Returns the hash code.

Overrides:
hashCode in class FieldMetaData
Returns:
the hash code.

equals

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

Overrides:
equals in class FieldMetaData
Parameters:
obj - the other StringFieldMetaData object.
Returns:
a true if both the objects have the same properties.

compareTo

public int compareTo(Object obj)
Compares this object with another StringFieldMetaData object. Note: this class has a natural ordering that is inconsistent with equals

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class FieldMetaData
Parameters:
obj - the other StringFieldMetaData 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.

Overrides:
toString in class FieldMetaData
Returns:
the diagnostic information.

getWidth

public int getWidth()
Getter for property width.

Specified by:
getWidth in class FieldMetaData
Returns:
Value of property width.


Copyright © 2002-2004 JAFFA Project.