org.apache.manifoldcf.core.database
Class BaseObject

java.lang.Object
  extended by org.apache.manifoldcf.core.database.BaseObject

public class BaseObject
extends java.lang.Object

This is the base paper object, which can represents all the fields of a database row - plus anything else that is added. This works together with BaseTable, if an instance representation is required.


Field Summary
static java.lang.String _rcsid
           
protected  java.util.HashMap fields
           
 
Constructor Summary
BaseObject()
          Construct an empty one.
 
Method Summary
 void clear()
          Clear the current object.
 java.lang.Object getValue(java.lang.String fieldName)
          Get a field by name.
 java.util.Iterator listFields()
          Get the list of fields that currently have values.
 void setValue(java.lang.String fieldName, java.lang.Object fieldValue)
          Set a field by name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values

fields

protected java.util.HashMap fields
Constructor Detail

BaseObject

public BaseObject()
Construct an empty one.

Method Detail

clear

public void clear()
Clear the current object.


listFields

public java.util.Iterator listFields()
Get the list of fields that currently have values.

Returns:
an iterator of the current non-null fields.

getValue

public java.lang.Object getValue(java.lang.String fieldName)
Get a field by name.

Parameters:
fieldName - is the name of the field.
Returns:
the field value, or null if it is not set.

setValue

public void setValue(java.lang.String fieldName,
                     java.lang.Object fieldValue)
Set a field by name.

Parameters:
fieldName - is the name of the field.
fieldValue - is the value, or null if the field should be removed.