Class BaseObject
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseObject
-
public class BaseObject extends java.lang.ObjectThis 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.
-
-
Constructor Summary
Constructors Constructor Description BaseObject()Construct an empty one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear the current object.java.lang.ObjectgetValue(java.lang.String fieldName)Get a field by name.java.util.IteratorlistFields()Get the list of fields that currently have values.voidsetValue(java.lang.String fieldName, java.lang.Object fieldValue)Set a field by name.
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
fields
protected java.util.HashMap fields
-
-
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.
-
-