| |
|
| java.lang.Object com.sun.data.provider.impl.MethodResultDataProvider
MethodResultDataProvider | public class MethodResultDataProvider implements RefreshableDataProvider,Serializable(Code) | | A DataProvider implementation to wrap the singleton (non-array) return
value from a method. Set the dataClassInstance ,
dataMethod , and dataMethodArguments properties to
point to a method on a class instance. The result from that method call
will be wrapped as a DataProvider.
author: cao, Joe Nuxoll |
Constructor Summary | |
public | MethodResultDataProvider() Constructs a new MethodResultDataProvider with no dataClassInstance
or dataMethod specified. | public | MethodResultDataProvider(Object dataClassInstance, Method dataMethod) Constructs a new MethodResultDataProvider using the specified
dataClassInstance and dataMethod. |
MethodResultDataProvider | public MethodResultDataProvider()(Code) | | Constructs a new MethodResultDataProvider with no dataClassInstance
or dataMethod specified.
|
MethodResultDataProvider | public MethodResultDataProvider(Object dataClassInstance, Method dataMethod)(Code) | | Constructs a new MethodResultDataProvider using the specified
dataClassInstance and dataMethod.
Parameters: dataClassInstance - The class instance where the method is invoked Parameters: dataMethod - The method where the data is from |
getDataClassInstance | public Object getDataClassInstance()(Code) | | Returns the dataClassInstance that contains the dataMethod to be invoked.
Object |
getDataMethod | public Method getDataMethod()(Code) | | Returns the currently set dataMethod
Method |
getDataMethodArguments | public Object[] getDataMethodArguments()(Code) | | Returns the dataMethodArguments
Object[] |
invokeDataMethod | public void invokeDataMethod() throws DataProviderException(Code) | | Invokes the dataMethod using the arguments specified by the
dataMethodArguments property.
|
invokeDataMethod | public void invokeDataMethod(Object[] args) throws DataProviderException(Code) | | Invokes the dataMethod using the specified arguments.
Parameters: args - Object[] |
isIncludeFields | public boolean isIncludeFields()(Code) | | The boolean state of the includeFields property |
refresh | public void refresh() throws DataProviderException(Code) | | Invokes the dataMethod on the dataClassInstance to refresh the data
provider's contets
|
refreshFieldKeys | protected void refreshFieldKeys()(Code) | | Refreshes the list of available fieldKeys (based on the return type of
the dataMethod)
|
setDataClassInstance | public void setDataClassInstance(Object instance)(Code) | | Sets the dataClassInstance that contains the dataMethod to be invoked.
Parameters: instance - Object |
setDataMethod | public void setDataMethod(Method method)(Code) | | Sets the dataMethod that will be invoked
Parameters: method - Method |
setDataMethodArguments | public void setDataMethodArguments(Object[] methodArgs)(Code) | | Sets the dataMethodArguments, which will be passed to the dataMethod
when it is invoked.
Parameters: methodArgs - Object[] |
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) |
testInvokeDataMethod | protected void testInvokeDataMethod() throws DataProviderException(Code) | | Tests to see if the dataMethod has been invoked, and invokes it if it
has not.
|
|
|
|