Java Doc for CachedRowSetXReader.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » sql » rowset » internal » 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.sql.rowset.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.sql.rowset.internal.CachedRowSetXReader

CachedRowSetXReader
public class CachedRowSetXReader implements RowSetReader,Serializable(Code)
An implementation of RowSetReader to work with CachedRowSetX rowsets. Based on the Sun reference implementation of CachedRowSetReader.
See Also:   javax.sql.rowset.spi.SyncProvider
See Also:   javax.sql.rowset.spi.SyncFactory
See Also:   javax.sql.rowset.spi.SyncFactoryException




Method Summary
public  Connectionconnect(RowSetInternal caller)
     Establishes a connection with the data source for the given RowSet object.
protected  booleangetCloseConnection()
     Assists in determining whether the current connection was created by this CachedRowSet to ensure incorrect connections are not prematurely terminated.
public  voidreadData(RowSetInternal caller)
     Reads data from a data source and populates the given RowSet object with that data. This method is called by the rowset internally when the application invokes the method execute to read a new set of rows.

After clearing the rowset of its contents, if any, and setting the number of writer calls to 0, this reader calls its connect method to make a connection to the rowset's data source.

public  booleanreset()
     Checks to see if the writer associated with this reader needs to reset its state.
public  voidsetStartPosition(int pos)
     This sets the start position in the ResultSet from where to begin.



Method Detail
connect
public Connection connect(RowSetInternal caller) throws SQLException(Code)
Establishes a connection with the data source for the given RowSet object. If the rowset's dataSourceName property has been set, this method uses the JNDI API to retrieve the DataSource object that it can use to make the connection. If the url, username, and password properties have been set, this method uses the DriverManager.getConnection method to make the connection.

This method is used internally by the reader and writer associated with the calling RowSet object; an application never calls it directly.
Parameters:
  caller - a RowSet object that has implementedthe RowSetInternal interface and hadthis CachedRowSetXReader object set asits reader a Connection object that represents a connectionto the caller's data source
throws:
  SQLException - if an access error occurs




getCloseConnection
protected boolean getCloseConnection()(Code)
Assists in determining whether the current connection was created by this CachedRowSet to ensure incorrect connections are not prematurely terminated. a boolean giving the status of whether the connection has been closed.



readData
public void readData(RowSetInternal caller) throws SQLException(Code)
Reads data from a data source and populates the given RowSet object with that data. This method is called by the rowset internally when the application invokes the method execute to read a new set of rows.

After clearing the rowset of its contents, if any, and setting the number of writer calls to 0, this reader calls its connect method to make a connection to the rowset's data source. Depending on which of the rowset's properties have been set, the connect method will use a DataSource object or the DriverManager facility to make a connection to the data source.

Once the connection to the data source is made, this reader executes the query in the calling CachedRowSet object's command property. Then it calls the rowset's populate method, which reads data from the ResultSet object produced by executing the rowset's command. The rowset is then populated with this data.

This method's final act is to close the connection it made, thus leaving the rowset disconnected from its data source.
Parameters:
  caller - a RowSet object that has implementedthe RowSetInternal interface and hadthis CachedRowSetXReader object set asits reader
throws:
  SQLException - if there is a database access error, there is aproblem making the connection, or the command property has notbeen set




reset
public boolean reset() throws SQLException(Code)
Checks to see if the writer associated with this reader needs to reset its state. The writer will need to initialize its state if new contents have been read since the writer was last called. This method is called by the writer that was registered with this reader when components were being wired together. true if writer associated with this reader needsto reset the values of its fields; false otherwise
throws:
  SQLException - if an access error occurs



setStartPosition
public void setStartPosition(int pos)(Code)
This sets the start position in the ResultSet from where to begin. This is called by the Reader in the CachedRowSetXImpl to set the position on the page to begin populating from.
Parameters:
  pos - integer indicating the position in the ResultSet to beginpopulating from.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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