com.cafesoft.core.field
Class AbstractFieldInfo

java.lang.Object
  |
  +--com.cafesoft.core.field.AbstractFieldInfo
All Implemented Interfaces:
FieldInfo
Direct Known Subclasses:
IntegerFieldInfo, StringFieldInfo

public abstract class AbstractFieldInfo
extends Object
implements FieldInfo

Abstract implementation of the FieldInfo interface. All subclasses of the FieldInfo type should extend this class. This class simply implements common functionality that is shared between all subclasses of the AbstractFieldInfo class.

Since:
8/12/03
See Also:
FieldInfo

Constructor Summary
AbstractFieldInfo(String name, Object defaultValue, boolean allowNull, boolean isRequired)
          Create abstract FieldInfo.
 
Method Summary
 boolean allowNull()
          Get the null status.
 Object getDefaultValue()
          Get the default Field value.
abstract  FieldType getFieldType()
          Get the FieldType.
 FieldValidationRule getFieldValidationRule()
          Get the FieldValidationRule.
 FieldValueOptions getFieldValueOptions()
          Get the FieldValueOptions.
 String getName()
          Get the Field name.
 boolean isRequired()
          Get the required status.
 void setFieldValidationRule(FieldValidationRule rule)
          Set the FieldValidationRule.
 void setFieldValueOptions(FieldValueOptions options)
          Set the FieldValueOptions.
 String toString()
          Get a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractFieldInfo

public AbstractFieldInfo(String name,
                         Object defaultValue,
                         boolean allowNull,
                         boolean isRequired)
Create abstract FieldInfo.

Parameters:
name - the name of the FieldInfo.
defaultValue - the default value of the FieldInfo object.
allowNull - boolean flag that determines if null is a valid value.
isRequired - boolean flag that determines if a value is required.
Method Detail

getName

public String getName()
Get the Field name.

Specified by:
getName in interface FieldInfo
Returns:
the Field name.

getFieldType

public abstract FieldType getFieldType()
Get the FieldType.

Specified by:
getFieldType in interface FieldInfo
Returns:
the FieldType.

getDefaultValue

public Object getDefaultValue()
Get the default Field value.

Specified by:
getDefaultValue in interface FieldInfo
Returns:
the default Field value.

allowNull

public boolean allowNull()
Get the null status.

Specified by:
allowNull in interface FieldInfo
Returns:
the true if the Field is allowed to be null, false otherwise.

isRequired

public boolean isRequired()
Get the required status.

Specified by:
isRequired in interface FieldInfo
Returns:
the true if the Field is required, else false.

getFieldValidationRule

public FieldValidationRule getFieldValidationRule()
Get the FieldValidationRule.

Specified by:
getFieldValidationRule in interface FieldInfo
Returns:
the FieldValidationRule.

setFieldValidationRule

public void setFieldValidationRule(FieldValidationRule rule)
Set the FieldValidationRule.

Specified by:
setFieldValidationRule in interface FieldInfo
Parameters:
rule - the new FieldValidationRule.

getFieldValueOptions

public FieldValueOptions getFieldValueOptions()
Get the FieldValueOptions.

Specified by:
getFieldValueOptions in interface FieldInfo
Returns:
the FieldValueOptions object, or null if one does not exist.

setFieldValueOptions

public void setFieldValueOptions(FieldValueOptions options)
Set the FieldValueOptions.

Specified by:
setFieldValueOptions in interface FieldInfo
Parameters:
options - the new FieldValueOptions.

toString

public String toString()
Get a String representation of this object.

Overrides:
toString in class Object
Returns:
a String representation of this object.


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.