net.sourceforge.sqlunit.beans
Class FieldBean

java.lang.Object
  extended by net.sourceforge.sqlunit.beans.FieldBean

public class FieldBean
extends java.lang.Object

Models a field element.

Version:
$Revision: 1.1 $
Author:
Douglas Kvidera (dkvidera@users.sourceforge.net) - 05/15/06

Constructor Summary
FieldBean(java.lang.String name, java.lang.Object value)
          Constructs bean with given name and value.
 
Method Summary
 java.lang.String getName()
          Returns name of field.
 java.lang.Object getValue()
          Returns value of field.
 void setName(java.lang.String name)
          Sets name of field.
 void setValue(java.lang.Object value)
          Sets value of field.
 org.jdom.Element toElement()
          Returns a JDOM Element representing this Field object.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldBean

public FieldBean(java.lang.String name,
                 java.lang.Object value)
Constructs bean with given name and value. If the given value is not null and not a String, it will be converted to a StructBean.

Parameters:
name - field name.
value - String or other object; can be null.
Method Detail

getName

public java.lang.String getName()
Returns name of field.

Returns:
field name.

setName

public void setName(java.lang.String name)
Sets name of field.

Parameters:
name - field name.

getValue

public java.lang.Object getValue()
Returns value of field.

Returns:
field value; can be null.

setValue

public void setValue(java.lang.Object value)
Sets value of field.

Parameters:
value - field value.

toElement

public final org.jdom.Element toElement()
Returns a JDOM Element representing this Field object.

Returns:
a JDOM Element representing this Field object.

toString

public final java.lang.String toString()
Returns the string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of this object.