Java Doc for DataSet.java in  » Database-ORM » Torque » com » workingdogs » village » 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 » Database ORM » Torque » com.workingdogs.village 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.workingdogs.village.DataSet

All known Subclasses:   com.workingdogs.village.QueryDataSet,  com.workingdogs.village.TableDataSet,
DataSet
abstract public class DataSet (Code)
The DataSet represents a table in the database. It is extended by QueryDataSet and TableDataSet and should not be used directly. A DataSet contains a Schema and potentially a collection of Records.
author:
   Jon S. Stevens
version:
   $Revision: 568 $


Field Summary
final protected static  intALL_RECORDS
    
protected  Connectionconn
    
protected  Vectorrecords
    
protected  ResultSetresultSet
    
protected  Schemaschema
    
protected  StringBufferselectString
    
protected  Statementstmt
    

Constructor Summary
public  DataSet()
    
 DataSet(Connection conn, String tableName)
    
 DataSet(Connection conn, Schema schema, KeyDef keydef)
    
 DataSet(Connection conn, String tableName, KeyDef keydef)
    
 DataSet(Connection conn, String tableName, String columns)
    
 DataSet(Connection conn, String tableName, String columns, KeyDef keyDef)
    

Method Summary
public  RecordaddRecord()
    
public  RecordaddRecord(DataSet ds)
    
public  booleanallRecordsRetrieved()
    
public  DataSetclearRecords()
     Remove all records from the DataSet and nulls those records out and close() the DataSet.
public  voidclose()
     Releases the records, closes the ResultSet and the Statement, and nulls the Schema and Connection references.
public  Connectionconnection()
    
public  booleancontainsRecord(int pos)
    
public  DataSetfetchRecords()
     Causes the DataSet to hit the database and fetch all the records.
public  DataSetfetchRecords(int max)
     Causes the DataSet to hit the database and fetch max records.
public  DataSetfetchRecords(int start, int max)
     Causes the DataSet to hit the database and fetch max records, starting at start.
 RecordfindRecord(int pos)
     Find Record at 0 based index position.
 StringgetColumns()
    
public  RecordgetRecord(int pos)
    
abstract public  StringgetSelectString()
     Classes extending this class must implement this method.
public  KeyDefkeydef()
    
public  intlastFetchSize()
     The number of records that were fetched with the last fetchRecords.
public  int[]maxColumnWidths(boolean with_heading)
     Calculates the maxColumnWidths for the column in a DataSet I really don't know what this is used for so it isn't implemented.
public  DataSetreleaseRecords()
    
public  RecordremoveRecord(Record rec)
    
public  DataSetreset()
    
public  ResultSetresultSet()
    
public  Schemaschema()
    
 voidsetAllRecordsRetrieved(boolean set)
    
public  intsize()
     Gets the number of Records in this DataSet.
public  StringtableName()
    
public  StringtoString()
    

Field Detail
ALL_RECORDS
final protected static int ALL_RECORDS(Code)
indicates that all records should be retrieved during a fetch



conn
protected Connection conn(Code)
this DataSet's connection object



records
protected Vector records(Code)
this DataSet's collection of Record objects



resultSet
protected ResultSet resultSet(Code)
the result set for this DataSet



schema
protected Schema schema(Code)
this DataSet's schema object



selectString
protected StringBuffer selectString(Code)
the select string that was used to build this DataSet



stmt
protected Statement stmt(Code)
the Statement for this DataSet




Constructor Detail
DataSet
public DataSet() throws DataSetException, SQLException(Code)
Private, not used
exception:
  DataSetException -
exception:
  SQLException -



DataSet
DataSet(Connection conn, String tableName) throws DataSetException, SQLException(Code)
Create a new DataSet with a connection and a Table name
Parameters:
  conn -
Parameters:
  tableName -
exception:
  DataSetException -
exception:
  SQLException -



DataSet
DataSet(Connection conn, Schema schema, KeyDef keydef) throws DataSetException, SQLException(Code)
Create a new DataSet with a connection, schema and KeyDef
Parameters:
  conn -
Parameters:
  schema -
Parameters:
  keydef -
exception:
  DataSetException -
exception:
  SQLException -



DataSet
DataSet(Connection conn, String tableName, KeyDef keydef) throws SQLException, DataSetException(Code)
Create a new DataSet with a connection, tablename and KeyDef
Parameters:
  conn -
Parameters:
  tableName -
Parameters:
  keydef -
exception:
  SQLException -
exception:
  DataSetException -



DataSet
DataSet(Connection conn, String tableName, String columns) throws SQLException, DataSetException(Code)
Create a new DataSet with a connection, tablename and list of columns
Parameters:
  conn -
Parameters:
  tableName -
Parameters:
  columns -
exception:
  SQLException -
exception:
  DataSetException -



DataSet
DataSet(Connection conn, String tableName, String columns, KeyDef keyDef) throws SQLException, DataSetException(Code)
Create a new DataSet with a connection, tableName, columns and a KeyDef
Parameters:
  conn -
Parameters:
  tableName -
Parameters:
  columns -
Parameters:
  keyDef -
exception:
  SQLException -
exception:
  DataSetException -




Method Detail
addRecord
public Record addRecord() throws DataSetException, SQLException(Code)
Calls addRecord(DataSet) the added record
exception:
  DataSetException -
exception:
  SQLException -



addRecord
public Record addRecord(DataSet ds) throws DataSetException, SQLException(Code)
Creates a new Record within this DataSet
Parameters:
  ds - the added record
exception:
  DataSetException -
exception:
  SQLException -



allRecordsRetrieved
public boolean allRecordsRetrieved()(Code)
Check if all the records have been retrieve true if all records have been retrieved



clearRecords
public DataSet clearRecords()(Code)
Remove all records from the DataSet and nulls those records out and close() the DataSet. an instance of myself



close
public void close() throws SQLException, DataSetException(Code)
Releases the records, closes the ResultSet and the Statement, and nulls the Schema and Connection references.
exception:
  SQLException -
exception:
  DataSetException -



connection
public Connection connection() throws SQLException(Code)
Gets the current database connection a database connection
exception:
  SQLException -



containsRecord
public boolean containsRecord(int pos)(Code)
Check to see if the DataSet contains a Record at 0 based position
Parameters:
  pos - true if record exists



fetchRecords
public DataSet fetchRecords() throws SQLException, DataSetException(Code)
Causes the DataSet to hit the database and fetch all the records. an instance of myself
exception:
  SQLException -
exception:
  DataSetException -



fetchRecords
public DataSet fetchRecords(int max) throws SQLException, DataSetException(Code)
Causes the DataSet to hit the database and fetch max records.
Parameters:
  max - an instance of myself
exception:
  SQLException -
exception:
  DataSetException -



fetchRecords
public DataSet fetchRecords(int start, int max) throws SQLException, DataSetException(Code)
Causes the DataSet to hit the database and fetch max records, starting at start. Record count begins at 0.
Parameters:
  start -
Parameters:
  max - an instance of myself
exception:
  SQLException -
exception:
  DataSetException -



findRecord
Record findRecord(int pos) throws DataSetException(Code)
Find Record at 0 based index position. This is an internal alternative to getRecord which tries to be smart about the type of record it is.
Parameters:
  pos - an instance of the found Record
exception:
  DataSetException -



getColumns
String getColumns()(Code)
Returns the columns attribute for the DataSet the columns attribute for the DataSet



getRecord
public Record getRecord(int pos) throws DataSetException(Code)
Get Record at 0 based index position
Parameters:
  pos - an instance of the found Record
exception:
  DataSetException -



getSelectString
abstract public String getSelectString() throws DataSetException(Code)
Classes extending this class must implement this method. the select string
throws:
  DataSetException - TODO: DOCUMENT ME!



keydef
public KeyDef keydef()(Code)
gets the KeyDef object for this DataSet the keydef for this DataSet, this value can be null



lastFetchSize
public int lastFetchSize()(Code)
The number of records that were fetched with the last fetchRecords. int



maxColumnWidths
public int[] maxColumnWidths(boolean with_heading) throws DataSetException, SQLException(Code)
Calculates the maxColumnWidths for the column in a DataSet I really don't know what this is used for so it isn't implemented.
Parameters:
  with_heading - int
exception:
  DataSetException -
exception:
  SQLException -



releaseRecords
public DataSet releaseRecords()(Code)
Removes the records from the DataSet, but does not null the records out an instance of myself



removeRecord
public Record removeRecord(Record rec) throws DataSetException(Code)
Remove a record from the DataSet's internal storage
Parameters:
  rec - the record removed
exception:
  DataSetException -



reset
public DataSet reset() throws DataSetException, SQLException(Code)
Essentially the same as releaseRecords, but it won't work on a QueryDataSet that has been created with a ResultSet an instance of myself
exception:
  DataSetException -
exception:
  SQLException -



resultSet
public ResultSet resultSet() throws SQLException, DataSetException(Code)
Gets the ResultSet for this DataSet the result set for this DataSet
exception:
  SQLException -
exception:
  DataSetException -



schema
public Schema schema()(Code)
Gets the Schema for this DataSet the Schema for this DataSet



setAllRecordsRetrieved
void setAllRecordsRetrieved(boolean set)(Code)
Set all records retrieved
Parameters:
  set - TODO: DOCUMENT ME!



size
public int size()(Code)
Gets the number of Records in this DataSet. It is 0 based. number of Records in this DataSet



tableName
public String tableName() throws DataSetException(Code)
Gets the tableName defined in the schema string
throws:
  DataSetException - TODO: DOCUMENT ME!



toString
public String toString()(Code)
This returns a represention of this DataSet TODO: DOCUMENT ME!



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.