| |
|
| java.lang.Object com.sun.data.provider.impl.AbstractDataProvider com.sun.data.provider.impl.ObjectDataProvider
ObjectDataProvider | public class ObjectDataProvider extends AbstractDataProvider (Code) | | This
com.sun.data.provider.DataProvider wraps access to a single
Java Object. The
FieldKey s correspond to the JavaBean properties and
optionally the public member fields of the Java Object.
NOTE about Serializable: This class wraps access to any Java Object. The
Object can be swapped out using the setObject(Object) method.
For this class to remain Serializable, the contained Object must also be
Serializable.
author: Joe Nuxoll author: Winston Prakash (bug fixes) |
Constructor Summary | |
public | ObjectDataProvider() Constructs a new ObjectDataProvider with default settings, and no
contained Object. | public | ObjectDataProvider(Object object) Constructs a new ObjectDataProvider to wrap the specified Object. | public | ObjectDataProvider(Object object, boolean includeFields) Creates a new ObjectDataProvider to wrap the specified Object. |
ObjectDataProvider | public ObjectDataProvider()(Code) | | Constructs a new ObjectDataProvider with default settings, and no
contained Object. Use setObject to set the contained Object.
|
ObjectDataProvider | public ObjectDataProvider(Object object)(Code) | | Constructs a new ObjectDataProvider to wrap the specified Object.
Parameters: object - The Object to wrap as a DataProvider |
ObjectDataProvider | public ObjectDataProvider(Object object, boolean includeFields)(Code) | | Creates a new ObjectDataProvider to wrap the specified Object. The
public fields will be included if 'includeFields' is set to true.
Parameters: object - The Object to wrap as a DataProvider Parameters: includeFields - true to include the public fields, false to onlysurface the public properties as FieldKeys. |
getObject | public Object getObject()(Code) | | The Object being represented by this DataProvider |
isIncludeFields | public boolean isIncludeFields()(Code) | | The boolean state of the includeFields property |
setIncludeFields | public void setIncludeFields(boolean includeFields)(Code) | | Sets the includeFields property. This affects the set of
FieldKey s that this
com.sun.data.provider.DataProvider emits.
If includeFields is set to true (the default), then public fields will
be included in the list of available keys (intermixed with the public
properties). If it is set to false, then only the public properties
will be available.
Parameters: includeFields - true to include the public fields, orfalse to exclude them (and only show publicproperties) |
setObject | public void setObject(Object object)(Code) | | Sets the Object to be wrapped by this DataProvider. Calling this method
will result in the passed object being introspected to populate the list
of public properties and fields to make up the list of FieldKeys.
Parameters: object - The Object to be wrapped by this DataProvider |
|
|
|