org.dbforms.config
Class Field

java.lang.Object
  extended by org.dbforms.config.Field
All Implemented Interfaces:
Serializable

public class Field
extends Object
implements Serializable

This class represents a field tag in dbforms-config.xml.

Author:
foxat
See Also:
Serialized Form

Constructor Summary
Field()
           
 
Method Summary
static String dumpFieldValueArray(FieldValue[] fv)
          Dump the fieldValue objects contained into the input FieldValue array.
 String getDirectory()
          Gets the directory attribute of the Field object
 IEscaper getEscaper()
          DOCUMENT ME!
 String getEscaperClass()
          DOCUMENT ME!
 String getExpression()
          Gets the expression attribute of the Field object
 String getFieldName(String core)
          DOCUMENT ME!
 String getFieldType()
          DOCUMENT ME!
 Format getFormat(String pattern, Locale locale)
          DOCUMENT ME!
 int getId()
          Gets the id attribute of the Field object
 String getName()
          Gets the name attribute of the Field object
 String getSearchAlgoName()
          DOCUMENT ME!
 String getSearchFieldName()
          DOCUMENT ME!
 String getSearchModeName()
          DOCUMENT ME!
 int getSize()
          Gets the size attribute of the Field object
 String getSortFieldName()
          DOCUMENT ME!
 Table getTable()
          DOCUMENT ME!
 int getType()
          Gets the type attribute of the Field object as numeric value.
 boolean hasAutoIncSet()
          Gets the isAutoInc attribute of the Field object
 boolean hasEncodedSet()
          Gets the encoding attribute of the Field object
 boolean hasIsKeySet()
          Gets the key attribute of the Field object
 boolean hasSortableSet()
          Gets the fieldSortable attribute of the Field object
 void setAutoInc(String autoInc)
          Sets the autoInc attribute of the Field object
 void setDirectory(String directory)
          Sets the directory attribute of the Field object
 void setEncoding(String encoding)
          Sets the encoding attribute of the Field object
 void setEscaperClass(String string)
          DOCUMENT ME!
 void setExpression(String expression)
          Sets the expression attribute of the Field object
 void setFieldType(String aFieldType)
          Maps the field type description to internal value.
 void setId(int id)
          sets the id of this field-object (this method is called by Table on init).
 void setIsKey(String value)
          Sets the isKey attribute of the Field object
 void setName(String name)
          Sets the name attribute of the Field object
 void setSize(int size)
          Sets the size attribute of the Field object
 void setSortable(String sortable)
          Sets the sortable attribute of the Field object
 void setTable(Table table)
          DOCUMENT ME!
 void setTypeByObject(Object obj)
          DOCUMENT ME!
 String toString()
          Get the String representation of this Field object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field()
Method Detail

setAutoInc

public void setAutoInc(String autoInc)
Sets the autoInc attribute of the Field object

Parameters:
autoInc - The new autoInc value

setDirectory

public void setDirectory(String directory)
Sets the directory attribute of the Field object

Parameters:
directory - The new directory value

getDirectory

public String getDirectory()
Gets the directory attribute of the Field object

Returns:
The directory value

setEncoding

public void setEncoding(String encoding)
Sets the encoding attribute of the Field object

Parameters:
encoding - The new encoding value

getEscaper

public IEscaper getEscaper()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setEscaperClass

public void setEscaperClass(String string)
DOCUMENT ME!

Parameters:
string -

setExpression

public void setExpression(String expression)
Sets the expression attribute of the Field object

Parameters:
expression - The new expression value

getExpression

public String getExpression()
Gets the expression attribute of the Field object

Returns:
The expression value

getFieldName

public String getFieldName(String core)
DOCUMENT ME!

Parameters:
core - DOCUMENT ME!
Returns:
DOCUMENT ME!

setFieldType

public void setFieldType(String aFieldType)
Maps the field type description to internal value.
We need this information in oder to call the appropriate PreparedStatement.setXxx(..) methods
this method is called by the digester framework to set the fieldType!

Parameters:
aFieldType - the type string value (example: "int", "char", "numeric", etc)

getFieldType

public String getFieldType()
DOCUMENT ME!

Returns:

getFormat

public Format getFormat(String pattern,
                        Locale locale)
DOCUMENT ME!

Parameters:
pattern - DOCUMENT ME!
locale - DOCUMENT ME!
Returns:
DOCUMENT ME!

setId

public void setId(int id)
sets the id of this field-object (this method is called by Table on init).

Parameters:
id - The new id value

getId

public int getId()
Gets the id attribute of the Field object

Returns:
The id value

setIsKey

public void setIsKey(String value)
Sets the isKey attribute of the Field object

Parameters:
value - The new isKey value

setName

public void setName(String name)
Sets the name attribute of the Field object

Parameters:
name - The new name value

getName

public String getName()
Gets the name attribute of the Field object

Returns:
The name value

setSortable

public void setSortable(String sortable)
Sets the sortable attribute of the Field object

Parameters:
sortable - The new sortable value

getType

public int getType()
Gets the type attribute of the Field object as numeric value.
It's read only because the field type is set by the digester during initialize!

Returns:
The type value

setTypeByObject

public void setTypeByObject(Object obj)
DOCUMENT ME!

Parameters:
obj - DOCUMENT ME!

dumpFieldValueArray

public static final String dumpFieldValueArray(FieldValue[] fv)
Dump the fieldValue objects contained into the input FieldValue array.

Parameters:
fv - the FieldValue array to dump
Returns:
the String object containing the dumped data, or null if the input array is null

getEscaperClass

public String getEscaperClass()
DOCUMENT ME!

Returns:

getSearchAlgoName

public String getSearchAlgoName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getSearchFieldName

public String getSearchFieldName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getSearchModeName

public String getSearchModeName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSize

public void setSize(int size)
Sets the size attribute of the Field object

Parameters:
size - DOCUMENT ME!

getSize

public int getSize()
Gets the size attribute of the Field object

Returns:
DOCUMENT ME!

getSortFieldName

public String getSortFieldName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTable

public void setTable(Table table)
DOCUMENT ME!

Parameters:
table -

getTable

public Table getTable()
DOCUMENT ME!

Returns:

hasAutoIncSet

public boolean hasAutoIncSet()
Gets the isAutoInc attribute of the Field object

Returns:
The isAutoInc value

hasEncodedSet

public boolean hasEncodedSet()
Gets the encoding attribute of the Field object

Returns:
The encoding value

hasIsKeySet

public boolean hasIsKeySet()
Gets the key attribute of the Field object

Returns:
The key value

hasSortableSet

public boolean hasSortableSet()
Gets the fieldSortable attribute of the Field object

Returns:
The fieldSortable value

toString

public String toString()
Get the String representation of this Field object.

Overrides:
toString in class Object
Returns:
the String representation of this Field object


Copyright © 2002-2006 DbForms. All Rights Reserved.