DataProvider is an interface that describes a single set of data
elements, each identified by a
FieldKey . Applications may retrieve
a list of available
FieldKey s supported by a particular
DataProvider instance, or acquire a
FieldKey for a
particular canonical name (whose intrinsic meaning is defined by the
particular
DataProvider implementation in use). For each
supported
FieldKey , the corresponding data element's
value may be retrieved, and (optionally) modified, or its data type
and read-only status may be acquired.
The base
DataProvider interface describes access to individual
data elements. In addition, specialized subinterfaces are defined for
access to multiple data elements.
TableDataProvider provides access to tabular data, with
multiple rows each containing data elements corresponding to the same set
of
FieldKey s.
DataProvider imposes no requirements or limitations related to
whether it is legal to access the same
DataProvider instance from
multiple threads that are operating simultaneously. Thread safety
considerations are a feature of particular implementations.
Most methods throw
DataProviderException , which is a generic
runtime exception indicating something is amiss in the internal state of the
DataProvider implementation. Because DPE is a runtime exception, method
calls are not required to be wrapped in a try...catch block, but it is
advised to check the documentation of the particular DataProvider
implementation to see what conditions will cause a DataProviderException to
be thrown. It is recommended to always wrap calls to this interface in
try...catch blocks in case an unforseen error condition arises at runtime.
author: Joe Nuxoll |