Java Doc for DataProvider.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » data » provider » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » com.sun.data.provider 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.data.provider.DataProvider

All known Subclasses:   com.sun.data.provider.impl.AbstractDataProvider,
DataProvider
public interface DataProvider (Code)

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




Method Summary
public  voidaddDataListener(DataListener listener)
    
public  DataListener[]getDataListeners()
     An array of the DataListeners currentlyregistered on this DataProvider.
public  FieldKeygetFieldKey(String fieldId)
    

Returns the FieldKey associated with the specified data element canonical id, if any; otherwise, return null.


Parameters:
  fieldId - Canonical id of the requested FieldKey the FieldKey associated with the specified dataelement canonical id, if any; otherwise, returnnull
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null.
public  FieldKey[]getFieldKeys()
     An array of all FieldKeys supported by thisDataProvider.
public  ClassgetType(FieldKey fieldKey)
    

Returns the data type of the data element referenced by the specified data key.


Parameters:
  fieldKey - FieldKey identifying the data elementwhose type is to be returned the data type of the data element referenced by thespecified data key
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null.
public  ObjectgetValue(FieldKey fieldKey)
    

Returns value of the data element referenced by the specified FieldKey .


Parameters:
  fieldKey - FieldKey identifying the data elementwhose value is to be returned value of the data element referenced by the specifiedFieldKey
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null.
public  booleanisReadOnly(FieldKey fieldKey)
    

Return a flag indicating whether the value of the data element represented by the specified FieldKey can be modified via the setValue() method.


Parameters:
  fieldKey - FieldKey identifying the data elementwhose settable status is to be returned a flag indicating whether the value of the data elementrepresented by the specified FieldKey can be modifiedvia the setValue() method
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning true.
public  voidremoveDataListener(DataListener listener)
    
public  voidsetValue(FieldKey fieldKey, Object value)
    

Set the value of the data element represented by the specified FieldKey to the specified new value.


Parameters:
  fieldKey - FieldKey identifying the data elementwhose value is to be modified
Parameters:
  value - New value for this data element
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null.



Method Detail
addDataListener
public void addDataListener(DataListener listener)(Code)

Register a new DataListener to this DataProvider instance.


Parameters:
  listener - New DataListener to register



getDataListeners
public DataListener[] getDataListeners()(Code)
An array of the DataListeners currentlyregistered on this DataProvider. If there are no registeredlisteners, a zero-length array is returned.



getFieldKey
public FieldKey getFieldKey(String fieldId) throws DataProviderException(Code)

Returns the FieldKey associated with the specified data element canonical id, if any; otherwise, return null.


Parameters:
  fieldId - Canonical id of the requested FieldKey the FieldKey associated with the specified dataelement canonical id, if any; otherwise, returnnull
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null. A DPE may also indicate that thepassed fieldId is not valid. Consult the documentation of thespecific DataProvider implementation for details on whatexceptions might be wrapped by a DPE.



getFieldKeys
public FieldKey[] getFieldKeys() throws DataProviderException(Code)
An array of all FieldKeys supported by thisDataProvider. If the set of valid FieldKeys cannotbe determined, return null instead.
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null or an empty array. Consult thedocumentation of the specific DataProvider implementation fordetails on what exceptions might be wrapped by a DPE.



getType
public Class getType(FieldKey fieldKey) throws DataProviderException(Code)

Returns the data type of the data element referenced by the specified data key.


Parameters:
  fieldKey - FieldKey identifying the data elementwhose type is to be returned the data type of the data element referenced by thespecified data key
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null. A DPE may also indicate that thepassed fieldKey is not valid. Consult the documentation of thespecific DataProvider implementation for details on whatexceptions might be wrapped by a DPE.



getValue
public Object getValue(FieldKey fieldKey) throws DataProviderException(Code)

Returns value of the data element referenced by the specified FieldKey .


Parameters:
  fieldKey - FieldKey identifying the data elementwhose value is to be returned value of the data element referenced by the specifiedFieldKey
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null. A DPE may also indicate that thepassed fieldKey is not valid. Consult the documentation of thespecific DataProvider implementation for details on whatexceptions might be wrapped by a DPE.



isReadOnly
public boolean isReadOnly(FieldKey fieldKey) throws DataProviderException(Code)

Return a flag indicating whether the value of the data element represented by the specified FieldKey can be modified via the setValue() method.


Parameters:
  fieldKey - FieldKey identifying the data elementwhose settable status is to be returned a flag indicating whether the value of the data elementrepresented by the specified FieldKey can be modifiedvia the setValue() method
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning true. A DPE may also indicate that thepassed fieldKey is not valid. Consult the documentation of thespecific DataProvider implementation for details on whatexceptions might be wrapped by a DPE.



removeDataListener
public void removeDataListener(DataListener listener)(Code)

Deregister an existing DataListener from this DataProvider instance.


Parameters:
  listener - Old DataListener to deregister



setValue
public void setValue(FieldKey fieldKey, Object value) throws DataProviderException(Code)

Set the value of the data element represented by the specified FieldKey to the specified new value.


Parameters:
  fieldKey - FieldKey identifying the data elementwhose value is to be modified
Parameters:
  value - New value for this data element
throws:
  DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null. A DPE may also indicate that thepassed fieldKey is not valid. Consult the documentation of thespecific DataProvider implementation for details on whatexceptions might be wrapped by a DPE.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.