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


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:        package com.sun.sql.rowset;
042:
043:        import java.beans.PropertyChangeListener;
044:        import java.beans.PropertyChangeSupport;
045:        import java.sql.Connection;
046:        import java.sql.DatabaseMetaData;
047:        import java.sql.ParameterMetaData;
048:        import java.sql.Savepoint;
049:        import java.sql.SQLException;
050:        import javax.sql.rowset.CachedRowSet;
051:
052:        /**
053:         * The extened interface that all implementations of {@link com.sun.sql.rowset.CachedRowSetX} must implement.
054:         *
055:         * <h3>1.0 Overview</h3>
056:         * An extension to the <code>CachedRowSet</code> interface.
057:         * <P>
058:         * A {@link com.sun.sql.rowset.CachedRowSetX} object differs from a CachedRowSet object
059:         * in the following ways:
060:         * <ul>
061:         *   <li> An <code>isExecuted()</code> method will return <code>true</code> if
062:         *        the {@link com.sun.sql.rowset.CachedRowSetX} is in a state where navigation and getters
063:         *        and setters can be called on rows returned from the database (i.e., returns
064:         *        true if execute or populate has been called.
065:         *   </li>
066:         *   <li> The following "advanced" properties have been added.  These properties are
067:         *        useful in the case of incomplete or incorrect information being supplied by
068:         *        JDBC drivers.<br/>
069:         *        Note: In most cases, these advanced properties do not need to be set (i.e., they can be
070:         *              left set to their default <code>null</code> value (or <code>false</code> in the
071:         *              case of <code>printStatements</code>).  For the cases where the advanced properties
072:         *              must be used, it is helpful to set the <code>printStatements</code> property to
073:         *              <code>true</code> first.  In that way, one can then determine what advanced
074:         *              properties must be set.  By setting the catalog and schema for the table to be
075:         *              upadted and by explicitly setting cataloag, table, schema and column names for 
076:         *              each column, one can explicitly set what columns will participate in inserts,
077:         *              updates and deletes.  Futher control can be gained by setting the updatableColumns
078:         *              and insertableColumns properties.  Note:  if updatableColumns is set and
079:         *              insertableColumns is not set, it is assumed that updateableColumns applies to
080:         *              both updates and inserts.
081:         *        <ul>
082:         *            <li><code>catalogName</code>: the name of the catalog that contains the table referred to by <code>tableName</code></li>
083:         *            <li><code>schemaName</code>: the name of the schema that contains the table referred to by <code>tableName</code></li>
084:         *            <li><code>columnCatalogNames</code>:  an array of {@link String}, one for each column, which contains the name of catalog of the corresponding column (each element can also be <code>null</code></li>
085:         *            <li><code>columnSchemaNames</code>:  an array of {@link String}, one for each column, which contains the name of the schema of the corresponding column (each element can also be <code>null</code></li>
086:         *            <li><code>columnTableNames</code>:  an array of {@link String}, one for each column, which contains the name of the table of the corresponding column (each element can also be <code>null</code></li>
087:         *            <li><code>columnNames</code>:  an array of {@link String}, one for each column, which contains the name of the corresponding column (each element can also be <code>null</code></li>
088:         *            <li><code>insertableColumns</code>:  an array of <code>boolean</code>, one for each column, which contains <code>true</code> if the corresponding column can be inserted, else it contains <code>false/code></li>
089:         *            <li><code>updatableColumns</code>:  an array of <code>boolean</code>, one for each column, which contains <code>true</code> if the corresponding column can be updated, else it contains <code>false/code></li>
090:         *            <li><code>printStatements</code>:  a <code>boolean{/code> that when <code>true</code> will result in internally generated <code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code> SQL statements being written to <code>System.out</code>.  This output is useful in determining why inserts,updates and/or deletes are falling and in deciding what advanced properties to set in order to address the problems.</li>
091:         *        </ul>
092:         *   </li>
093:         *   <li> <code>PropertyChangeListener</code> support<br/>
094:         *        The following are bound properties:
095:         *        <ul>
096:         *            <li><code>command</code></li>
097:         *            <li><code>dataSourceName</code></li>
098:         *            <li><code>maxRows</code></li>
099:         *            <li><code>password</code></li>
100:         *            <li><code>type</code></li>
101:         *            <li><code>url</code></li>
102:         *            <li><code>username</code></li>
103:         *        </ul>
104:         *   </li>
105:         *   <li> support to use the {@link com.sun.sql.rowset.CachedRowSetX} after calling
106:         *        <code>close</code> on it.
107:         *   </li>
108:         *   <li> by default, a {@link com.sun.sql.rowset.CachedRowSetX}'s properties are set to:
109:         *        <ul>
110:         *            <li><code>command</code>: <code>null</code></li>
111:         *            <li><code>escapeProcessing</code>: <code>true</code></li>
112:         *            <li><code>keyColumns</code>: <code>null</code></li> (ignored)
113:         *            <li><code>maxFieldSize</code>: <code>0</code></li>
114:         *            <li><code>maxRows</code>: <code>0</code></li>
115:         *            <li><code>password</code>: <code>null</code></li>
116:         *            <li><code>readOnly</code>: <code>true</code> (ignored)</li>
117:         *            <li><code>showDeleted</code>: <code>false</code></li>
118:         *            <li><code>typeMap</code>: <code>null</code></li>
119:         *            <li><code>url</code>: <code>null</code></li>
120:         *            <li><code>username</code>: <code>null</code></li>
121:         *        </ul>
122:         *   </li>
123:         *   <li> the <code>readOnly</code> property is currently not used
124:         *   </li>
125:         *   <li> it is well defined how property changes affect the state of a {@link com.sun.sql.rowset.CachedRowSetX}
126:         *        <ul>
127:         *            <li><code>autoCommit</code>: nothing is invalidated</li>
128:         *            <li><code>command</code>: <code>release()</code> is called</li>
129:         *            <li><code>concurrency</code>: nohting is invalidated</li>
130:         *            <li><code>escapeProcessing</code>: nothing is invalidated</li>
131:         *            <li><code>maxFieldSize</code>: nothing is invalidated</li>
132:         *            <li><code>maxRows</code>: nothing is invalidated</li>
133:         *            <li><code>password</code>: nothing is invalidated</li>
134:         *            <li><code>readOnly</code>: nothing is invalidated</li>
135:         *            <li><code>showDeleted</code>: nothing is invalidated</li>
136:         *            <li><code>transactionIsolation</code>: nothing is invalidated</li>
137:         *            <li><code>type</code>: nothing is invalidated</li>
138:         *            <li><code>typeMap</code>: nothing is invalidated</li>
139:         *            <li><code>url</code>: <code>release()</code> is called</li>
140:         *            <li><code>username</code>: <code>release()</code> is called</li>
141:         *        </ul>
142:         *   </li>
143:         *   <li> calling <code>close</code> will never throw a SQLException
144:         *   </li>
145:         *        
146:         * </ul>
147:         */
148:
149:        public interface CachedRowSetX extends CachedRowSet {
150:            /**
151:             * Returns <code>true</code> if this rowset is in an executed state
152:             *
153:             * @return a <code>boolean</code> <code>true</code> if the {@link com.sun.sql.rowset.CachedRowSetX}
154:             * is in a state where navigation and getters and setters can be called on rows
155:             * returned from the database (i.e., returns <code>true</code> if <code>execute()</code>
156:             * or <code>populate</code> has been called.
157:             *
158:             * @exception SQLException if a database access error occurs
159:             */
160:            public boolean isExecuted() throws SQLException;
161:
162:            /**
163:             * Add a <code>PropertyChangeListener</code> to the listener list.
164:             * The listener is registered for all bound properties.
165:             *
166:             * @param listener  The PropertyChangeListener to be added
167:             */
168:            public void addPropertyChangeListener(
169:                    PropertyChangeListener listener);
170:
171:            /**
172:             * Returns the catalog in which the table referred to by the <code>tableName</code> property
173:             * resides.
174:             * <P>
175:             * @return a {@link String} object giving the name of the catalog that contains
176:             *         the table referred to by tableName
177:             *<p>
178:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
179:             *</p>
180:             *
181:             * @see javax.sql.RowSetMetaData#getCatalogName
182:             */
183:            public String getCatalogName();
184:
185:            /**
186:             * Sets the identifier for catalog of the table referred to in the <code>tableName</code>
187:             * property.
188:             * The writer uses this name to determine which table to use when comparing the values in
189:             * the data source with the {@link com.sun.sql.rowset.CachedRowSetX} object's values during a
190:             * synchronization attempt.
191:             * The <code>catalogName</code> property also indicates where modified values from this
192:             * {@link com.sun.sql.rowset.CachedRowSetX} object should be written.
193:             * <P>
194:             * The implementation of this {@link com.sun.sql.rowset.CachedRowSetX} object may obtain the
195:             * the name internally from the {@link com.sun.sql.rowset.RowSetMetaDataXImpl} object.
196:             *<p>
197:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
198:             *</p>
199:             *
200:             * @param catalogName a {@link String} object identifying the catalog of the table
201:             * from which this {@link com.sun.sql.rowset.CachedRowSetX} object was derived; can be
202:             * <code>null</code> or an empty {@link String}
203:             *
204:             * @see javax.sql.RowSetMetaData#setCatalogName
205:             * @see javax.sql.RowSetWriter
206:             */
207:            public void setCatalogName(String catalogName);
208:
209:            /**
210:             * Returns the schema in which the table referred to by the <code>tableName</code> property
211:             * resides.
212:             * <P>
213:             * @return a {@link String} object giving the name of the catalog that contains
214:             *         the table referred to by tableName
215:             *<p>
216:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
217:             *</p>
218:             *
219:             * @see javax.sql.RowSetMetaData#getCatalogName
220:             */
221:            public String getSchemaName();
222:
223:            /**
224:             * Sets the identifier for schema of the table referred to in the <code>tableName</code>
225:             * property.
226:             * The writer uses this name to determine which table to use when comparing the values in
227:             * the data source with the {@link com.sun.sql.rowset.CachedRowSetX} object's values during a
228:             * synchronization attempt.
229:             * The <code>schemaName</code> property also indicates where modified values from this
230:             * {@link com.sun.sql.rowset.CachedRowSetX} object should be written.
231:             * <P>
232:             * The implementation of this {@link com.sun.sql.rowset.CachedRowSetX} object may obtain the
233:             * the name internally from the {@link com.sun.sql.rowset.RowSetMetaDataXImpl} object.
234:             *
235:             * @param schemaName a {@link String} object identifying the schema of the table
236:             * from which this {@link com.sun.sql.rowset.CachedRowSetX} object was derived; can be
237:             * <code>null</code> or an empty {@link String}
238:             *
239:             * @see javax.sql.RowSetMetaData#setSchemaName
240:             * @see javax.sql.RowSetWriter
241:             */
242:            public void setSchemaName(String schemaName);
243:
244:            /**
245:             * Returns an array of {@link String}.  If <code>setColumnCatalogNames</code> was never called,
246:             * <code>null</code> is returned, else the value set when calling
247:             * <code>setColumnCatalogNames{/code> is returned.  See <code>setColumnCatalogNames</code>
248:             * for details.
249:             * <p>
250:             * Note, the column is zero based whereas most jdbc calls are one based.
251:             *<p>
252:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
253:             *</p>
254:             * <p>
255:             * @return an array of {@link String} objects or <code>null</code>
256:             */
257:            public String[] getColumnCatalogNames();
258:
259:            /**
260:             * Returns a {@link String} which contains the catalog name set for the column or
261:             * <code>null</code>.
262:             * <p>
263:             * Note, the column is zero based whereas most jdbc calls are one based.
264:             * <p>
265:             * @return a {@link String} object or <code>null</code>
266:             *
267:             * @throws NullPointerException if <code>columnCatalogNames</code> was never set.
268:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
269:             *  <code>columnCatalogName.length</code>
270:             */
271:            public String getColumnCatalogNames(int index);
272:
273:            /**
274:             * Set the <code>columnCatalogNames</code> property.
275:             *
276:             * @param columnCatalogNames an array of {@link String}, one for each column, which contains
277:             *        the name of catalog of the corresponding column (each element can also be
278:             *        <code>null</code>
279:             * <p>
280:             * Note, the column is zero based whereas most jdbc calls are one based.
281:             * <p>
282:             */
283:            public void setColumnCatalogNames(String[] columnCatalogNames);
284:
285:            /**
286:             * Set the <code>columnCatalogNames</code> property.
287:             *
288:             * @param index the index of the array to set (zero based)
289:             * @param columnCatalogName the name of catalog for the column (can also be <code>null</code>
290:             * @throws NullPointerException if <code>columnCatalogNames</code> was never set.
291:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
292:             *  <code>columnCatalogName.length</code>
293:             * <p>
294:             * Note, the column is zero based whereas most jdbc calls are one based.
295:             * <p>
296:             */
297:            public void setColumnCatalogNames(int index,
298:                    String columnCatalogName);
299:
300:            /**
301:             * Returns an array of {@link String}.  If <code>setColumnSchemaNames</code> was never called,
302:             * <code>null</code> is returned, else the value set when calling
303:             * <code>setColumnSchemaNames{/code> is returned.  See <code>setColumnSchemaNames</code>
304:             * for details.
305:             * <p>
306:             * Note, the column is zero based whereas most jdbc calls are one based.
307:             *<p>
308:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
309:             *</p>
310:             * <p>
311:             * @return an array of {@link String} objects or <code>null</code>
312:             */
313:            public String[] getColumnSchemaNames();
314:
315:            /**
316:             * Returns a {@link String} which contains the schema name set for the column or
317:             * <code>null</code>.
318:             * <p>
319:             * Note, the column is zero based whereas most jdbc calls are one based.
320:             * <p>
321:             * @return a {@link String} object or <code>null</code>
322:             *
323:             * @throws NullPointerException if <code>columnSchemaNames</code> was never set.
324:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
325:             *  <code>columnSchemaName.length</code>
326:             */
327:            public String getColumnSchemaNames(int index);
328:
329:            /**
330:             * Set the <code>columnSchemaNames</code> property.
331:             *
332:             * @param columnSchemaNames an array of {@link String}, one for each column, which contains
333:             *        the name of schema of the corresponding column (each element can also be
334:             *        <code>null</code>
335:             * <p>
336:             * Note, the column is zero based whereas most jdbc calls are one based.
337:             * <p>
338:             */
339:            public void setColumnSchemaNames(String[] columnSchemaNames);
340:
341:            /**
342:             * Set the <code>columnSchemaNames</code> property.
343:             *
344:             * @param index the index of the array to set (zero based)
345:             * @param columnSchemaName the name of schema for the column (can also be <code>null</code>
346:             * @throws NullPointerException if <code>columnSchemaNames</code> was never set.
347:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
348:             *  <code>columnSchemaName.length</code>
349:             * <p>
350:             * Note, the column is zero based whereas most jdbc calls are one based.
351:             * <p>
352:             */
353:            public void setColumnSchemaNames(int index, String columnSchemaName);
354:
355:            /**
356:             * Returns an array of {@link String}.  If <code>setColumnTableNames</code> was never called,
357:             * <code>null</code> is returned, else the value set when calling
358:             * <code>setColumnTableNames{/code> is returned.  See <code>setColumnTableNames</code>
359:             * for details.
360:             * <p>
361:             * Note, the column is zero based whereas most jdbc calls are one based.
362:             *<p>
363:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
364:             *</p>
365:             * <p>
366:             * @return an array of {@link String} objects or <code>null</code>
367:             */
368:            public String[] getColumnTableNames();
369:
370:            /**
371:             * Returns a {@link String} which contains the table name set for the column or
372:             * <code>null</code>.
373:             * <p>
374:             * Note, the column is zero based whereas most jdbc calls are one based.
375:             * <p>
376:             * @return a {@link String} object or <code>null</code>
377:             *
378:             * @throws NullPointerException if <code>columnTableNames</code> was never set.
379:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
380:             *  <code>columnTableName.length</code>
381:             */
382:            public String getColumnTableNames(int index);
383:
384:            /**
385:             * Set the <code>columnTableNames</code> property.
386:             *
387:             * @param columnTableNames an array of {@link String}, one for each column, which contains
388:             *        the name of table of the corresponding column (each element can also be
389:             *        <code>null</code>
390:             * <p>
391:             * Note, the column is zero based whereas most jdbc calls are one based.
392:             * <p>
393:             */
394:            public void setColumnTableNames(String[] columnTableNames);
395:
396:            /**
397:             * Set the <code>columnTableNames</code> property.
398:             *
399:             * @param index the index of the array to set (zero based)
400:             * @param columnTableName the name of table for the column (can also be <code>null</code>
401:             * @throws NullPointerException if <code>columnTableNames</code> was never set.
402:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
403:             *  <code>columnTableName.length</code>
404:             * <p>
405:             * Note, the column is zero based whereas most jdbc calls are one based.
406:             * <p>
407:             */
408:            public void setColumnTableNames(int index, String columnTableName);
409:
410:            /**
411:             * Returns an array of {@link String}.  If <code>setColumnNames</code> was never called,
412:             * <code>null</code> is returned, else the value set when calling
413:             * <code>setColumnNames{/code> is returned.  See <code>setColumnNames</code>
414:             * for details.
415:             * <p>
416:             * Note, the column is zero based whereas most jdbc calls are one based.
417:             *<p>
418:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
419:             *</p>
420:             * <p>
421:             * @return an array of {@link String} objects or <code>null</code>
422:             */
423:            public String[] getColumnNames();
424:
425:            /**
426:             * Returns a {@link String} which contains the column name set for the column or
427:             * <code>null</code>.
428:             * <p>
429:             * Note, the column is zero based whereas most jdbc calls are one based.
430:             * <p>
431:             * @return a {@link String} object or <code>null</code>
432:             *
433:             * @throws NullPointerException if <code>columnNames</code> was never set.
434:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
435:             *  <code>columnName.length</code>
436:             */
437:            public String getColumnNames(int index);
438:
439:            /**
440:             * Set the <code>columnNames</code> property.
441:             *
442:             * @param columnNames an array of {@link String}, one for each column, which contains
443:             *        the name of column (each element can also be <code>null</code>
444:             * <p>
445:             * Note, the column is zero based whereas most jdbc calls are one based.
446:             * <p>
447:             */
448:            public void setColumnNames(String[] columnNames);
449:
450:            /**
451:             * Set the <code>columnNames</code> property.
452:             *
453:             * @param index the index of the array to set (zero based)
454:             * @param columnName for the column (can also be <code>null</code>
455:             * @throws NullPointerException if <code>columnNames</code> was never set.
456:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
457:             *  <code>columnName.length</code>
458:             * <p>
459:             * Note, the column is zero based whereas most jdbc calls are one based.
460:             * <p>
461:             */
462:            public void setColumnNames(int index, String columnName);
463:
464:            /**
465:             * Returns an array of <code>boolean{/code>.  If <code>setInsertableColumns</code> was never called,
466:             * <code>null</code> is returned, else the value set when calling
467:             * <code>setInsertableColumns{/code> is returned.  See <code>setInsertableColumns</code>
468:             * for details.
469:             * <p>
470:             * Note, the column is zero based whereas most jdbc calls are one based.
471:             *<p>
472:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
473:             *</p>
474:             * <p>
475:             * @return an array of <code>boolean{/code> objects or <code>null</code>
476:             */
477:            public boolean[] getInsertableColumns();
478:
479:            /**
480:             * Returns a <code>boolean{/code> of <code>true</code> if the column should be inserted when
481:             * when adding rows or <code>null</code>.
482:             * <p>
483:             * Note, the column is zero based whereas most jdbc calls are one based.
484:             * <p>
485:             * @return a <code>boolean/code> object or <code>null</code>
486:             *
487:             * @throws NullPointerException if <code>insertableColumns</code> was never set.
488:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
489:             *  <code>insertableColumns.length</code>
490:             */
491:            public boolean getInsertableColumns(int index);
492:
493:            /**
494:             * Set the <code>insertableColumns</code> property.
495:             *
496:             * @param insertableColumns an array of <code>boolean</code> one for each column, which contains
497:             *        a boolean indicating whether or not the column should be inserted when adding
498:             *        rows to the {@link com.sun.sql.rowset.CachedRowSetX}
499:             * <p>
500:             * Note, the column is zero based whereas most jdbc calls are one based.
501:             * <p>
502:             */
503:            public void setInsertableColumns(boolean[] insertableColumns);
504:
505:            /**
506:             * Set the <code>insertableColumns</code> property.
507:             *
508:             * @param index the index of the array to set (zero based)
509:             * @param insertableColumn true if column should be inserted for new rows
510:             * @throws NullPointerException if <code>insertableColumns</code> was never set.
511:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
512:             *  <code>insertableColumns.length</code>
513:             * <p>
514:             * Note, the column is zero based whereas most jdbc calls are one based.
515:             * <p>
516:             */
517:            public void setInsertableColumns(int index, boolean insertableColumn);
518:
519:            /**
520:             * Returns an array of <code>boolean{/code>.  If <code>setUpdatableColumns</code> was never called,
521:             * <code>null</code> is returned, else the value set when calling
522:             * <code>setUpdatebleColumns{/code> is returned.  See <code>setUpdatableColumns</code>
523:             * for details.
524:             * <p>
525:             * Note, the column is zero based whereas most jdbc calls are one based.
526:             *<p>
527:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
528:             *</p>
529:             * <p>
530:             * @return an array of <code>boolean{/code> objects or <code>null</code>
531:             */
532:            public boolean[] getUpdatableColumns();
533:
534:            /**
535:             * Returns a <code>boolean{/code> of <code>true</code> if the column should be updated when
536:             * when updating rows or <code>null</code>.
537:             * <p>
538:             * Note, the column is zero based whereas most jdbc calls are one based.
539:             * <p>
540:             * @return a <code>boolean{/code> object or <code>null</code>
541:             *
542:             * @throws NullPointerException if <code>updatableColumns</code> was never set.
543:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
544:             *  <code>updatableColumns.length</code>
545:             */
546:            public boolean getUpdatableColumns(int index);
547:
548:            /**
549:             * Set the <code>updatableColumns</code> property.
550:             *
551:             * @param updatableColumns an array of <code>boolean</code>, one for each column, which contains
552:             *        a boolean indicating whether or not the column should be updated when updating
553:             *        rows to the {@link com.sun.sql.rowset.CachedRowSetX}
554:             * <p>
555:             * Note, the column is zero based whereas most jdbc calls are one based.
556:             * <p>
557:             */
558:            public void setUpdatableColumns(boolean[] updatableColumns);
559:
560:            /**
561:             * Set the <code>updatableColumns</code> property.
562:             *
563:             * @param index the index of the array to set (zero based)
564:             * @param updatableColumn true if column should be updated when rows are updated
565:             * @throws NullPointerException if <code>updatableColumns</code> was never set.
566:             * @throws ArrayIndexOutOfBoundsException if <code>index</code> is >=
567:             *  <code>updatableColumns.length</code>
568:             * <p>
569:             * Note, the column is zero based whereas most jdbc calls are one based.
570:             * <p>
571:             */
572:            public void setUpdatableColumns(int index, boolean updatableColumn);
573:
574:            /**
575:             * Returns the <code>printStatements</code> property.
576:             *
577:             * @return a <code>boolean{/code> object which, if true, causes SQL statements to be written to
578:             *         <code>System.out</code>.
579:             *<p>
580:             * Note:  This method is called by {@link com.sun.sql.rowset.internal.CachedRowSetXWriter}.
581:             *</p>
582:             */
583:            public boolean getPrintStatements();
584:
585:            /**
586:             * Sets the <code>printStatements</code> property.
587:             *
588:             *  If this property is <code>true</code>,
589:             * SQL <code>Insert</code>, <code>UPDATE</code> and <code>DELETE</code> statements will
590:             * be written to <code>System.out</code>.  This property is intended to be set when debugging
591:             * problems inserting, updating and deleting.  With the information gained from examining the
592:             * output, it is intended that one can set the other advanced properties on the
593:             * {@link com.sun.sql.rowset.CachedRowSetX} to "fix" the SQL statements being generated.  In this way,
594:             * some JDBC driver problems can be overcome.
595:             *</p>
596:             * @param printStatements a <code>boolean{/code> object which determines whether
597:             * SQL <code>Insert</code>, <code>UPDATE</code> and <code>DELETE</code> statements are
598:             * written to <code>System.out</code>
599:             */
600:            public void setPrintStatements(boolean printStatements);
601:
602:            /**
603:             * Add a PropertyChangeListener for a specific property.  The listener
604:             * will be invoked only on a change of the specific property.
605:             *
606:             * @param propertyName  The name of the property to listen on.
607:             * @param listener  The PropertyChangeListener to be added
608:             */
609:            public void addPropertyChangeListener(String propertyName,
610:                    PropertyChangeListener listener);
611:
612:            /**
613:             * Remove a <code>PropertyChangeListener</code> from the listener list.
614:             *
615:             * This removes a <code>PropertyChangeListener</code> that was registered
616:             * for all bound properties.
617:             *
618:             * @param listener  The PropertyChangeListener to be removed
619:             */
620:            public void removePropertyChangeListener(
621:                    PropertyChangeListener listener);
622:
623:            /**
624:             * Remove a PropertyChangeListener for a specific property.
625:             *
626:             * @param propertyName  The name of the property that was listened on.
627:             * @param listener  The PropertyChangeListener to be removed
628:             */
629:            public void removePropertyChangeListener(String propertyName,
630:                    PropertyChangeListener listener);
631:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.