CODEFETCH™
            Examples
Searched for 3 expression(s): sql   list   indexes  
Java API
java.awt.List search codefetch
The List component presents the user with a scrolling list of text items.
java.awt.event.AWTEventListenerProxy search codefetch
A class which extends the EventListenerProxy, specifically for adding an AWTEventListener for a specific event mask.
java.beans.PropertyChangeListenerProxy search codefetch
A class which extends the EventListenerProxy specifically for adding a named PropertyChangeListener.
java.beans.VetoableChangeListenerProxy search codefetch
A class which extends the EventListenerProxy specifically for associating a VetoableChangeListener with a "constrained" prope...
java.sql.SQLPermission search codefetch
The permission for which the SecurityManager will check when code that is running in an applet calls the DriverManager.setLog...
java.io.File.list search codefetch
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy ...
java.awt.Toolkit.addAWTEventListener search codefetch
javax.swing.JFileChooser.addActionListener search codefetch
Adds an ActionListener to the file chooser.
javax.swing.JScrollBar.addAdjustmentListener search codefetch
Adds an AdjustmentListener.
javax.swing.JComponent.addAncestorListener search codefetch
Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible or invisib...
Most relevant API matches shown. View All.
Source code below from:
Java Cookbook, Second Edition
By Ian Darwin
Published 14 June, 2004
Average rating

      Powells     Alibris

Contrib/JDBCDriver-Moss/SimpleTextDatabaseMetaData.java (3156 lines)
20 // 
21 // Many of the methods here return lists of information in ResultSets.
22 // You can use the normal ResultSet methods such as getString and getInt 
23 // to retrieve the data from these ResultSets.  If a given form of 
24 // metadata is not available, these methods show throw a SQLException.
25 // 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
33 34 import java.sql.*; 35 import java.util.Hashtable;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
47 SimpleTextIConnection con) 48 throws SQLException 49 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
61 public boolean allProceduresAreCallable() 62 throws SQLException 63 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
76 public boolean allTablesAreSelectable() 77 throws SQLException 78 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
91 public String getURL() 92 throws SQLException 93 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
104 public String getUserName() 105 throws SQLException 106 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
117 public boolean isReadOnly() 118 throws SQLException 119 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
128 public boolean nullsAreSortedHigh() 129 throws SQLException 130 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
142 public boolean nullsAreSortedLow() 143 throws SQLException 144 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
156 public boolean nullsAreSortedAtStart() 157 throws SQLException 158 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
170 public boolean nullsAreSortedAtEnd() 171 throws SQLException 172 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
184 public String getDatabaseProductName() 185 throws SQLException 186 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
195 public String getDatabaseProductVersion() 196 throws SQLException 197 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
206 public String getDriverName() 207 throws SQLException 208 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
217 public String getDriverVersion() 218 throws SQLException 219 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
258 public boolean usesLocalFiles() 259 throws SQLException 260 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
271 public boolean usesLocalFilePerTable() 272 throws SQLException 273 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
280 // supportsMixedCaseIdentifiers - JDBC API 281 // Does the database support mixed case unquoted SQL identifiers? 282 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
284 public boolean supportsMixedCaseIdentifiers() 285 throws SQLException 286 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
291 // storesUpperCaseIdentifiers - JDBC API 292 // Does the database store mixed case unquoted SQL identifiers in 293 // upper case?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
296 public boolean storesUpperCaseIdentifiers() 297 throws SQLException 298 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
303 // storesLowerCaseIdentifiers - JDBC API 304 // Does the database store mixed case unquoted SQL identifiers in 305 // lower case?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
308 public boolean storesLowerCaseIdentifiers() 309 throws SQLException 310 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
315 // storesMixedCaseIdentifiers - JDBC API 316 // Does the database store mixed case unquoted SQL identifiers in 317 // mixed case?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
320 public boolean storesMixedCaseIdentifiers() 321 throws SQLException 322 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
327 // supportsMixedCaseQuotedIdentifiers - JDBC API 328 // Does the database support mixed case quoted SQL identifiers? 329 //
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
333 public boolean supportsMixedCaseQuotedIdentifiers() 334 throws SQLException 335 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
340 // storesUpperCaseQuotedIdentifiers - JDBC API 341 // Does the database store mixed case quoted SQL identifiers in 342 // upper case?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
347 public boolean storesUpperCaseQuotedIdentifiers() 348 throws SQLException 349 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
354 // storesLowerCaseQuotedIdentifiers - JDBC API 355 // Does the database store mixed case quoted SQL identifiers in 356 // lower case?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
361 public boolean storesLowerCaseQuotedIdentifiers() 362 throws SQLException 363 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
368 // storesMixedCaseQuotedIdentifiers - JDBC API 369 // Does the database store mixed case quoted SQL identifiers in 370 // mixed case?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
375 public boolean storesMixedCaseQuotedIdentifiers() 376 throws SQLException 377 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
382 // getIdentifierQuoteString - JDBC API 383 // What's the string used to quote SQL identifiers? 384 // This returns a space " " if identifier quoting isn't supported.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
389 public String getIdentifierQuoteString() 390 throws SQLException 391 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
397 //----------------------------------------------------------------------- 398 // getSQLKeywords - JDBC API 399 // Get a comma separated list of all a database's SQL keywords 400 // that are NOT also SQL92 keywords. 401 //----------------------------------------------------------------------- 402 403 public String getSQLKeywords() 404 throws SQLException 405 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
410 // getNumericFunctions - JDBC API 411 // Get a comma separated list of math functions. 412 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
414 public String getNumericFunctions() 415 throws SQLException 416 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
423 // getStringFunctions - JDBC API 424 // Get a comma separated list of string functions. 425 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
427 public String getStringFunctions() 428 throws SQLException 429 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
436 // getSystemFunctions - JDBC API 437 // Get a comma separated list of system functions. 438 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
440 public String getSystemFunctions() 441 throws SQLException 442 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
449 // getTimeDateFunctions - JDBC API 450 // Get a comma separated list of time and date functions. 451 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
453 public String getTimeDateFunctions() 454 throws SQLException 455 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
471 public String getSearchStringEscape() 472 throws SQLException 473 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
486 public String getExtraNameCharacters() 487 throws SQLException 488 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
501 public boolean supportsAlterTableWithAddColumn() 502 throws SQLException 503 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
514 public boolean supportsAlterTableWithDropColumn() 515 throws SQLException 516 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
526 // 527 // If so, the SQL AS clause can be used to provide names for 528 // computed columns or to provide alias names for columns as
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
534 public boolean supportsColumnAliasing() 535 throws SQLException 536 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
549 public boolean nullPlusNonNullIsNull() 550 throws SQLException 551 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
558 // supportsConvert - JDBC API 559 // Is the CONVERT function between SQL types supported? 560 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
562 public boolean supportsConvert() 563 throws SQLException 564 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
571 // supportsConvert - JDBC API 572 // Is CONVERT between the given SQL types supported? 573 //
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
580 int toType) 581 throws SQLException 582 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
595 public boolean supportsTableCorrelationNames() 596 throws SQLException 597 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
611 public boolean supportsDifferentTableCorrelationNames() 612 throws SQLException 613 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
620 // supportsExpressionsInOrderBy - JDBC API 621 // Are expressions in "ORDER BY" lists supported? 622 //-----------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
624 public boolean supportsExpressionsInOrderBy() 625 throws SQLException 626 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
637 public boolean supportsOrderByUnrelated() 638 throws SQLException 639 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
650 public boolean supportsGroupBy() 651 throws SQLException 652 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
663 public boolean supportsGroupByUnrelated() 664 throws SQLException 665 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
677 public boolean supportsGroupByBeyondSelect() 678 throws SQLException 679 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
693 public boolean supportsLikeEscapeClause() 694 throws SQLException 695 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
706 public boolean supportsMultipleResultSets() 707 throws SQLException 708 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
720 public boolean supportsMultipleTransactions() 721 throws SQLException 722 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
735 public boolean supportsNonNullableColumns() 736 throws SQLException 737 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
746 //----------------------------------------------------------------------- 747 // supportsMinimumSQLGrammar - JDBC API 748 // Is the ODBC Minimum SQL grammar supported? 749 //
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
752 753 public boolean supportsMinimumSQLGrammar() 754 throws SQLException 755 { 756 // The SimpleText driver does not even support the most minimum 757 // SQL grammar 758
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
762 //----------------------------------------------------------------------- 763 // supportsCoreSQLGrammar - JDBC API 764 // Is the ODBC Core SQL grammar supported? 765 //----------------------------------------------------------------------- 766 767 public boolean supportsCoreSQLGrammar() 768 throws SQLException 769 { 770 // The SimpleText driver does not even support the most minimum 771 // SQL grammar 772
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
776 //----------------------------------------------------------------------- 777 // supportsExtendedSQLGrammar - JDBC API 778 // Is the ODBC Extended SQL grammar supported? 779 //----------------------------------------------------------------------- 780 781 public boolean supportsExtendedSQLGrammar() 782 throws SQLException 783 { 784 // The SimpleText driver does not even support the most minimum 785 // SQL grammar 786
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
790 //----------------------------------------------------------------------- 791 // supportsANSI92EntryLevelSQL - JDBC API 792 // Is the ANSI92 entry level SQL grammar supported? 793 //
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
796 797 public boolean supportsANSI92EntryLevelSQL() 798 throws SQLException 799 { 800 // The SimpleText driver does not even support the most minimum 801 // SQL grammar 802
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
806 //----------------------------------------------------------------------- 807 // supportsANSI92IntermediateSQL - JDBC API 808 // Is the ANSI92 intermediate SQL grammar supported? 809 //----------------------------------------------------------------------- 810 811 public boolean supportsANSI92IntermediateSQL() 812 throws SQLException 813 { 814 // The SimpleText driver does not even support the most minimum 815 // SQL grammar 816
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
820 //----------------------------------------------------------------------- 821 // supportsANSI92FullSQL - JDBC API 822 // Is the ANSI92 full SQL grammar supported? 823 //-----------------------------------------------------------------------

Contrib/JDBCDriver-Moss/SimpleTextResultSet.java (1616 lines)
38 // Java value.  See the JDBC specification for allowable mappings 
39 // from SQL types to Java types with the ResultSet.getXXX methods.
40 // 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
56 57 import java.sql.*; 58 import java.util.Hashtable;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
75 SimpleTextFilter filter) 76 throws SQLException 77 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
101 Hashtable rows) 102 throws SQLException 103 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
126 public boolean next() 127 throws SQLException 128 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
156 157 // We'll cheat a little bit here. We'll use the SQL 158 // parser to break the line up, then treat it as a 159 // comma separated list (much like a select list) 160 161 String data[] = ownerConnection.parseSQL(currentLine); 162 163 Hashtable dataList = new Hashtable(); 164 165 ownerStatement.buildList(data, 0, "", dataList); 166
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
168 // CommonValue object. Then, put the CommonValue object 169 // on our columnValues list 170
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
175 176 for (int i = 1; i <= dataList.size(); i++) { 177 column = (SimpleTextColumn) dataList.get(new Integer(i)); 178
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
223 public void close() 224 throws SQLException 225 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
239 // wasNull - JDBC API 240 // A column may have the value of SQL NULL; wasNull reports whether 241 // the last column read had this special value.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
243 // its value and then call wasNull() to find if the value was 244 // the SQL NULL. 245 // 246 // Returns true if last column read was SQL NULL 247 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
249 public boolean wasNull() 250 throws SQLException 251 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
260 // 261 // Returns the column value; if the value is SQL NULL the result is null 262 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
265 int columnIndex) 266 throws SQLException 267 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
298 // 299 // Returns the column value; if the value is SQL NULL the result is false 300 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
303 int columnIndex) 304 throws SQLException 305 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
315 // columnIndex the first column is 1, the second is 2, ... 316 // Returns the column value; if the value is SQL NULL the result is 0 317 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
320 int columnIndex) 321 throws SQLException 322 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
333 // 334 // Returns the column value; if the value is SQL NULL the result is 0 335 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
338 int columnIndex) 339 throws SQLException 340 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
351 // 352 // Returns the column value; if the value is SQL NULL the result is 0 353 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
356 int columnIndex) 357 throws SQLException 358 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
392 // 393 // Returns the column value; if the value is SQL NULL the result is 0 394 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
397 int columnIndex) 398 throws SQLException 399 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
410 // 411 // Returns the column value; if the value is SQL NULL the result is 0 412 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
415 int columnIndex) 416 throws SQLException 417 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
428 // 429 // Returns the column value; if the value is SQL NULL the result is 0 430 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
433 int columnIndex) 434 throws SQLException 435 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
448 // 449 // Returns the column value; if the value is SQL NULL the result is null 450 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
454 int scale) 455 throws SQLException 456 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
473 // 474 // Returns the column value; if the value is SQL NULL the result is null 475 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
478 int columnIndex) 479 throws SQLException 480 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
506 // getDate - JDBC API 507 // Get the value of a column in the current row as a java.sql.Date object. 508 //
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
510 // 511 // Returns the column value; if the value is SQL NULL the result is null 512 //------------------------------------------------------------------------ 513 514 public java.sql.Date getDate( 515 int columnIndex) 516 throws SQLException 517 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
524 // getTime - JDBC API 525 // Get the value of a column in the current row as a java.sql.Time object. 526 //
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
528 // 529 // Returns the column value; if the value is SQL NULL the result is null 530 //------------------------------------------------------------------------ 531 532 public java.sql.Time getTime( 533 int columnIndex) 534 throws SQLException 535 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
542 // getTimestamp - JDBC API 543 // Get the value of a column in the current row as a java.sql.Timestamp 544 // object.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
547 // 548 // Returns the column value; if the value is SQL NULL the result is null 549 //------------------------------------------------------------------------ 550 551 public java.sql.Timestamp getTimestamp( 552 int columnIndex) 553 throws SQLException 554 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
572 // Returns a Java input stream that delivers the database column value 573 // as a stream of one byte ASCII characters. If the value is SQL NULL 574 // then the result is null.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
578 int columnIndex) 579 throws SQLException 580 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
599 // Returns a Java input stream that delivers the database column value 600 // as a stream of two byte Unicode characters. If the value is SQL NULL 601 // then the result is null.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
605 int columnIndex) 606 throws SQLException 607 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
625 // Returns a Java input stream that delivers the database column value 626 // as a stream of uninterpreted bytes. If the value is SQL NULL 627 // then the result is null.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
631 int columnIndex) 632 throws SQLException 633 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
673 // 674 // columnName is the SQL name of the column 675 // 676 // Returns the column value; if the value is SQL NULL the result is null 677 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
680 String columnName) 681 throws SQLException 682 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
689 // 690 // columnName is the SQL name of the column 691 // 692 // Returns the column value; if the value is SQL NULL the result is false 693 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
696 String columnName) 697 throws SQLException 698 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
705 // 706 // columnName is the SQL name of the column 707 // 708 // Returns the column value; if the value is SQL NULL the result is 0 709 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
712 String columnName) 713 throws SQLException 714 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
721 // 722 // columnName is the SQL name of the column 723 // 724 // Returns the column value; if the value is SQL NULL the result is 0 725 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
728 String columnName) 729 throws SQLException 730 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
737 // 738 // columnName is the SQL name of the column 739 // 740 // Returns the column value; if the value is SQL NULL the result is 0 741 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
744 String columnName) 745 throws SQLException 746 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
753 // 754 // columnName is the SQL name of the column 755 // 756 // Returns the column value; if the value is SQL NULL the result is 0 757 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
760 String columnName) 761 throws SQLException 762 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
769 // 770 // columnName is the SQL name of the column 771 // 772 // Returns the column value; if the value is SQL NULL the result is 0 773 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
776 String columnName) 777 throws SQLException 778 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
785 // 786 // columnName is the SQL name of the column 787 // 788 // Returns the column value; if the value is SQL NULL the result is 0 789 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
792 String columnName) 793 throws SQLException 794 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
802 // 803 // columnName is the SQL name of the column 804 // scale the number of digits to the right of the decimal 805 // 806 // Returns the column value; if the value is SQL NULL the result is null 807 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
811 int scale) 812 throws SQLException 813 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
821 // 822 // columnName is the SQL name of the column 823 // 824 // Returns the column value; if the value is SQL NULL the result is null 825 //------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
828 String columnName) 829 throws SQLException 830 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
835 // getDate - JDBC API 836 // Get the value of a column in the current row as a java.sql.Date object. 837 // 838 // columnName is the SQL name of the column 839 // 840 // Returns the column value; if the value is SQL NULL the result is null 841 //------------------------------------------------------------------------ 842 843 public java.sql.Date getDate( 844 String columnName) 845 throws SQLException 846 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
851 // getTime - JDBC API 852 // Get the value of a column in the current row as a java.sql.Time object. 853 // 854 // columnName is the SQL name of the column 855 // 856 // Returns the column value; if the value is SQL NULL the result is null 857 //------------------------------------------------------------------------ 858 859 public java.sql.Time getTime( 860 String columnName) 861 throws SQLException 862 {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
867 // getTimestamp - JDBC API 868 // Get the value of a column in the current row as a java.sql.Timestamp 869 // object. 870 // 871 // columnName is the SQL name of the column 872 // Returns the column value; if the value is SQL NULL the result is null 873 //------------------------------------------------------------------------ 874 875 public java.sql.Timestamp getTimestamp( 876 String columnName) 877 throws SQLException 878 {
Source code below from:
Bitter Java
By Bruce Tate
Published April, 2002
Average rating

      Powells     Alibris

BBS example/Chapter3/PostListCommand.java (120 lines)
3 import java.io.*; 
4 import java.sql.*;
5 import COM.ibm.db2.jdbc.*; 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10 * @author: Administrator 11 */ 12 public class PostListCommand { 13 14 // Field indexes for command properties 15 private static final int SUBJECT_COLUMN = 1; 16 private static final int AUTHOR_COLUMN = 2; 17 private static final int BOARD_COLUMN = 3; 18 protected Vector author = new Vector(); 19 protected Vector subject = new Vector(); 20 protected Vector board = new Vector(); 21 22 // SQL result set 23 protected ResultSet result; 24 protected Connection connection = null;
Additional matches viewable in cache of BBS example/Chapter3/PostListCommand.java.
Source code below from:
Java Enterprise in a Nutshell (In a Nutshell)
By Kris Magnusson, David Flanagan, Jim Farley, and William Crawford
Published 01 September, 1999
Average rating

      Powells     Alibris

jentnutexamples/jdbc/DBViewer.java (65 lines)
9  
10 import java.sql.*;
11 import java.util.StringTokenizer; 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44 System.out.println("Indexes: "); 45 46 // Get a list of all the indexes for this table 47 ResultSet indexList = dbmd.getIndexInfo(null,null,table_name,false,false); 48 while(indexList.next()) { 49 System.out.println(" Index Name: "+indexList.getString("INDEX_NAME")); 50 System.out.println(" Column Name:"+indexList.getString("COLUMN_NAME")); 51 } 52 indexList.close(); 53 } 54 55 allTables.close(); 56 con.close(); 57 } 58 catch (ClassNotFoundException e) { 59 System.out.println("Unable to load database driver class"); 60 } 61 catch (SQLException e) { 62 System.out.println("SQL Exception: " + e.getMessage()); 63 }
Additional matches viewable in cache of jentnutexamples/jdbc/DBViewer.java.

Not satisfied? Try this search biased towards software and programming:
Google