org.jaffa.metadata
Class CurrencyFieldMetaData

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

public class CurrencyFieldMetaData
extends FieldMetaData

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

See Also:
Serialized Form

Field Summary
static int DEFAULT_FRAC_SIZE
          Default Fraction Size.
static int DEFAULT_INT_SIZE
          Default Integer Size.
static int DEFAULT_WIDTH
          Default width.
 
Fields inherited from class org.jaffa.metadata.FieldMetaData
LOWER_CASE, MIXED_CASE, UPPER_CASE
 
Constructor Summary
CurrencyFieldMetaData()
          Creates an instance.
CurrencyFieldMetaData(String name, String labelToken, Boolean isMandatory, String layout, Currency minValue, Currency maxValue, Integer intSize, Integer fracSize)
          Creates an instance.
 
Method Summary
 Object clone()
          Returns a clone of the object.
 int compareTo(Object obj)
          Compares this object with another CurrencyFieldMetaData object.
 boolean equals(Object obj)
          Compares this object with another CurrencyFieldMetaData object.
static String getCurrencyFormat()
           
 Integer getFracSize()
          Getter for property fracSize.
 Integer getIntSize()
          Getter for property intSize.
 String getLayout()
          Getter for property layout.
 Currency getMaxValue()
          Getter for property maxValue.
 Currency getMinValue()
          Getter for property minValue.
 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

DEFAULT_INT_SIZE

public static final int DEFAULT_INT_SIZE
Default Integer Size.

See Also:
Constant Field Values

DEFAULT_FRAC_SIZE

public static final int DEFAULT_FRAC_SIZE
Default Fraction Size.

See Also:
Constant Field Values
Constructor Detail

CurrencyFieldMetaData

public CurrencyFieldMetaData()
Creates an instance.


CurrencyFieldMetaData

public CurrencyFieldMetaData(String name,
                             String labelToken,
                             Boolean isMandatory,
                             String layout,
                             Currency minValue,
                             Currency maxValue,
                             Integer intSize,
                             Integer fracSize)
Creates an instance.

Parameters:
name - The field name.
labelToken - The token used for displaying labels.
isMandatory - Indicates if the field is mandatory.
layout - The layout.
minValue - The minimum value.
maxValue - The maximum value.
intSize - The maximum number of significant digits.
fracSize - The maximum number of fractional digits.
Method Detail

getLayout

public String getLayout()
Getter for property layout.

Returns:
Value of property layout.

getMinValue

public Currency getMinValue()
Getter for property minValue.

Returns:
Value of property minValue.

getMaxValue

public Currency getMaxValue()
Getter for property maxValue.

Returns:
Value of property maxValue.

getIntSize

public Integer getIntSize()
Getter for property intSize.

Returns:
Value of property intSize.

getFracSize

public Integer getFracSize()
Getter for property fracSize.

Returns:
Value of property fracSize.

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 CurrencyFieldMetaData object. Returns a true if both the objects have the same properties.

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

compareTo

public int compareTo(Object obj)
Compares this object with another CurrencyFieldMetaData 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 CurrencyFieldMetaData 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.

getCurrencyFormat

public static String getCurrencyFormat()


Copyright © 2002-2004 JAFFA Project.