public final class FieldRef extends java.lang.Object
A fieldref is is useful when a set of fields are created programmatically from a database table and need to be retrieved from the form (but we don't know the names of those fields since they were created dynamically -- however, those fields can be added both to the form and to a fieldref and obtained via then the name of the fieldref (whose name we do know.)
Note: Any fields contained in this object must also be added directly to the form.
Constructor and Description |
---|
FieldRef(java.lang.String name)
Creates a new field with the specified name.
|
FieldRef(java.lang.String name,
java.lang.Object obj)
Creates a new field with the specified name and the
specified object (which may be any data structure like a
list, map or whatever containing references to fields in
the form).
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object obj)
Adds an object to this fieldref.
|
java.util.List |
getList()
Returns the data object contained in this fieldref as a List.
|
java.util.Map |
getMap()
Returns the data object contained in this fieldref as a Map.
|
java.lang.Object |
getObject()
Returns the data object contained in this fieldref.
|
java.lang.String |
toString() |
public FieldRef(java.lang.String name)
public FieldRef(java.lang.String name, java.lang.Object obj)
public void add(java.lang.Object obj)
public java.util.List getList()
public java.util.Map getMap()
public java.lang.Object getObject()
public java.lang.String toString()
toString
in class java.lang.Object