Source Code Cross Referenced for RowData.java in  » Database-JDBC-Connection-Pool » mysql-connector-java-5.1.3 » com » mysql » jdbc » 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 JDBC Connection Pool » mysql connector java 5.1.3 » com.mysql.jdbc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         Copyright (C) 2002-2007 MySQL AB
003:
004:         This program is free software; you can redistribute it and/or modify
005:         it under the terms of version 2 of the GNU General Public License as 
006:         published by the Free Software Foundation.
007:
008:         There are special exceptions to the terms and conditions of the GPL 
009:         as it is applied to this software. View the full text of the 
010:         exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
011:         software distribution.
012:
013:         This program is distributed in the hope that it will be useful,
014:         but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016:         GNU General Public License for more details.
017:
018:         You should have received a copy of the GNU General Public License
019:         along with this program; if not, write to the Free Software
020:         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
021:
022:
023:
024:         */
025:        package com.mysql.jdbc;
026:
027:        import java.sql.SQLException;
028:
029:        /**
030:         * This interface abstracts away how row data is accessed by the result set. It
031:         * is meant to allow a static implementation (Current version), and a streaming
032:         * one.
033:         * 
034:         * @author dgan
035:         */
036:        public interface RowData {
037:
038:            /**
039:             * What's returned for the size of a result set when its size can not be
040:             * determined.
041:             */
042:            public static final int RESULT_SET_SIZE_UNKNOWN = -1;
043:
044:            /**
045:             * Adds a row to this row data.
046:             * 
047:             * @param row
048:             *            the row to add
049:             * @throws SQLException
050:             *             if a database error occurs
051:             */
052:            void addRow(ResultSetRow row) throws SQLException;
053:
054:            /**
055:             * Moves to after last.
056:             * 
057:             * @throws SQLException
058:             *             if a database error occurs
059:             */
060:            void afterLast() throws SQLException;
061:
062:            /**
063:             * Moves to before first.
064:             * 
065:             * @throws SQLException
066:             *             if a database error occurs
067:             */
068:            void beforeFirst() throws SQLException;
069:
070:            /**
071:             * Moves to before last so next el is the last el.
072:             * 
073:             * @throws SQLException
074:             *             if a database error occurs
075:             */
076:            void beforeLast() throws SQLException;
077:
078:            /**
079:             * We're done.
080:             * 
081:             * @throws SQLException
082:             *             if a database error occurs
083:             */
084:            void close() throws SQLException;
085:
086:            /**
087:             * Only works on non dynamic result sets.
088:             * 
089:             * @param index
090:             *            row number to get at
091:             * @return row data at index
092:             * @throws SQLException
093:             *             if a database error occurs
094:             */
095:            ResultSetRow getAt(int index) throws SQLException;
096:
097:            /**
098:             * Returns the current position in the result set as a row number.
099:             * 
100:             * @return the current row number
101:             * @throws SQLException
102:             *             if a database error occurs
103:             */
104:            int getCurrentRowNumber() throws SQLException;
105:
106:            /**
107:             * Returns the result set that 'owns' this RowData
108:             */
109:            ResultSetInternalMethods getOwner();
110:
111:            /**
112:             * Returns true if another row exsists.
113:             * 
114:             * @return true if more rows
115:             * @throws SQLException
116:             *             if a database error occurs
117:             */
118:            boolean hasNext() throws SQLException;
119:
120:            /**
121:             * Returns true if we got the last element.
122:             * 
123:             * @return true if after last row
124:             * @throws SQLException
125:             *             if a database error occurs
126:             */
127:            boolean isAfterLast() throws SQLException;
128:
129:            /**
130:             * Returns if iteration has not occured yet.
131:             * 
132:             * @return true if before first row
133:             * @throws SQLException
134:             *             if a database error occurs
135:             */
136:            boolean isBeforeFirst() throws SQLException;
137:
138:            /**
139:             * Returns true if the result set is dynamic.
140:             * 
141:             * This means that move back and move forward won't work because we do not
142:             * hold on to the records.
143:             * 
144:             * @return true if this result set is streaming from the server
145:             * @throws SQLException
146:             *             if a database error occurs
147:             */
148:            boolean isDynamic() throws SQLException;
149:
150:            /**
151:             * Has no records.
152:             * 
153:             * @return true if no records
154:             * @throws SQLException
155:             *             if a database error occurs
156:             */
157:            boolean isEmpty() throws SQLException;
158:
159:            /**
160:             * Are we on the first row of the result set?
161:             * 
162:             * @return true if on first row
163:             * @throws SQLException
164:             *             if a database error occurs
165:             */
166:            boolean isFirst() throws SQLException;
167:
168:            /**
169:             * Are we on the last row of the result set?
170:             * 
171:             * @return true if on last row
172:             * @throws SQLException
173:             *             if a database error occurs
174:             */
175:            boolean isLast() throws SQLException;
176:
177:            /**
178:             * Moves the current position relative 'rows' from the current position.
179:             * 
180:             * @param rows
181:             *            the relative number of rows to move
182:             * @throws SQLException
183:             *             if a database error occurs
184:             */
185:            void moveRowRelative(int rows) throws SQLException;
186:
187:            /**
188:             * Returns the next row.
189:             * 
190:             * @return the next row value
191:             * @throws SQLException
192:             *             if a database error occurs
193:             */
194:            ResultSetRow next() throws SQLException;
195:
196:            /**
197:             * Removes the row at the given index.
198:             * 
199:             * @param index
200:             *            the row to move to
201:             * @throws SQLException
202:             *             if a database error occurs
203:             */
204:            void removeRow(int index) throws SQLException;
205:
206:            /**
207:             * Moves the current position in the result set to the given row number.
208:             * 
209:             * @param rowNumber
210:             *            row to move to
211:             * @throws SQLException
212:             *             if a database error occurs
213:             */
214:            void setCurrentRow(int rowNumber) throws SQLException;
215:
216:            /**
217:             * Set the result set that 'owns' this RowData
218:             * 
219:             * @param rs
220:             *            the result set that 'owns' this RowData
221:             */
222:            void setOwner(ResultSetImpl rs);
223:
224:            /**
225:             * Only works on non dynamic result sets.
226:             * 
227:             * @return the size of this row data
228:             * @throws SQLException
229:             *             if a database error occurs
230:             */
231:            int size() throws SQLException;
232:
233:            /**
234:             * Did this result set have no rows?
235:             */
236:            boolean wasEmpty();
237:
238:            /**
239:             * Sometimes the driver doesn't have metadata until after
240:             * the statement has the result set in-hand (because it's cached), 
241:             * so it can call this to set it after the fact.
242:             * 
243:             * @param metadata field-level metadata for the result set
244:             */
245:            void setMetadata(Field[] metadata);
246:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.