Expresso 5-6

com.jcorporate.expresso.core.dbobj
Class DBField

java.lang.Object
  extended bycom.jcorporate.expresso.core.dbobj.DBField
All Implemented Interfaces:
DataFieldMetaData, Serializable

public class DBField
extends Object
implements Serializable, DataFieldMetaData

A DBField object represents a single field definition in a DBObjectDef. It does not store any actual data, only the meta-data associated with a field.

Author:
Michael Nash
See Also:
Serialized Form

Field Summary
static Set allDataTypes
          Contains a list of all recognized expresso data types.
protected  boolean allowNull
          Is a null value allowed for this field.
static String ARRAY_TYPE
           
static String ATTRIBUTE_ERROR
          Attribute String for if there's an error with the field.
static String ATTRIBUTE_ERROR_MESSAGE
          Attribute String for what message to display if there's an error with thie field.
protected  Hashtable attributes
          User Defined Attributes for each field.
static String AUTOINC_TYPE
          AUTOINC_TYPE is a special expresso type code for auto-increment field, a synonym for integer.
static String BIGINT_TYPE
           
static String BINARY_TYPE
           
static String BIT_TYPE
           
static String BLOB_TYPE
           
static String BOOLEAN_MASK
          Boolean regular expression syntax for easy reference.
static String BOOLEAN_TYPE
          boolean is synonym for bit
static String CHAR_TYPE
           
static String CLOB_TYPE
           
static String DATE_MASK
          Date regular expression syntax for easy reference.
static String DATE_TYPE
           
static String DATETIME_TYPE
          datetime is a synonym for timestamp
static String DECIMAL_TYPE
           
protected  String description
          The user friendly description of this field.
static String DOUBLE_TYPE
           
protected  boolean encrypted
          Set this value to true if you want a particular string field encrypted (Not implemented yet)
protected  String expressoFieldTypeString
          The string "type" used to specify this type of field in Expresso
protected  String fieldName
           
protected  int fieldSize
          The size of this field.
protected  String filterMethod
          What is the string filtering method applied with this filter
static String FLOAT_MASK
          Floating point regular expression syntax for easy reference.
static String FLOAT_TYPE
           
protected  boolean hashed
          Set this value to true if you want a particular string field hashed instead of stored in plaintext.
static String INT_MASK
          Integer Regular Expression for easy reference
static String INT_TYPE
          int is synonym for integer
static String INTEGER_TYPE
           
protected  boolean isCharacterLongObject
          Is this object a CLOB?
protected  boolean isFloatingPointType
           
protected  boolean isKey
          Is this a key field?
protected  boolean isLongObject
          Is this object a LOB?
protected  boolean isMultiValued
          Is this a multivalued field
protected  boolean isReadOnly
          Is this field readonly?
protected  boolean isSecret
          Does this field not appear in standard DBMaint listings?
protected  boolean isVirtual
          Is this a virtual field: Ie, does the system provide all values for this field.
static String JAVA_OBJECT
           
static String LONG_TYPE
          long is a synonym for BIGINT
static String LONGVARBINARY
           
static String LONGVARCHAR_TYPE
           
protected  String lookupDefinition
          Optional parameter that defines the definition of the lookup object if the lookup object implements the Defineable interface.
protected  String lookupField
          String for the lookup field in the lookup object that maps to this field.
protected  String lookupObject
          String for lookup object classname
protected  org.apache.oro.text.regex.Pattern mask
           
static String NULL_TYPE
          null isn't supported in expresso as of 5/02
static String NUMERIC_TYPE
           
static String OTHER_TYPE
           
protected  int precision
          Field precision, if applicable to this field
static String REAL_TYPE
           
static String REF_TYPE
           
static String SMALLINT_TYPE
           
static String STRUCT_TYPE
           
static String TEXT_TYPE
          text is a synonym for longvarchar
static String TIME_TYPE
           
static String TIMESTAMP_TYPE
           
static String TINYINT_TYPE
           
static String VARBINARY_TYPE
           
static String VARCHAR_TYPE
           
 
Constructor Summary
DBField(String myName, String myType, int newPrecision, boolean myAllowNull, String myDescrip)
          constructor for types with no size
DBField(String myName, String myType, int mySize, int newPrecision, boolean myAllowNull, String myDescrip)
          Constructor: A DBField is initialized knowing it's name, type, size, description and whether or not it can accept null or empty values
 
Method Summary
 boolean allowsNull()
          Does this field allow nulls?
 Set getAllAttributes()
          Retrieves all attribute names for this particular data field's metadata
 Object getAttribute(String attribName)
          Returns an attribute keyed by name.
 Iterator getAttributesIterator()
          Returns a copy of all attributes associated with this field.
 String getDefaultValue()
          Retrieve the default value for the field.
 String getDescription()
          Return the description of this field
 Class getFilterClass()
          getter for Filter Class used in conjuction with get/setFilterMethod
 String getFilterMethod()
          Return the filter method currently used for this field.
 String getLength()
          Return the length of the field in characters
 int getLengthInt()
          Return the length of this field as an integer
 String getLookupDefinition()
          Future versions of Expresso will rely more on objects that are shown as unique by a combination of their classname and their definition names.
 String getLookupField()
          When you get a lookup object, to perform a complete mapping between the two, you need to know what field name in the remote object maps to this field.
 String getLookupObject()
          Return the value for the lookupObject for this field
 org.apache.oro.text.regex.Pattern getMask()
          Get the compiled regular expression for this field.
 String getName()
          Return the name of the field
 int getPrecision()
          Return the precision of this field as an integer
 String getTypeString()
          Return the database type of the field as specified with a string in the DBObject itself
 boolean isAutoIncremented()
          Is this field an auto-incremented field?
 boolean isBinaryObjectType()
          Is it a BLOB?
 boolean isBooleanType()
          is the field a boolean?
 boolean isCharacterLongObjectType()
          Is this field fall into the classification of a long character object?
 boolean isDateOnlyType()
          is the field a date or time field?
 boolean isDateTimeType()
          is the field a date or time field?
 boolean isDateType()
          is the field a date or time field?
 boolean isEncrypted()
          Return the field's hashed status
 boolean isFloatingPointType()
           
 boolean isHashed()
          Return the field's hashed status
 boolean isKey()
          Is this field a key field?
 boolean isLongBinaryType()
          Is it a LONGVARBINARY?
 boolean isLongCharacterType()
          Is it a LONGVARCHAR?
 boolean isLongObjectType()
          Does this field fall into a class of BLOB object data types?
 boolean isMasked()
          Return boolean if the field has a mask set
 boolean isMultiValued()
          Is this field multi-valued?
 boolean isNumericType()
          is the field a numeric field?
 boolean isQuotedTextType()
          is the field a quoted text field?
 boolean isReadOnly()
          Return the field's read-only
 boolean isSecret()
          Return the field's secret status
 boolean isTimeType()
          is the field a date or time field?
 boolean isVirtual()
          Is this field a virtual field?
 void removeAttribute(String attribName)
          Removes an attribute from this Field object.
 void setAttribute(String attribName, Object attribValue)
          Sets an attribute for this particular field.
 void setDefaultMask()
          Set the field's default mask according to it's type
 void setDefaultValue(String newValue)
          Sets the default value of the field.
 void setEncrypted(boolean newValue)
          Set the field's encrypted status
 void setFilterClass(Class filterClass)
          Set's the name of the filter class to be used used in conjuction with get/setFilterMethod
 String setFilterMethod(String newMethod)
          Set's the name of the filter method to be used
 void setHashed(boolean newValue)
          Set the field's hashed status.
 void setKey(boolean newKey)
          Set this field as a key field (or not)
 void setLookupDefinition(String definitionName)
          Sets the value for the "lookup definition" this is the name of the definition for objects implementing the defineable interface.
 void setLookupField(String lookupFieldName)
          Sets the value for the "lookup field".
 void setLookupObject(String objectName)
          Set the value for the "lookup object" for this field.
 void setMask(org.apache.oro.text.regex.Pattern newMask)
          Set a regular expression "mask" for this field that specifies it's valid values.
 void setMultiValued(boolean newMulti)
          Set this field to be "multi-valued".
 void setReadOnly()
          Set the field as a read-only field.
 void setSecret()
          Set the field as a 'secret' field.
 void setVirtual(boolean newVirtual)
          Set this field as a virtual field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOINC_TYPE

public static final transient String AUTOINC_TYPE
AUTOINC_TYPE is a special expresso type code for auto-increment field, a synonym for integer.

See Also:
Constant Field Values

ARRAY_TYPE

public static final transient String ARRAY_TYPE
See Also:
Constant Field Values

BIGINT_TYPE

public static final transient String BIGINT_TYPE
See Also:
Constant Field Values

BINARY_TYPE

public static final transient String BINARY_TYPE
See Also:
Constant Field Values

BIT_TYPE

public static final transient String BIT_TYPE
See Also:
Constant Field Values

BOOLEAN_TYPE

public static final transient String BOOLEAN_TYPE
boolean is synonym for bit

See Also:
Constant Field Values

BLOB_TYPE

public static final transient String BLOB_TYPE
See Also:
Constant Field Values

CHAR_TYPE

public static final transient String CHAR_TYPE
See Also:
Constant Field Values

CLOB_TYPE

public static final transient String CLOB_TYPE
See Also:
Constant Field Values

DATE_TYPE

public static final transient String DATE_TYPE
See Also:
Constant Field Values

DATETIME_TYPE

public static final transient String DATETIME_TYPE
datetime is a synonym for timestamp

See Also:
Constant Field Values

DOUBLE_TYPE

public static final transient String DOUBLE_TYPE
See Also:
Constant Field Values

DECIMAL_TYPE

public static final transient String DECIMAL_TYPE
See Also:
Constant Field Values

FLOAT_TYPE

public static final transient String FLOAT_TYPE
See Also:
Constant Field Values

INTEGER_TYPE

public static final transient String INTEGER_TYPE
See Also:
Constant Field Values

INT_TYPE

public static final transient String INT_TYPE
int is synonym for integer

See Also:
Constant Field Values

JAVA_OBJECT

public static final transient String JAVA_OBJECT
See Also:
Constant Field Values

LONG_TYPE

public static final transient String LONG_TYPE
long is a synonym for BIGINT

See Also:
Constant Field Values

LONGVARCHAR_TYPE

public static final transient String LONGVARCHAR_TYPE
See Also:
Constant Field Values

LONGVARBINARY

public static final transient String LONGVARBINARY
See Also:
Constant Field Values

NULL_TYPE

public static final transient String NULL_TYPE
null isn't supported in expresso as of 5/02

See Also:
Constant Field Values

NUMERIC_TYPE

public static final transient String NUMERIC_TYPE
See Also:
Constant Field Values

OTHER_TYPE

public static final transient String OTHER_TYPE
See Also:
Constant Field Values

REAL_TYPE

public static final transient String REAL_TYPE
See Also:
Constant Field Values

REF_TYPE

public static final transient String REF_TYPE
See Also:
Constant Field Values

SMALLINT_TYPE

public static final transient String SMALLINT_TYPE
See Also:
Constant Field Values

STRUCT_TYPE

public static final transient String STRUCT_TYPE
See Also:
Constant Field Values

TIME_TYPE

public static final transient String TIME_TYPE
See Also:
Constant Field Values

TIMESTAMP_TYPE

public static final transient String TIMESTAMP_TYPE
See Also:
Constant Field Values

TEXT_TYPE

public static final transient String TEXT_TYPE
text is a synonym for longvarchar

See Also:
Constant Field Values

TINYINT_TYPE

public static final transient String TINYINT_TYPE
See Also:
Constant Field Values

VARBINARY_TYPE

public static final transient String VARBINARY_TYPE
See Also:
Constant Field Values

VARCHAR_TYPE

public static final transient String VARCHAR_TYPE
See Also:
Constant Field Values

BOOLEAN_MASK

public static final String BOOLEAN_MASK
Boolean regular expression syntax for easy reference.

See Also:
Constant Field Values

DATE_MASK

public static final String DATE_MASK
Date regular expression syntax for easy reference.

See Also:
Constant Field Values

INT_MASK

public static final String INT_MASK
Integer Regular Expression for easy reference

See Also:
Constant Field Values

FLOAT_MASK

public static final String FLOAT_MASK
Floating point regular expression syntax for easy reference.

See Also:
Constant Field Values

ATTRIBUTE_ERROR

public static final String ATTRIBUTE_ERROR
Attribute String for if there's an error with the field.

See Also:
Constant Field Values

ATTRIBUTE_ERROR_MESSAGE

public static final String ATTRIBUTE_ERROR_MESSAGE
Attribute String for what message to display if there's an error with thie field.

See Also:
Constant Field Values

fieldName

protected String fieldName

expressoFieldTypeString

protected String expressoFieldTypeString
The string "type" used to specify this type of field in Expresso


allowNull

protected boolean allowNull
Is a null value allowed for this field.


description

protected String description
The user friendly description of this field.


fieldSize

protected int fieldSize
The size of this field. ex: 80 for VARCHAR(80)


isVirtual

protected boolean isVirtual
Is this a virtual field: Ie, does the system provide all values for this field.


mask

protected org.apache.oro.text.regex.Pattern mask

attributes

protected Hashtable attributes
User Defined Attributes for each field.


isMultiValued

protected boolean isMultiValued
Is this a multivalued field


isSecret

protected boolean isSecret
Does this field not appear in standard DBMaint listings?


isReadOnly

protected boolean isReadOnly
Is this field readonly?


lookupObject

protected String lookupObject
String for lookup object classname


lookupField

protected String lookupField
String for the lookup field in the lookup object that maps to this field.


lookupDefinition

protected String lookupDefinition
Optional parameter that defines the definition of the lookup object if the lookup object implements the Defineable interface.


isKey

protected boolean isKey
Is this a key field?


isLongObject

protected boolean isLongObject
Is this object a LOB?


isCharacterLongObject

protected boolean isCharacterLongObject
Is this object a CLOB?


filterMethod

protected String filterMethod
What is the string filtering method applied with this filter


encrypted

protected boolean encrypted
Set this value to true if you want a particular string field encrypted (Not implemented yet)


hashed

protected boolean hashed
Set this value to true if you want a particular string field hashed instead of stored in plaintext. (Not implamented yet)


precision

protected int precision
Field precision, if applicable to this field


isFloatingPointType

protected boolean isFloatingPointType

allDataTypes

public static transient Set allDataTypes
Contains a list of all recognized expresso data types.

Constructor Detail

DBField

public DBField(String myName,
               String myType,
               int mySize,
               int newPrecision,
               boolean myAllowNull,
               String myDescrip)
        throws DBException
Constructor: A DBField is initialized knowing it's name, type, size, description and whether or not it can accept null or empty values

Parameters:
myName - Field name of this field
myType - Database type of the field - use string constant from DBField
mySize - Size of the field in characters
newPrecision - precision for this field
myAllowNull - True if null is allowed, false if not
myDescrip - Description (title) of the field

DBField

public DBField(String myName,
               String myType,
               int newPrecision,
               boolean myAllowNull,
               String myDescrip)
        throws DBException
constructor for types with no size

Parameters:
myName - Field name of this field
myType - Database type of the field - use string constant from DBField
newPrecision - precision for this field
myAllowNull - True if null is allowed, false if not
myDescrip - Description (title) of the field
Method Detail

allowsNull

public boolean allowsNull()
Does this field allow nulls?

Specified by:
allowsNull in interface DataFieldMetaData
Returns:
boolean True if the field allows null, else false if it does not

getDescription

public String getDescription()
Return the description of this field

Specified by:
getDescription in interface DataFieldMetaData
Returns:
String Description of the field

getDefaultValue

public String getDefaultValue()
Retrieve the default value for the field.

Specified by:
getDefaultValue in interface DataFieldMetaData
Returns:
String

setDefaultValue

public void setDefaultValue(String newValue)
Sets the default value of the field.

Specified by:
setDefaultValue in interface DataFieldMetaData
Parameters:
newValue - String

getFilterMethod

public String getFilterMethod()
Return the filter method currently used for this field.

Returns:
The name of the filter method

getLength

public String getLength()
Return the length of the field in characters

Returns:
String A String containing the number of characters of this fields length

getLengthInt

public int getLengthInt()
Return the length of this field as an integer

Specified by:
getLengthInt in interface DataFieldMetaData
Returns:
int The length of this field in characters

getLookupObject

public String getLookupObject()
Return the value for the lookupObject for this field

Specified by:
getLookupObject in interface DataFieldMetaData
Returns:
String for the lookup object for this field

getLookupDefinition

public String getLookupDefinition()
Future versions of Expresso will rely more on objects that are shown as unique by a combination of their classname and their definition names. All instances of Defineable must have a corresponding definition name.

Specified by:
getLookupDefinition in interface DataFieldMetaData
Returns:
java.lang.String

getLookupField

public String getLookupField()
When you get a lookup object, to perform a complete mapping between the two, you need to know what field name in the remote object maps to this field.

Specified by:
getLookupField in interface DataFieldMetaData
Returns:
java.lang.String or null if there is no lookup field
Throws:
IllegalArgumentException - if the field name does not exist

getName

public String getName()
Return the name of the field

Specified by:
getName in interface DataFieldMetaData
Returns:
String The name of this field

getPrecision

public int getPrecision()
Return the precision of this field as an integer

Specified by:
getPrecision in interface DataFieldMetaData
Returns:
int The precision of this field

getTypeString

public String getTypeString()
Return the database type of the field as specified with a string in the DBObject itself

Specified by:
getTypeString in interface DataFieldMetaData
Returns:
The type of this field

isKey

public boolean isKey()
Is this field a key field?

Specified by:
isKey in interface DataFieldMetaData
Returns:
true if this field is a key field

isMultiValued

public boolean isMultiValued()
Is this field multi-valued?

Specified by:
isMultiValued in interface DataFieldMetaData
Returns:
boolean True if the field is multi-valued, else false

isReadOnly

public boolean isReadOnly()
Return the field's read-only

Specified by:
isReadOnly in interface DataFieldMetaData
Returns:
True if the field is readonly, else false if it is not

isBooleanType

public boolean isBooleanType()
is the field a boolean? cache answer for efficiency, since field type is immutable

Specified by:
isBooleanType in interface DataFieldMetaData
Returns:
True if the field is boolean

isCharacterLongObjectType

public boolean isCharacterLongObjectType()
Is this field fall into the classification of a long character object?

Specified by:
isCharacterLongObjectType in interface DataFieldMetaData
Returns:
boolean true if it does

isLongObjectType

public boolean isLongObjectType()
Does this field fall into a class of BLOB object data types?

Specified by:
isLongObjectType in interface DataFieldMetaData
Returns:
boolean true if it does

isLongBinaryType

public boolean isLongBinaryType()
Is it a LONGVARBINARY? This is calculated by if it is a long object and is NOT a character long object.

Specified by:
isLongBinaryType in interface DataFieldMetaData
Returns:
boolean True if it is

isLongCharacterType

public boolean isLongCharacterType()
Is it a LONGVARCHAR? This is calculated by if it is a long object and is NOT a character long object.

Specified by:
isLongCharacterType in interface DataFieldMetaData
Returns:
boolean True if it is

isBinaryObjectType

public boolean isBinaryObjectType()
Is it a BLOB? This is calculated by if it is a long object and is NOT a character long object.

Specified by:
isBinaryObjectType in interface DataFieldMetaData
Returns:
boolean True if it is

isQuotedTextType

public boolean isQuotedTextType()
is the field a quoted text field? cache answer for efficiency, since field type is immutable

Specified by:
isQuotedTextType in interface DataFieldMetaData
Returns:
True if the field is text field

isNumericType

public boolean isNumericType()
is the field a numeric field? cache answer for efficiency, since field type is immutable

Specified by:
isNumericType in interface DataFieldMetaData
Returns:
true if the field is numberic field

isDateType

public boolean isDateType()
is the field a date or time field? cache answer for efficiency, since field type is immutable

Specified by:
isDateType in interface DataFieldMetaData
Returns:
true if the field is date or time field

isDateOnlyType

public boolean isDateOnlyType()
is the field a date or time field? cache answer for efficiency, since field type is immutable

Specified by:
isDateOnlyType in interface DataFieldMetaData
Returns:
true if the field is date field author Yves Henri AMAIZO

isFloatingPointType

public boolean isFloatingPointType()
Specified by:
isFloatingPointType in interface DataFieldMetaData

isTimeType

public boolean isTimeType()
is the field a date or time field? cache answer for efficiency, since field type is immutable

Specified by:
isTimeType in interface DataFieldMetaData
Returns:
true if the field is time field author Yves Henri AMAIZO

isDateTimeType

public boolean isDateTimeType()
is the field a date or time field? cache answer for efficiency, since field type is immutable

Specified by:
isDateTimeType in interface DataFieldMetaData
Returns:
true if the field is dateTime or Timestamp field author Yves Henri AMAIZO

isSecret

public boolean isSecret()
Return the field's secret status

Specified by:
isSecret in interface DataFieldMetaData
Returns:
True if the field is secret, else false if it is not

isHashed

public boolean isHashed()
Return the field's hashed status

Specified by:
isHashed in interface DataFieldMetaData
Returns:
True if the field is secret, else false if it is not

isEncrypted

public boolean isEncrypted()
Return the field's hashed status

Specified by:
isEncrypted in interface DataFieldMetaData
Returns:
True if the field is secret, else false if it is not

isVirtual

public boolean isVirtual()
Is this field a virtual field? E.g. not stored in the database

Specified by:
isVirtual in interface DataFieldMetaData
Returns:
boolean True if the field is virtual, else false

setFilterMethod

public String setFilterMethod(String newMethod)
                       throws DBException
Set's the name of the filter method to be used

Parameters:
newMethod - The name of the filter method to use.
Returns:
old filter just replaced
Throws:
DBException
See Also:
FilterManager

setKey

public void setKey(boolean newKey)
Set this field as a key field (or not)

Specified by:
setKey in interface DataFieldMetaData
Parameters:
newKey - Is this field a key?

setLookupObject

public void setLookupObject(String objectName)
Set the value for the "lookup object" for this field. This is a database object name which can be used to look up valid values for this field by the user. This is used by the standard maintenance forms to create a "Lookup" link alongside the field if this value is set

Specified by:
setLookupObject in interface DataFieldMetaData
Parameters:
objectName - the classname of the lookup object

setLookupField

public void setLookupField(String lookupFieldName)
Sets the value for the "lookup field". This is the field name in the lookup object that maps to this particular field.

Parameters:
lookupFieldName - the name of the field to retrieve.

setLookupDefinition

public void setLookupDefinition(String definitionName)
Sets the value for the "lookup definition" this is the name of the definition for objects implementing the defineable interface.

Parameters:
definitionName - java.lang.String. Depends on the class implementation of the Defineable implementation.

setMultiValued

public void setMultiValued(boolean newMulti)
Set this field to be "multi-valued". A multi-valued field has a specific set of valid values, often from another database object. Any multi-valued field may be used in a call to the getValues method, which will return a hashtable of the valid values for the field and descriptions for those values.

Specified by:
setMultiValued in interface DataFieldMetaData
Parameters:
newMulti - True if the field is multi-valued, false if it is not
See Also:
DBObject.isMultiValued(java.lang.String)

setHashed

public void setHashed(boolean newValue)
Set the field's hashed status. Only works if the field is a string data type (in the future CLOB should be ok too) [This is currently not yet implemented and tested]

Specified by:
setHashed in interface DataFieldMetaData
Parameters:
newValue - true if you want this field hashed.

setEncrypted

public void setEncrypted(boolean newValue)
Set the field's encrypted status

Specified by:
setEncrypted in interface DataFieldMetaData
Parameters:
newValue - new value if you want an encrypted field

setReadOnly

public void setReadOnly()
Set the field as a read-only field. Read only fields are still used against the database, but are not offered for updating when the automatic database maintenance servlet creates a form on the screen. Note this is different from the setAutoIncremented method below, which means this field will not participate in any add or update statement to the database.

Specified by:
setReadOnly in interface DataFieldMetaData

isAutoIncremented

public boolean isAutoIncremented()
Is this field an auto-incremented field?

Specified by:
isAutoIncremented in interface DataFieldMetaData
Returns:
true if this field is autoincremented

setSecret

public void setSecret()
Set the field as a 'secret' field. Secret fields are not shown in listings of data from this database object, and are only available to users with update, add or delete permissions

Specified by:
setSecret in interface DataFieldMetaData

setVirtual

public void setVirtual(boolean newVirtual)
Set this field as a virtual field. A virtual field is part of the object but not stored in the database table.

Specified by:
setVirtual in interface DataFieldMetaData
Parameters:
newVirtual - True to make this object virtual, false if it is not

setMask

public void setMask(org.apache.oro.text.regex.Pattern newMask)
Set a regular expression "mask" for this field that specifies it's valid values. The mask should already be compiled by the regular expression compiler

Specified by:
setMask in interface DataFieldMetaData
Parameters:
newMask - The compiled regular expression mask

setDefaultMask

public void setDefaultMask()
                    throws DBException
Set the field's default mask according to it's type

Throws:
DBException - on error

getMask

public org.apache.oro.text.regex.Pattern getMask()
Get the compiled regular expression for this field.

Specified by:
getMask in interface DataFieldMetaData
Returns:
the precompiled regular expression mask

removeAttribute

public void removeAttribute(String attribName)
Removes an attribute from this Field object.

Specified by:
removeAttribute in interface DataFieldMetaData
Parameters:
attribName - The name of the attribute to remove from this field.

setAttribute

public void setAttribute(String attribName,
                         Object attribValue)
Sets an attribute for this particular field.

Specified by:
setAttribute in interface DataFieldMetaData
Parameters:
attribName - the name of the attribute
attribValue - the value of the attribute by this name

getAttribute

public Object getAttribute(String attribName)
Returns an attribute keyed by name. An attribute is an arbitrary object you can associate with a particular db field.

Specified by:
getAttribute in interface DataFieldMetaData
Parameters:
attribName - the name of the attribute to get
Returns:
java.lang.Object the object associated with this attribute name

getAttributesIterator

public Iterator getAttributesIterator()
Returns a copy of all attributes associated with this field.

Specified by:
getAttributesIterator in interface DataFieldMetaData
Returns:
a valid Iterator to a HashMap OR null if no attributes exist for this field

getAllAttributes

public Set getAllAttributes()
Retrieves all attribute names for this particular data field's metadata

Specified by:
getAllAttributes in interface DataFieldMetaData
Returns:
java.util.Set

getFilterClass

public Class getFilterClass()
getter for Filter Class used in conjuction with get/setFilterMethod

Returns:
class for current filter; NULL if not explicitly set; NULL implies using standard filter
See Also:
getFilterMethod()

setFilterClass

public void setFilterClass(Class filterClass)
                    throws DBException
Set's the name of the filter class to be used used in conjuction with get/setFilterMethod

Parameters:
filterClass - The class of the filter method to use.
Throws:
DBException
See Also:
setFilterMethod(java.lang.String), FilterManager

isMasked

public boolean isMasked()
Return boolean if the field has a mask set

Specified by:
isMasked in interface DataFieldMetaData
Returns:
True if the field mask is set, else false if it is not

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.