Java Doc for DataSourceCursor.java in  » J2EE » Jaffa » org » jaffa » persistence » engines » jdbcengine » datasource » 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 » J2EE » Jaffa » org.jaffa.persistence.engines.jdbcengine.datasource 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jaffa.persistence.engines.jdbcengine.datasource.DataSourceCursor

DataSourceCursor
public class DataSourceCursor implements Collection(Code)
This class gives a Collection view of a ResultSet. Each row of the ResultSet is molded into an appropriate Persistent object and added to the Collection. The rows are fetched in groups. The size of each group is determined by the 'hitlistSize' parameter of the init.xml for a particular database definition. On creation, the 1st group of rows are fetched. Use the Iterator (a custom implementation), to fetch all the rows. The Collection interface methods will only on the fetched data. The size() method will return a negative value, unless all the data has been fetched.



Constructor Summary
 DataSourceCursor(DataSource dataSource, ResultSet resultSet, ClassMetaData classMetaData, Criteria criteria)
     Creates new DataSourceCursor.

Method Summary
public  booleanadd(Object obj)
     Ensures that this collection contains the specified element. Note: This will not add any data to the Persistent store.
Parameters:
  obj - element whose presence in this collection is to be ensured.
public  booleanaddAll(Collection collection)
     Adds all of the elements in the specified collection to this collection. Note: This will not add any data to the Persistent store.
Parameters:
  collection - elements to be inserted into this collection.
public  voidclear()
     Removes all of the elements from this collection.
public  booleancontains(Object obj)
     Returns true if this collection contains the specified element. Note: This will only check the data that has been fetched so far.
Parameters:
  obj - element whose presence in this collection is to be tested.
public  booleancontainsAll(Collection collection)
     Returns true if this collection contains all of the elements in the specified collection. Note: This will only check the data that has been fetched so far.
Parameters:
  collection - collection to be checked for containment in this collection.
public  booleanisEmpty()
     Returns true if this collection contains no elements.
public  Iteratoriterator()
     Returns a custom iterator.
public  booleanremove(Object obj)
     Removes a single instance of the specified element from this collection, if it is present. Note: This will not remove any data from the Persistent store.
public  booleanremoveAll(Collection collection)
     Removes all this collection's elements that are also contained in the specified collection. Note: This will not remove any data from the Persistent store.
public  booleanretainAll(Collection collection)
     Retains only the elements in this collection that are contained in the specified collection. Note: This will not remove any data from the Persistent store.
public  intsize()
     Returns the number of elements in this collection.
public  Object[]toArray()
     Returns an array containing all of the elements in this collection.
public  Object[]toArray(Object[] obj)
     Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. Note: This will only return the data that has been fetched so far.
Parameters:
  obj - the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.


Constructor Detail
DataSourceCursor
DataSourceCursor(DataSource dataSource, ResultSet resultSet, ClassMetaData classMetaData, Criteria criteria) throws SQLException, PostLoadFailedException, DataSourceCursorRuntimeException, IOException(Code)
Creates new DataSourceCursor. It loads the initial set of rows.
Parameters:
  dataSource - the DataSource object which will be creating this object.
Parameters:
  resultSet - the ResultSet from which the data is to be loded.
Parameters:
  classMetaData - the ClassMetaData definition to be used for molding a row into a Persistent object.
Parameters:
  criteria - The Criteria used for the query. This will provide the values to set the various flags on the Persistent object.
throws:
  SQLException - if any database error occurs.
throws:
  PostLoadFailedException - if any error is thrown in the PostLoad trigger of the persistent object.
throws:
  DataSourceCursorRuntimeException - if any error occurs while molding the row into the Persistent object.
throws:
  IOException - if any error occurs in reading the data from the database.




Method Detail
add
public boolean add(Object obj)(Code)
Ensures that this collection contains the specified element. Note: This will not add any data to the Persistent store.
Parameters:
  obj - element whose presence in this collection is to be ensured. true if this collection changed as a result of the call.



addAll
public boolean addAll(Collection collection)(Code)
Adds all of the elements in the specified collection to this collection. Note: This will not add any data to the Persistent store.
Parameters:
  collection - elements to be inserted into this collection. true if this collection changed as a result of the call.



clear
public void clear() throws DataSourceCursorRuntimeException(Code)
Removes all of the elements from this collection. Note: This will not have any effect on the Persistent store. This will close the underlying ResultSet.
throws:
  DataSourceCursorRuntimeException - if any error occurs in closing the underlying ResultSet.



contains
public boolean contains(Object obj)(Code)
Returns true if this collection contains the specified element. Note: This will only check the data that has been fetched so far.
Parameters:
  obj - element whose presence in this collection is to be tested. true if this collection contains the specified element.



containsAll
public boolean containsAll(Collection collection)(Code)
Returns true if this collection contains all of the elements in the specified collection. Note: This will only check the data that has been fetched so far.
Parameters:
  collection - collection to be checked for containment in this collection. true if this collection contains all of the elements in the specified collection.



isEmpty
public boolean isEmpty()(Code)
Returns true if this collection contains no elements. However, a 'true' does not mean that there is no more data to be fetched; since it is possible that the fetched elements could have been removed by the remove() methods. true if this collection contains no elements.



iterator
public Iterator iterator()(Code)
Returns a custom iterator. Use the iterator for fetching all the rows. an iterator over the elements in this collection.



remove
public boolean remove(Object obj)(Code)
Removes a single instance of the specified element from this collection, if it is present. Note: This will not remove any data from the Persistent store. This will only check the data that has been fetched so far.
Parameters:
  obj - element to be removed from this collection, if present. true if this collection changed as a result of the call.



removeAll
public boolean removeAll(Collection collection)(Code)
Removes all this collection's elements that are also contained in the specified collection. Note: This will not remove any data from the Persistent store. This will only check the data that has been fetched so far.
Parameters:
  collection - elements to be removed from this collection. true if this collection changed as a result of the call.



retainAll
public boolean retainAll(Collection collection)(Code)
Retains only the elements in this collection that are contained in the specified collection. Note: This will not remove any data from the Persistent store. This will only check the data that has been fetched so far.
Parameters:
  collection - elements to be retained in this collection. true if this collection changed as a result of the call.



size
public int size()(Code)
Returns the number of elements in this collection. Note: This will return a negative number, if all the data has not been fetched. the number of elements in this collection;



toArray
public Object[] toArray()(Code)
Returns an array containing all of the elements in this collection. Note: This will only return the data that has been fetched so far. an array containing all of the elements in this collection.



toArray
public Object[] toArray(Object[] obj)(Code)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. Note: This will only return the data that has been fetched so far.
Parameters:
  obj - the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. an array containing the elements of this collection.



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.