java.sql

Interface ResultSet

Known Subinterfaces:
CachedRowSet, FilteredRowSet, JdbcRowSet, JoinRowSet, ResultSet, RowSet, SyncResolver, WebRowSet
Known Implementing Classes:
DelegatingResultSet, ResultSetWrapper

public interface ResultSet

A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable. The following code fragment, in which con is a valid Connection object, illustrates how to make a result set that is scrollable and insensitive to updates by others, and that is updatable. See ResultSet fields for other options.


       Statement stmt = con.createStatement(
                                      ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
       ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
       // rs will be scrollable, will not show changes made by others,
       // and will be updatable

 
The ResultSet interface provides getter methods (getBoolean, getLong, and so on) for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

For the getter methods, a JDBC driver attempts to convert the underlying data to the Java type specified in the getter method and returns a suitable Java value. The JDBC specification has a table showing the allowable mappings from SQL types to Java types that can be used by the ResultSet getter methods.

Column names used as input to getter methods are case insensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, there is no way for the programmer to guarantee that they actually refer to the intended columns.

A set of updater methods were added to this interface in the JDBC 2.0 API (JDK 1.2). The comments regarding parameters to the getter methods also apply to parameters to the updater methods.

The updater methods may be used in two ways:

  1. to update a column value in the current row. In a scrollable ResultSet object, the cursor can be moved backwards and forwards, to an absolute position, or to a position relative to the current row. The following code fragment updates the NAME column in the fifth row of the ResultSet object rs and then uses the method updateRow to update the data source table from which rs was derived.
    
           rs.absolute(5); // moves the cursor to the fifth row of rs
           rs.updateString("NAME", "AINSWORTH"); // updates the 
              // NAME column of row 5 to be AINSWORTH
           rs.updateRow(); // updates the row in the data source
    
     
  2. to insert column values into the insert row. An updatable ResultSet object has a special row associated with it that serves as a staging area for building a row to be inserted. The following code fragment moves the cursor to the insert row, builds a three-column row, and inserts it into rs and into the data source table using the method insertRow.
    
           rs.moveToInsertRow(); // moves cursor to the insert row
           rs.updateString(1, "AINSWORTH"); // updates the 
              // first column of the insert row to be AINSWORTH
           rs.updateInt(2,35); // updates the second column to be 35
           rs.updateBoolean(3, true); // updates the third column to true
           rs.insertRow();
           rs.moveToCurrentRow();
    
     

A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.

The number, types and properties of a ResultSet object's columns are provided by the ResulSetMetaData object returned by the ResultSet.getMetaData method.

See Also:
Statement.executeQuery(String), Statement.getResultSet(), ResultSetMetaData

Field Summary

static int
CLOSE_CURSORS_AT_COMMIT
The constant indicating that ResultSet objects should be closed when the method Connection.commit is called.
static int
CONCUR_READ_ONLY
The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.
static int
CONCUR_UPDATABLE
The constant indicating the concurrency mode for a ResultSet object that may be updated.
static int
FETCH_FORWARD
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.
static int
FETCH_REVERSE
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.
static int
FETCH_UNKNOWN
The constant indicating that the order in which rows in a result set will be processed is unknown.
static int
HOLD_CURSORS_OVER_COMMIT
The constant indicating that ResultSet objects should not be closed when the method Connection.commit is called.
static int
TYPE_FORWARD_ONLY
The constant indicating the type for a ResultSet object whose cursor may move only forward.
static int
TYPE_SCROLL_INSENSITIVE
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.
static int
TYPE_SCROLL_SENSITIVE
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others.

Method Summary

@Deprecated
BigDecimal getBigDecimal(int columnIndex, int scale)
Deprecated.
@Deprecated
BigDecimal getBigDecimal(String columnName, int scale)
Deprecated.
boolean
absolute(int row)
Moves the cursor to the given row number in this ResultSet object.
void
afterLast()
Moves the cursor to the end of this ResultSet object, just after the last row.
void
beforeFirst()
Moves the cursor to the front of this ResultSet object, just before the first row.
void
cancelRowUpdates()
Cancels the updates made to the current row in this ResultSet object.
void
clearWarnings()
Clears all warnings reported on this ResultSet object.
void
close()
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
void
deleteRow()
Deletes the current row from this ResultSet object and from the underlying database.
int
findColumn(String columnName)
Maps the given ResultSet column name to its ResultSet column index.
boolean
first()
Moves the cursor to the first row in this ResultSet object.
Array
getArray(int i)
Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Array
getArray(String colName)
Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
InputStream
getAsciiStream(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
InputStream
getAsciiStream(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.
BigDecimal
getBigDecimal(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
BigDecimal
getBigDecimal(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
InputStream
getBinaryStream(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes.
InputStream
getBinaryStream(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.
Blob
getBlob(int i)
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Blob
getBlob(String colName)
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
boolean
getBoolean(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
boolean
getBoolean(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
byte
getByte(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
byte
getByte(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
byte[]
getBytes(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
byte[]
getBytes(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
Reader
getCharacterStream(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Reader
getCharacterStream(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Clob
getClob(int i)
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Clob
getClob(String colName)
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
int
getConcurrency()
Retrieves the concurrency mode of this ResultSet object.
String
getCursorName()
Retrieves the name of the SQL cursor used by this ResultSet object.
Date
getDate(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date
getDate(int columnIndex, Calendar cal)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date
getDate(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Date
getDate(String columnName, Calendar cal)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
double
getDouble(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
double
getDouble(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
int
getFetchDirection()
Retrieves the fetch direction for this ResultSet object.
int
getFetchSize()
Retrieves the fetch size for this ResultSet object.
float
getFloat(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
float
getFloat(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
int
getInt(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
int
getInt(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
long
getLong(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
long
getLong(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
ResultSetMetaData
getMetaData()
Retrieves the number, types and properties of this ResultSet object's columns.
Object
getObject(int columnIndex)
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object
getObject(int i, java.util.Map> map)
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object
getObject(String columnName)
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Object
getObject(String colName, java.util.Map> map)
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
Ref
getRef(int i)
Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Ref
getRef(String colName)
Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
int
getRow()
Retrieves the current row number.
short
getShort(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
short
getShort(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
Statement
getStatement()
Retrieves the Statement object that produced this ResultSet object.
String
getString(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
String
getString(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Time
getTime(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time
getTime(int columnIndex, Calendar cal)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time
getTime(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Time
getTime(String columnName, Calendar cal)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Timestamp
getTimestamp(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp
getTimestamp(int columnIndex, Calendar cal)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Timestamp
getTimestamp(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
Timestamp
getTimestamp(String columnName, Calendar cal)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
int
getType()
Retrieves the type of this ResultSet object.
URL
getURL(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.
URL
getURL(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.
SQLWarning
getWarnings()
Retrieves the first warning reported by calls on this ResultSet object.
void
insertRow()
Inserts the contents of the insert row into this ResultSet object and into the database.
boolean
isAfterLast()
Retrieves whether the cursor is after the last row in this ResultSet object.
boolean
isBeforeFirst()
Retrieves whether the cursor is before the first row in this ResultSet object.
boolean
isFirst()
Retrieves whether the cursor is on the first row of this ResultSet object.
boolean
isLast()
Retrieves whether the cursor is on the last row of this ResultSet object.
@Deprecated
java.io.InputStream getUnicodeStream(int columnIndex)
Deprecated. use getCharacterStream in place of getUnicodeStream
@Deprecated
java.io.InputStream getUnicodeStream(String columnName)
Deprecated. use getCharacterStream instead
boolean
last()
Moves the cursor to the last row in this ResultSet object.
void
moveToCurrentRow()
Moves the cursor to the remembered cursor position, usually the current row.
void
moveToInsertRow()
Moves the cursor to the insert row.
boolean
next()
Moves the cursor down one row from its current position.
boolean
previous()
Moves the cursor to the previous row in this ResultSet object.
void
refreshRow()
Refreshes the current row with its most recent value in the database.
boolean
relative(int rows)
Moves the cursor a relative number of rows, either positive or negative.
boolean
rowDeleted()
Retrieves whether a row has been deleted.
boolean
rowInserted()
Retrieves whether the current row has had an insertion.
boolean
rowUpdated()
Retrieves whether the current row has been updated.
void
setFetchDirection(int direction)
Gives a hint as to the direction in which the rows in this ResultSet object will be processed.
void
setFetchSize(int rows)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object.
void
updateArray(int columnIndex, Array x)
Updates the designated column with a java.sql.Array value.
void
updateArray(String columnName, Array x)
Updates the designated column with a java.sql.Array value.
void
updateAsciiStream(int columnIndex, InputStream x, int length)
Updates the designated column with an ascii stream value.
void
updateAsciiStream(String columnName, InputStream x, int length)
Updates the designated column with an ascii stream value.
void
updateBigDecimal(int columnIndex, BigDecimal x)
Updates the designated column with a java.math.BigDecimal value.
void
updateBigDecimal(String columnName, BigDecimal x)
Updates the designated column with a java.sql.BigDecimal value.
void
updateBinaryStream(int columnIndex, InputStream x, int length)
Updates the designated column with a binary stream value.
void
updateBinaryStream(String columnName, InputStream x, int length)
Updates the designated column with a binary stream value.
void
updateBlob(int columnIndex, Blob x)
Updates the designated column with a java.sql.Blob value.
void
updateBlob(String columnName, Blob x)
Updates the designated column with a java.sql.Blob value.
void
updateBoolean(int columnIndex, boolean x)
Updates the designated column with a boolean value.
void
updateBoolean(String columnName, boolean x)
Updates the designated column with a boolean value.
void
updateByte(int columnIndex, byte x)
Updates the designated column with a byte value.
void
updateByte(String columnName, byte x)
Updates the designated column with a byte value.
void
updateBytes(int columnIndex, x[] )
Updates the designated column with a byte array value.
void
updateBytes(String columnName, x[] )
Updates the designated column with a byte array value.
void
updateCharacterStream(int columnIndex, Reader x, int length)
Updates the designated column with a character stream value.
void
updateCharacterStream(String columnName, Reader reader, int length)
Updates the designated column with a character stream value.
void
updateClob(int columnIndex, Clob x)
Updates the designated column with a java.sql.Clob value.
void
updateClob(String columnName, Clob x)
Updates the designated column with a java.sql.Clob value.
void
updateDate(int columnIndex, Date x)
Updates the designated column with a java.sql.Date value.
void
updateDate(String columnName, Date x)
Updates the designated column with a java.sql.Date value.
void
updateDouble(int columnIndex, double x)
Updates the designated column with a double value.
void
updateDouble(String columnName, double x)
Updates the designated column with a double value.
void
updateFloat(int columnIndex, float x)
Updates the designated column with a float value.
void
updateFloat(String columnName, float x)
Updates the designated column with a float value.
void
updateInt(int columnIndex, int x)
Updates the designated column with an int value.
void
updateInt(String columnName, int x)
Updates the designated column with an int value.
void
updateLong(int columnIndex, long x)
Updates the designated column with a long value.
void
updateLong(String columnName, long x)
Updates the designated column with a long value.
void
updateNull(int columnIndex)
Gives a nullable column a null value.
void
updateNull(String columnName)
Updates the designated column with a null value.
void
updateObject(int columnIndex, Object x)
Updates the designated column with an Object value.
void
updateObject(int columnIndex, Object x, int scale)
Updates the designated column with an Object value.
void
updateObject(String columnName, Object x)
Updates the designated column with an Object value.
void
updateObject(String columnName, Object x, int scale)
Updates the designated column with an Object value.
void
updateRef(int columnIndex, Ref x)
Updates the designated column with a java.sql.Ref value.
void
updateRef(String columnName, Ref x)
Updates the designated column with a java.sql.Ref value.
void
updateRow()
Updates the underlying database with the new contents of the current row of this ResultSet object.
void
updateShort(int columnIndex, short x)
Updates the designated column with a short value.
void
updateShort(String columnName, short x)
Updates the designated column with a short value.
void
updateString(int columnIndex, String x)
Updates the designated column with a String value.
void
updateString(String columnName, String x)
Updates the designated column with a String value.
void
updateTime(int columnIndex, Time x)
Updates the designated column with a java.sql.Time value.
void
updateTime(String columnName, Time x)
Updates the designated column with a java.sql.Time value.
void
updateTimestamp(int columnIndex, Timestamp x)
Updates the designated column with a java.sql.Timestamp value.
void
updateTimestamp(String columnName, Timestamp x)
Updates the designated column with a java.sql.Timestamp value.
boolean
wasNull()
Reports whether the last column read had a value of SQL NULL.

Field Details

CLOSE_CURSORS_AT_COMMIT

public static final int CLOSE_CURSORS_AT_COMMIT
The constant indicating that ResultSet objects should be closed when the method Connection.commit is called.
Field Value:
2
Since:
1.4
Usages and Demos :

View More Examples of ResultSet.CLOSE_CURSORS_AT_COMMIT
   1:             }
   2:             conn.setHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT);
   3:         ...
   4:             if(!(conn.getHoldability() == ResultSet.CLOSE_CURSORS_AT_COMMIT))
   5:             {
   6:         ...
   7:                 System.err.println("holdability incorrect, set "+ResultSet.CLOSE_CURSORS_AT_COMMIT+" but read back "+conn.getHoldability());
   8:                 assertFailure();

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   5:                 return "hold cursors over commit";

View Full Code Here
   1:                 break;
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 holdability = "close cursors at commit";
   4:                 break;
   5:             default:

View Full Code Here
   1:     public int getResultSetHoldability() throws SQLException {
   2:         return ResultSet.CLOSE_CURSORS_AT_COMMIT;
   3:     }
   4: 
   5:     public int getResultSetType() throws SQLException {

View Full Code Here
   1:         this.dflt_catalog                      = con.getCatalog();
   2:         this.dflt_holdability                  = (supports_setHoldability ? carefulCheckHoldability(con) : ResultSet.CLOSE_CURSORS_AT_COMMIT);
   3:         this.dflt_readOnly                     = (supports_setReadOnly ? carefulCheckReadOnly(con) : false);
   4:         ...
   5:             }
   6:             return ResultSet.CLOSE_CURSORS_AT_COMMIT;
   7:         }
   8:         ...
   9:             }
  10:             return ResultSet.CLOSE_CURSORS_AT_COMMIT;
  11:         }

View Full Code Here

CONCUR_READ_ONLY

public static final int CONCUR_READ_ONLY
The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.
Field Value:
1007
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.CONCUR_READ_ONLY
   1:       con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
   2:                           ResultSet.CONCUR_READ_ONLY);
   3:        rs = stmt.executeQuery("SELECT * from test ORDER BY test_id");
   4:       System.out.println("Got results:");
   5:       rs.afterLast();

View Full Code Here
   1:                  ResultSet.TYPE_SCROLL_INSENSITIVE,
   2:                  ResultSet.CONCUR_READ_ONLY);
   3:       }
   4: 
   5:       statement.setString(1, name);

View Full Code Here
   1:          stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   2:                                      ResultSet.CONCUR_READ_ONLY);
   3: 
   4:          rs = stmt.executeQuery(query);

View Full Code Here
   1:                  ResultSet.TYPE_SCROLL_INSENSITIVE,
   2:                  ResultSet.CONCUR_READ_ONLY);
   3:       }
   4: 
   5:       statement.setString(1, name);

View Full Code Here
   1:                              ResultSet.TYPE_SCROLL_INSENSITIVE,
   2:                              ResultSet.CONCUR_READ_ONLY);
   3:       }
   4: 
   5:       statement.setString(1, user.toUpperCase());

View Full Code Here

CONCUR_UPDATABLE

public static final int CONCUR_UPDATABLE
The constant indicating the concurrency mode for a ResultSet object that may be updated.
Field Value:
1008
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.CONCUR_UPDATABLE
   1:             stmt = con.createStatement(
   2:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:             rs = stmt.executeQuery("SELECT * FROM Users where nick=\"ian\"");
   4: 
   5:             rs.first();

View Full Code Here
   1:             stmt = con.createStatement(
   2:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:             uprs = stmt.executeQuery("SELECT * FROM Music_Recordings");
   4: 
   5:             ResultSetMetaData md = uprs.getMetaData();

View Full Code Here
   1:         stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   2:                                     ResultSet.CONCUR_UPDATABLE);
   3: 
   4:         BufferedReader inTxt = new BufferedReader(new FileReader(
   5:             strTxtFileName));

View Full Code Here
   1:       pstmt = conn.prepareStatement( "select x from t1",
   2:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );
   4:       rset = (ResultSet) pstmt.executeQuery();
   5:       JDBCUtil.printRsetTypeAndConcurrencyType( rset );

View Full Code Here
   1:       pstmt = conn.prepareStatement( stmtString,
   2:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:       System.out.print( "For statement: " + stmtString + ", " );
   4:       rset = (ResultSet) pstmt.executeQuery();
   5:       JDBCUtil.printRsetTypeAndConcurrencyType( rset );

View Full Code Here

FETCH_FORWARD

public static final int FETCH_FORWARD
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last. This constant is used by the method setFetchDirection as a hint to the driver, which the driver may ignore.
Field Value:
1000
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.FETCH_FORWARD
   1:     public int getFetchDirection() throws SQLException {
   2:         return ResultSet.FETCH_FORWARD;
   3:     }
   4: 
   5:     public int getFetchSize() throws SQLException {

View Full Code Here
   1:         switch(direction) {
   2:         case ResultSet.FETCH_FORWARD:
   3:         case ResultSet.FETCH_REVERSE:
   4:         case ResultSet.FETCH_UNKNOWN:
   5:             fetchDirection = direction;

View Full Code Here
   1:     public int getFetchDirection() throws SQLException {
   2:         return ResultSet.FETCH_FORWARD;
   3:     }
   4:         ...
   5:         switch (direction) {
   6:             case ResultSet.FETCH_FORWARD:
   7:             case ResultSet.FETCH_UNKNOWN:
   8:             case ResultSet.FETCH_REVERSE:
   9:                 break;

View Full Code Here
   1:   public int getFetchDirection() throws SQLException {
   2:     return ResultSet.FETCH_FORWARD;
   3:   }
   4:   
   5:   public int getFetchSize() throws SQLException {

View Full Code Here
   1:             checkClosed();
   2:             int result=ResultSet.FETCH_FORWARD;
   3:             if(Trace.isDetailed()) Trace.traceResult(result);
   4:             return result;
   5:         } catch(Throwable e) {

View Full Code Here

FETCH_REVERSE

public static final int FETCH_REVERSE
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first. This constant is used by the method setFetchDirection as a hint to the driver, which the driver may ignore.
Field Value:
1001
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.FETCH_REVERSE
   1:         case ResultSet.FETCH_FORWARD:
   2:         case ResultSet.FETCH_REVERSE:
   3:         case ResultSet.FETCH_UNKNOWN:
   4:             fetchDirection = direction;
   5:             break;

View Full Code Here
   1:             case ResultSet.FETCH_UNKNOWN:
   2:             case ResultSet.FETCH_REVERSE:
   3:                 break;
   4:             default:
   5:                 throw new SQLException("Unrecoginzed fetch direction " + direction + ".");

View Full Code Here
   1:         case java.sql.ResultSet.FETCH_FORWARD:
   2:         case java.sql.ResultSet.FETCH_REVERSE:
   3:         case java.sql.ResultSet.FETCH_UNKNOWN:
   4:             break;

View Full Code Here
   1:                 case java.sql.ResultSet.FETCH_FORWARD:
   2:                 case java.sql.ResultSet.FETCH_REVERSE:
   3:                 case java.sql.ResultSet.FETCH_UNKNOWN:
   4:                     fetchDirection_ = direction;
   5:                     break;

View Full Code Here
   1:                 case java.sql.ResultSet.FETCH_FORWARD:
   2:                 case java.sql.ResultSet.FETCH_REVERSE:
   3:                 case java.sql.ResultSet.FETCH_UNKNOWN:
   4:                     fetchDirection_ = direction;
   5:                     break;

View Full Code Here

FETCH_UNKNOWN

public static final int FETCH_UNKNOWN
The constant indicating that the order in which rows in a result set will be processed is unknown. This constant is used by the method setFetchDirection as a hint to the driver, which the driver may ignore.
Field Value:
1002
Usages and Demos :

View More Examples of ResultSet.FETCH_UNKNOWN
   1:         cachedResults.setCommand(SQL);
   2:         cachedResults.setFetchDirection(ResultSet.FETCH_UNKNOWN);
   3:     }
   4:     
   5:     protected void execute() throws SQLException, NamingException {

View Full Code Here
   1:         case ResultSet.FETCH_REVERSE:
   2:         case ResultSet.FETCH_UNKNOWN:
   3:             fetchDirection = direction;
   4:             break;
   5:         default:

View Full Code Here
   1:             case ResultSet.FETCH_FORWARD:
   2:             case ResultSet.FETCH_UNKNOWN:
   3:             case ResultSet.FETCH_REVERSE:
   4:                 break;
   5:             default:

View Full Code Here
   1:   public int getFetchDirection() throws SQLException {
   2:     return ResultSet.FETCH_UNKNOWN;
   3:   }
   4:   
   5:   public int getFetchSize() throws SQLException {

View Full Code Here
   1:         case java.sql.ResultSet.FETCH_REVERSE:
   2:         case java.sql.ResultSet.FETCH_UNKNOWN:
   3:             break;
   4: 
   5:         default:

View Full Code Here

HOLD_CURSORS_OVER_COMMIT

public static final int HOLD_CURSORS_OVER_COMMIT
The constant indicating that ResultSet objects should not be closed when the method Connection.commit is called.
Field Value:
1
Since:
1.4
Usages and Demos :

View More Examples of ResultSet.HOLD_CURSORS_OVER_COMMIT
   1:         Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
   2:                 ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);
   3: 
   4:         try {
   5:             ResultSet rs = stmt.executeQuery("SELECT id, long_str FROM test_table");

View Full Code Here
   1:                 return "close cursors at commit";
   2:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   3:                 return "hold cursors over commit";
   4:         }
   5:         return null;

View Full Code Here
   1:             switch (dbMD.getResultSetHoldability()) {
   2:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   3:                 holdability = "hold cursors over commit";
   4:                 break;
   5:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:

View Full Code Here
   1:         Section section =
   2:                 netAgent_.sectionManager_.getDynamicSection(java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT);
   3: 
   4:         buildEXCSQLSET(section);

View Full Code Here

TYPE_FORWARD_ONLY

public static final int TYPE_FORWARD_ONLY
The constant indicating the type for a ResultSet object whose cursor may move only forward.
Field Value:
1003
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.TYPE_FORWARD_ONLY
   1:         JoPreparedStatement stm = connection.getPreparedStatement(sql,
   2:                                     ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   3:         if (CId > 0) stm.setInt(1,CId);
   4:         stm.execute();

View Full Code Here
   1:         JoPreparedStatement stm = connection.getPreparedStatement(sql,
   2:                                     ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   3:         if (CId > 0) stm.setInt(1,CId);
   4:         stm.execute();

View Full Code Here
   1:         new ResultSetTypeEnum("TYPE_FORWARD_ONLY",
   2:                 ResultSet.TYPE_FORWARD_ONLY);
   3: 
   4:     public static final ResultSetTypeEnum SCROLL_INSENSITIVE =
   5:         new ResultSetTypeEnum("TYPE_SCROLL_INSENSITIVE",

View Full Code Here
   1: 
   2:             stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.CLOSE_CURSORS_AT_COMMIT);
   3:             stmt.close();
   4:         ...
   5: 
   6:             stmt = conn.prepareStatement("SELECT a FROM b", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.CLOSE_CURSORS_AT_COMMIT);
   7:             stmt.close();
   8:         ...
   9: 
  10:             stmt = conn.prepareCall("SELECT a FROM b", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.CLOSE_CURSORS_AT_COMMIT);
  11:             stmt.close();

View Full Code Here
   1:     {
   2:       case ResultSet.TYPE_FORWARD_ONLY:
   3:         System.out.print( "Forward only" );
   4:         ...
   5:     {
   6:       case ResultSet.TYPE_FORWARD_ONLY:
   7:         System.out.print( "Forward only" );
   8:         break;
   9:       case ResultSet.TYPE_SCROLL_INSENSITIVE:

View Full Code Here

TYPE_SCROLL_INSENSITIVE

public static final int TYPE_SCROLL_INSENSITIVE
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.
Field Value:
1004
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.TYPE_SCROLL_INSENSITIVE
   1:       pstmt = conn.prepareStatement( "select x from t1",
   2:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );
   4:       rset = (ResultSet) pstmt.executeQuery();
   5:       JDBCUtil.printRsetTypeAndConcurrencyType( rset );

View Full Code Here
   1:       statement      = c.prepareStatement(getCommand(),
   2:                  ResultSet.TYPE_SCROLL_INSENSITIVE,
   3:                  ResultSet.CONCUR_READ_ONLY);
   4:       }

View Full Code Here
   1:       pstmt = conn.prepareStatement( stmtString,
   2:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:       System.out.print( "For statement: " + stmtString + ", " );
   4:       rset = (ResultSet) pstmt.executeQuery();
   5:       JDBCUtil.printRsetTypeAndConcurrencyType( rset );

View Full Code Here
   1:       statement      = c.prepareStatement(getCommand(),
   2:                  ResultSet.TYPE_SCROLL_INSENSITIVE,
   3:                  ResultSet.CONCUR_READ_ONLY);
   4:       }

View Full Code Here
   1:           statement      = c.prepareStatement(getCommand(),
   2:                              ResultSet.TYPE_SCROLL_INSENSITIVE,
   3:                              ResultSet.CONCUR_READ_ONLY);
   4:       }

View Full Code Here

TYPE_SCROLL_SENSITIVE

public static final int TYPE_SCROLL_SENSITIVE
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others.
Field Value:
1005
Since:
1.2
Usages and Demos :

View More Examples of ResultSet.TYPE_SCROLL_SENSITIVE
   1:             stmt = con.createStatement(
   2:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:             rs = stmt.executeQuery("SELECT * FROM Users where nick=\"ian\"");
   4: 
   5:             rs.first();

View Full Code Here
   1:             stmt = con.createStatement(
   2:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   3:             uprs = stmt.executeQuery("SELECT * FROM Music_Recordings");
   4: 
   5:             ResultSetMetaData md = uprs.getMetaData();

View Full Code Here
   1:         conn = DriverManager.getConnection(url, "sa", "");
   2:         stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   3:                                     ResultSet.CONCUR_UPDATABLE);
   4: 
   5:         BufferedReader inTxt = new BufferedReader(new FileReader(

View Full Code Here
   1: 
   2:          stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   3:                                      ResultSet.CONCUR_READ_ONLY);
   4: 
   5:          rs = stmt.executeQuery(query);

View Full Code Here
   1:       pstmt = conn.prepareStatement( stmtString,
   2:         ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
   3:       System.out.print( "For statement: " + stmtString + ", " );
   4:       rset = (ResultSet) pstmt.executeQuery();
   5:       JDBCUtil.printRsetTypeAndConcurrencyType( rset );

View Full Code Here

Method Details

BigDecimal getBigDecimal

public @Deprecated BigDecimal getBigDecimal(int columnIndex,
                                            int scale)
            throws SQLException

Deprecated.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.BigDecimal in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
scale - the number of digits to the right of the decimal point
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

BigDecimal getBigDecimal

public @Deprecated BigDecimal getBigDecimal(String columnName,
                                            int scale)
            throws SQLException

Deprecated.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal in the Java programming language.
Parameters:
columnName - the SQL name of the column
scale - the number of digits to the right of the decimal point
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs

absolute

public boolean absolute(int row)
            throws SQLException
Moves the cursor to the given row number in this ResultSet object.

If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.

If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on.

An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row.

Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().

Parameters:
row - the number of the row to which the cursor should move. A positive number indicates the row number counting from the beginning of the result set; a negative number indicates the row number counting from the end of the result set
Returns:
true if the cursor is on the result set; false otherwise
Throws:
SQLException - if a database access error occurs, or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
Usages and Demos :

View More Examples of absolute(int row)
   1:     Statement s = c.createStatement();
   2:       ResultSet r = s.executeQuery("SELECT * FROM Personen");
   3:         ...
   4:       r.absolute(1);
   5:       r.last(); System.out.println("last: isLast "+r.isLast());
   6:       r.next(); System.out.println("next: isAfterLast "+r.isAfterLast());
   7:       r.relative(99); System.out.println("rel+: isAfterLast "+r.isAfterLast());

View Full Code Here
   1:         Statement stmt;
   2:         ResultSet uprs;
   3: 
   4:         ...
   5:             stmt = con.createStatement(
   6:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   7:             uprs = stmt.executeQuery("SELECT * FROM Music_Recordings");
   8:         ...
   9:             ResultSetMetaData md = uprs.getMetaData();
  10:             System.out.println("Resultset has " +
  11:                 md.getColumnCount() + " cols.");
  12:         ...
  13:             System.out.println("row1 " + rowNum);
  14:             uprs.absolute(1);

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.SQLException;
   3:         ...
   4:     System.out.println("Inside _demoUpdatability");
   5:     ResultSet rset = null;
   6:     PreparedStatement pstmt = null;
   7:         ...
   8:       pstmt = conn.prepareStatement( "select x from t1",
   9:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
  10:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );
  11:         ...
  12:       JDBCUtil.printRsetTypeAndConcurrencyType( rset );
  13:       rset.absolute( 3 );

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.SQLException;
   3:         ...
   4:   {
   5:     ResultSet rset = null;
   6:     PreparedStatement pstmt = null;
   7:         ...
   8:       pstmt = conn.prepareStatement( "select x from t1 order by x",
   9:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
  10:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );

View Full Code Here
   1:         PreparedStatement stmt = null;
   2:         ResultSet rs = null;
   3: 
   4:         ...
   5:         Statement stmt = null;
   6:         ResultSet rs = null;
   7: 
   8:         ...
   9:         try {
  10:             stmt = conn.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE,
  11:                 ResultSet.CONCUR_UPDATABLE);

View Full Code Here

afterLast

public void afterLast()
            throws SQLException
Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
Usages and Demos :

View More Examples of afterLast()
   1:     Statement s = c.createStatement();
   2:       ResultSet r = s.executeQuery("SELECT * FROM Personen");
   3:       r.absolute(1);
   4:         ...
   5:       r.relative(-99); System.out.println("rel-: isBeforeFirst "+r.isBeforeFirst());
   6:       r.afterLast(); System.out.println("after: isAfterLast "+r.isAfterLast());
   7:       r.beforeFirst(); System.out.println("before: isBeforeFir "+r.isBeforeFirst());
   8:   }
   9: }

View Full Code Here
   1:       Statement stmt;
   2:       ResultSet rs;
   3:             
   4:         ...
   5:       stmt = 
   6:       con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
   7:         ...
   8:                           ResultSet.CONCUR_READ_ONLY);
   9:        rs = stmt.executeQuery("SELECT * from test ORDER BY test_id");
  10:         ...
  11:       System.out.println("Got results:");
  12:       rs.afterLast();

View Full Code Here
   1:  import java.sql.ResultSet;
   2:  import java.sql.Statement;
   3:         ...
   4:       Statement stmt = null;
   5:       ResultSet rs = null;
   6:       try {
   7:         ...
   8: 
   9:          stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
  10:                                      ResultSet.CONCUR_READ_ONLY);
  11:         ...
  12: 
  13:          rs.afterLast();

View Full Code Here
   1:         Statement stmt = null;
   2:         ResultSet rs = null;
   3:         try {
   4:         ...
   5: 
   6:             stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   7:         ...
   8:                                         ResultSet.CONCUR_READ_ONLY);
   9: 
  10:         ...
  11: 
  12:             rs.afterLast();

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.SQLException;
   3:         ...
   4:   {
   5:     ResultSet rset = null;
   6:     PreparedStatement pstmt = null;
   7:         ...
   8:       pstmt = conn.prepareStatement( "select x from t1 order by x",
   9:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
  10:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );

View Full Code Here

beforeFirst

public void beforeFirst()
            throws SQLException
Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
Usages and Demos :

View More Examples of beforeFirst()
   1:     Statement s = c.createStatement();
   2:       ResultSet r = s.executeQuery("SELECT * FROM Personen");
   3:       r.absolute(1);
   4:         ...
   5:       r.afterLast(); System.out.println("after: isAfterLast "+r.isAfterLast());
   6:       r.beforeFirst(); System.out.println("before: isBeforeFir "+r.isBeforeFirst());
   7:   }
   8: }

View Full Code Here
   1:     
   2:     public void processResultSet(ResultSet pRs) throws SQLException {
   3:         while (pRs.next()) {
   4:            _res++;
   5:             if (_max>-1 && _res>_max) {

View Full Code Here
   1:     
   2:     protected void processResultSet(ResultSet pRs) throws SQLException {
   3:         while (pRs.next()) {
   4:            _res++;
   5:             if (_max>-1 && _res>_max) {

View Full Code Here
   1:     Statement stmt = null;
   2:     ResultSet rset = null;
   3: 
   4:         ...
   5:       conn = ConnectionFactory.getConnection();
   6:       stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, 
   7:         ...
   8:                                   ResultSet.CONCUR_READ_ONLY);
   9:       String sql = "SELECT * FROM tracks " 
  10:         ...
  11:       if (rset.next()) {
  12:         rset.beforeFirst();

View Full Code Here
   1:   }
   2: protected ResultSet execute(Connection c) throws SQLException
   3:   {
   4:         ...
   5:       Statement s      = c.createStatement(
   6:       ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);   
   7:         ...
   8:       ResultSet result = s.executeQuery(getCommand());
   9: 
  10:         ...
  11: 
  12:     result.beforeFirst();

View Full Code Here

cancelRowUpdates

public void cancelRowUpdates()
            throws SQLException
Cancels the updates made to the current row in this ResultSet object. This method may be called after calling an updater method(s) and before calling the method updateRow to roll back the updates made to a row. If no updates have been made or updateRow has already been called, this method has no effect.
Throws:
SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
Since:
1.2
Usages and Demos :

View More Examples of cancelRowUpdates()
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public void cancelRowUpdates() throws SQLException
  13:     { inner.cancelRowUpdates(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized void cancelRowUpdates() throws SQLException
  13:     { inner.cancelRowUpdates(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public void cancelRowUpdates() throws SQLException {
  13:         rs.cancelRowUpdates();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         inner.cancelRowUpdates();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         inner.cancelRowUpdates();

View Full Code Here

clearWarnings

public void clearWarnings()
            throws SQLException
Clears all warnings reported on this ResultSet object. After this method is called, the method getWarnings returns null until a new warning is reported for this ResultSet object.
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of clearWarnings()
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     public void testAbstractLobStreamingResultSetExtractorNoRows() throws SQLException {
   6:         MockControl rsetControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rset = (ResultSet)rsetControl.getMock();
   9:         rset.next();
  10:         ...
  11:         rsetControl.setReturnValue(true);
  12:         rset.clearWarnings();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public void clearWarnings() throws SQLException
  13:     { inner.clearWarnings(); }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5:       try {      
   6:         st.clearWarnings();
   7:       }
   8:         ...
   9: 
  10:   public static boolean close(ResultSet rs) {
  11:     if (rs != null) {
  12:         ...
  13:       try {      
  14:         rs.clearWarnings();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized void clearWarnings() throws SQLException
  13:     { inner.clearWarnings(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public void clearWarnings() throws SQLException {
  13:         rs.clearWarnings();

View Full Code Here

close

public void close()
            throws SQLException
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected.

Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of close()
   1:           try {
   2:               ResultSet resultSet = statement.executeQuery(sql);
   3:               try {
   4:         ...
   5:                   block.yield(resultSet);
   6:               } finally {
   7:         ...
   8:                   resultSet.close();
   9:               }
  10:         ...
  11:           } finally {
  12:               statement.close();

View Full Code Here
   1:         Statement stmt;
   2:         ResultSet rs;
   3: 
   4:         ...
   5:             stmt = con.createStatement(
   6:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   7:             rs = stmt.executeQuery("SELECT * FROM Users where nick=\"ian\"");
   8:         ...
   9: 
  10:             rs.close();
  11:         ...
  12:             stmt.close();

View Full Code Here
   1:     Connection cn = null;
   2:     ResultSet  rs = null;
   3:     try {
   4:         ...
   5:     finally {
   6:       try {rs.close();cn.close();}

View Full Code Here
   1:        +"VALUES ('???',20,'???')", Statement.RETURN_GENERATED_KEYS);
   2:     ResultSet rs=stmt.getGeneratedKeys();
   3:     if (rs.next()){
   4:         ...
   5: 
   6:     rs.close();
   7:         ...
   8:     stmt.close();
   9:         ...
  10:     con.close();

View Full Code Here
   1: import edu.utah.uonline.License;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5: public abstract class TempResultSet extends TempConnection implements License {
   6:   protected ResultSet rs;
   7: 
   8:         ...
   9:     if (rs != null) {
  10:       rs.close();
  11:       rs = null;

View Full Code Here

deleteRow

public void deleteRow()
            throws SQLException
Deletes the current row from this ResultSet object and from the underlying database. This method cannot be called when the cursor is on the insert row.
Throws:
SQLException - if a database access error occurs or if this method is called when the cursor is on the insert row
Since:
1.2
Usages and Demos :

View More Examples of deleteRow()
   1:     
   2:     public void processResultSet(ResultSet pRs) throws SQLException {
   3:         while (pRs.next()) {
   4:         ...
   5:             }
   6:             pRs.deleteRow();
   7:         }
   8:         if (_max==1 && _res!=1)  {
   9:             throw new DBDeleteSingleException("max("+_max+") res("+_res+")");

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.SQLException;
   3:         ...
   4:     System.out.println("Inside _demoUpdatability");
   5:     ResultSet rset = null;
   6:     PreparedStatement pstmt = null;
   7:         ...
   8:       pstmt = conn.prepareStatement( "select x from t1",
   9:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
  10:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );
  11:         ...
  12:       rset.absolute( 4 );
  13:       rset.deleteRow();

View Full Code Here
   1:     
   2:     protected void processResultSet(ResultSet pRs) throws SQLException {
   3:         while (pRs.next()) {
   4:         ...
   5:             }
   6:             pRs.deleteRow();
   7:         }
   8:         if (_max==1 && _res!=1)  {
   9:             AppLog.debug(_bean.toString());

View Full Code Here
   1:         Statement stmt = null;
   2:         ResultSet rs = null;
   3:         try {
   4:         ...
   5: 
   6:             stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   7:         ...
   8:                                         ResultSet.CONCUR_UPDATABLE);
   9: 
  10:         ...
  11:             rs.first();
  12:             rs.deleteRow();

View Full Code Here
   1:   private Statement stmt;
   2:   private ResultSet resultSet;
   3: 
   4:         ...
   5:    con=new ConnectionProvider().getConnection();
   6:    stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
   7:    ResultSet.CONCUR_UPDATABLE);
   8:    resultSet=stmt.executeQuery("select ID,NAME,AGE,ADDRESS from CUSTOMERS");
   9:    

View Full Code Here

findColumn

public int findColumn(String columnName)
            throws SQLException
Maps the given ResultSet column name to its ResultSet column index.
Parameters:
columnName - the name of the column
Returns:
the column index of the given column name
Throws:
SQLException - if the ResultSet object does not contain columnName or a database access error occurs
Usages and Demos :

View More Examples of findColumn(String columnName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     private MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:     private ResultSet rs = (ResultSet) rsControl.getMock();
   9:     private MockControl psControl = MockControl.createControl(PreparedStatement.class);
  10:         ...
  11:     protected void setUp() throws SQLException {
  12:         rs.findColumn("column");

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public int findColumn(String a) throws SQLException
  13:     { return inner.findColumn(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized int findColumn(String a) throws SQLException
  13:     { return inner.findColumn(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.findColumn(a);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.findColumn(a);

View Full Code Here

first

public boolean first()
            throws SQLException
Moves the cursor to the first row in this ResultSet object.
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
Usages and Demos :

View More Examples of first()
   1:         Statement stmt;
   2:         ResultSet rs;
   3: 
   4:         ...
   5:             stmt = con.createStatement(
   6:             ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
   7:             rs = stmt.executeQuery("SELECT * FROM Users where nick=\"ian\"");
   8:         ...
   9: 
  10:             rs.first();
  11:             rs.updateString("password", "unguessable");

View Full Code Here
   1:     Statement s = c.createStatement();
   2:       ResultSet r = s.executeQuery("SELECT * FROM Personen");
   3:       r.absolute(1);
   4:         ...
   5:       r.relative(99); System.out.println("rel+: isAfterLast "+r.isAfterLast());
   6:       r.first(); System.out.println("first: isFirst "+r.isFirst());
   7:       r.previous(); System.out.println("prev: isBeforeFirst "+r.isBeforeFirst());
   8:       r.relative(-99); System.out.println("rel-: isBeforeFirst "+r.isBeforeFirst());
   9:       r.afterLast(); System.out.println("after: isAfterLast "+r.isAfterLast());

View Full Code Here
   1:     Statement stmt = null;
   2:     ResultSet rset = null;
   3: 
   4:         ...
   5:       conn = ConnectionFactory.getConnection();
   6:       stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, 
   7:         ...
   8:                                   ResultSet.CONCUR_READ_ONLY);
   9:       String sql = "SELECT * FROM tracks " 
  10:         ...
  11:           if (s.equalsIgnoreCase("F")) {
  12:             result = rset.first();

View Full Code Here
   1: import java.io.IOException;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:   {
   6:     ResultSet rset = null;
   7:     PreparedStatement pstmt = null;
   8:         ...
   9:       pstmt = conn.prepareStatement( stmtString,
  10:         ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
  11:       System.out.print( "For statement: " + stmtString + ", " );

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.SQLException;
   3:         ...
   4:   {
   5:     ResultSet rset = null;
   6:     PreparedStatement pstmt = null;
   7:         ...
   8:       pstmt = conn.prepareStatement( "select x from t1 order by x",
   9:         ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
  10:       JDBCUtil.printRsetTypeAndConcurrencyType( pstmt );

View Full Code Here

getArray

public Array getArray(int i)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
an Array object representing the SQL ARRAY value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getArray(int i)
   1: import java.sql.Types;
   2: import java.sql.ResultSet;
   3: import oracle.sql.ARRAY;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     try
   8:         ...
   9:       {
  10:         Array array = rset.getArray(1);
  11:         _doUseGetArray( array );
  12:         ...
  13:     System.out.println("In _doUseResultSet");
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import oracle.sql.ArrayDescriptor;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     ARRAY array = null;
   8:         ...
   9:       {
  10:         array = (ARRAY) rset.getArray(1);
  11:       }
  12:         ...
  13:     int numOfRecordsRetrieved = 0;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import oracle.sql.ARRAY;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     ARRAY array = null;
   8:         ...
   9:       {
  10:         array = (ARRAY) rset.getArray(1);
  11:       }
  12:         ...
  13:     int numOfRecordsRetrieved = 0;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Array getArray(String a) throws SQLException
  13:     { return inner.getArray(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Array getArray(String a) throws SQLException
  13:     { return inner.getArray(a); }

View Full Code Here

getArray

public Array getArray(String colName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an Array object in the Java programming language.
Parameters:
colName - the name of the column from which to retrieve the value
Returns:
an Array object representing the SQL ARRAY value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getArray(String colName)
   1: import java.sql.Types;
   2: import java.sql.ResultSet;
   3: import oracle.sql.ARRAY;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     try
   8:         ...
   9:       {
  10:         Array array = rset.getArray(1);
  11:         _doUseGetArray( array );
  12:         ...
  13:     System.out.println("In _doUseResultSet");
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import oracle.sql.ArrayDescriptor;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     ARRAY array = null;
   8:         ...
   9:       {
  10:         array = (ARRAY) rset.getArray(1);
  11:       }
  12:         ...
  13:     int numOfRecordsRetrieved = 0;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import oracle.sql.ARRAY;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     ARRAY array = null;
   8:         ...
   9:       {
  10:         array = (ARRAY) rset.getArray(1);
  11:       }
  12:         ...
  13:     int numOfRecordsRetrieved = 0;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Array getArray(String a) throws SQLException
  13:     { return inner.getArray(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Array getArray(String a) throws SQLException
  13:     { return inner.getArray(a); }

View Full Code Here

getAsciiStream

public InputStream getAsciiStream(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a Java input stream that delivers the database column value as a stream of one-byte ASCII characters; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getAsciiStream(int columnIndex)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9: 
  10:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {
  11:         logger.debug("Returning BLOB as binary stream");
  12:         ...
  13:         logger.debug("Returning CLOB as ASCII stream");
  14:         return rs.getAsciiStream(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         rs.getBytes(1);
  10:         ...
  11:         ResultSet rs = (ResultSet) rsControl.getMock();
  12:         rs.getAsciiStream(1);

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getAsciiStream(key.toString());

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public InputStream getAsciiStream(String a) throws SQLException
  13:     { return inner.getAsciiStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized InputStream getAsciiStream(String a) throws SQLException
  13:     { return inner.getAsciiStream(a); }

View Full Code Here

getAsciiStream

public InputStream getAsciiStream(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

Parameters:
columnName - the SQL name of the column
Returns:
a Java input stream that delivers the database column value as a stream of one-byte ASCII characters. If the value is SQL NULL, the value returned is null.
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getAsciiStream(String columnName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9: 
  10:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {
  11:         logger.debug("Returning BLOB as binary stream");
  12:         ...
  13:         logger.debug("Returning CLOB as ASCII stream");
  14:         return rs.getAsciiStream(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         rs.getBytes(1);
  10:         ...
  11:         ResultSet rs = (ResultSet) rsControl.getMock();
  12:         rs.getAsciiStream(1);

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getAsciiStream(key.toString());

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public InputStream getAsciiStream(String a) throws SQLException
  13:     { return inner.getAsciiStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized InputStream getAsciiStream(String a) throws SQLException
  13:     { return inner.getAsciiStream(a); }

View Full Code Here

getBigDecimal

public BigDecimal getBigDecimal(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getBigDecimal(int columnIndex)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBigDecimal(key.toString(), i);

View Full Code Here
   1:             selectBalance.setInt(1, account);
   2:             ResultSet rs = selectBalance.executeQuery();
   3:             rs.next();
   4:         ...
   5:             rs.getBigDecimal(1);
   6:             rs.close();
   7:             insertHistory.setInt(1, account);
   8:             insertHistory.setInt(2, teller);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.Timestamp;
   4:         ...
   5:             conn = getConn();
   6:             PreparedStatement stmt = getStatement(conn, getTSIAQuotesOrderByChangeSQL, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
   7:             
   8:         ...
   9: 
  10:             ResultSet rs = stmt.executeQuery();
  11:             
  12:         ...
  13:             else 
  14:                 TSIA = rs.getBigDecimal("TSIA");

View Full Code Here
   1:             stmt.setString(1, fieldType.getName());
   2:             ResultSet rs = stmt.executeQuery();
   3:             if (rs.next()) {
   4:         ...
   5:             stmt.setLong(1, fieldTypeId);
   6:             ResultSet rs = stmt.executeQuery();
   7:             while (rs.next()) {
   8:         ...
   9:             stmt.setLong(1, fieldTypeId);
  10:             ResultSet rs = stmt.executeQuery();
  11:             if (!rs.next()) {
  12:         ...
  13:         public Object getValue(ResultSet rs) throws SQLException {
  14:             return rs.getBigDecimal("decimalvalue");

View Full Code Here

getBigDecimal

public BigDecimal getBigDecimal(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.
Parameters:
columnName - the column name
Returns:
the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getBigDecimal(String columnName)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBigDecimal(key.toString(), i);

View Full Code Here
   1:             selectBalance.setInt(1, account);
   2:             ResultSet rs = selectBalance.executeQuery();
   3:             rs.next();
   4:         ...
   5:             rs.getBigDecimal(1);
   6:             rs.close();
   7:             insertHistory.setInt(1, account);
   8:             insertHistory.setInt(2, teller);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.Timestamp;
   4:         ...
   5:             conn = getConn();
   6:             PreparedStatement stmt = getStatement(conn, getTSIAQuotesOrderByChangeSQL, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
   7:             
   8:         ...
   9: 
  10:             ResultSet rs = stmt.executeQuery();
  11:             
  12:         ...
  13:             else 
  14:                 TSIA = rs.getBigDecimal("TSIA");

View Full Code Here
   1:             stmt.setString(1, fieldType.getName());
   2:             ResultSet rs = stmt.executeQuery();
   3:             if (rs.next()) {
   4:         ...
   5:             stmt.setLong(1, fieldTypeId);
   6:             ResultSet rs = stmt.executeQuery();
   7:             while (rs.next()) {
   8:         ...
   9:             stmt.setLong(1, fieldTypeId);
  10:             ResultSet rs = stmt.executeQuery();
  11:             if (!rs.next()) {
  12:         ...
  13:         public Object getValue(ResultSet rs) throws SQLException {
  14:             return rs.getBigDecimal("decimalvalue");

View Full Code Here

getBinaryStream

public InputStream getBinaryStream(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a binary stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getBinaryStream(int columnIndex)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9: 
  10:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {
  11:         logger.debug("Returning BLOB as binary stream");
  12:         ...
  13:         return rs.getBinaryStream(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         rs.getBytes(1);
  10:         ...
  11:         ResultSet rs = (ResultSet) rsControl.getMock();
  12:         rs.getBinaryStream(1);

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBinaryStream(key.toString());

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public InputStream getBinaryStream(int a) throws SQLException
  13:     { return inner.getBinaryStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized InputStream getBinaryStream(int a) throws SQLException
  13:     { return inner.getBinaryStream(a); }

View Full Code Here

getBinaryStream

public InputStream getBinaryStream(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

Parameters:
columnName - the SQL name of the column
Returns:
a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getBinaryStream(String columnName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9: 
  10:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {
  11:         logger.debug("Returning BLOB as binary stream");
  12:         ...
  13:         return rs.getBinaryStream(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         rs.getBytes(1);
  10:         ...
  11:         ResultSet rs = (ResultSet) rsControl.getMock();
  12:         rs.getBinaryStream(1);

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBinaryStream(key.toString());

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public InputStream getBinaryStream(int a) throws SQLException
  13:     { return inner.getBinaryStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized InputStream getBinaryStream(int a) throws SQLException
  13:     { return inner.getBinaryStream(a); }

View Full Code Here

getBlob

public Blob getBlob(int i)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
a Blob object representing the SQL BLOB value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getBlob(int i)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getBlob(name);
   9:     }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getBlob(name);
   9:     }

View Full Code Here
   1: import java.sql.Clob;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
   7:         ResultSetMetaData rsmd = rs.getMetaData();
   8:         ...
   9: 
  10:     protected Object getColumnValue(ResultSet rs, int index, Class requiredType) throws SQLException {
  11:         if (requiredType != null) {
  12:         ...
  13:             else if (Blob.class.equals(requiredType)) {
  14:                 return rs.getBlob(index);

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13: 
  14:     public final Blob getBlob(int i)            throws SQLException    { return result.getBlob(i); }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.Statement;
   4:         ...
   5:         
   6:         ResultSet rs = stmt.executeQuery();
   7:         
   8:         ...
   9:                 Arrays.equals(
  10:                     rs.getBlob(4).getBytes(1, TEST_BYTES.length), 
  11:                     TEST_BYTES));
  12:         ...
  13:         
  14:         ResultSet rs = stmt.executeQuery();

View Full Code Here

getBlob

public Blob getBlob(String colName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.
Parameters:
colName - the name of the column from which to retrieve the value
Returns:
a Blob object representing the SQL BLOB value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getBlob(String colName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getBlob(name);
   9:     }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getBlob(name);
   9:     }

View Full Code Here
   1: import java.sql.Clob;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
   7:         ResultSetMetaData rsmd = rs.getMetaData();
   8:         ...
   9: 
  10:     protected Object getColumnValue(ResultSet rs, int index, Class requiredType) throws SQLException {
  11:         if (requiredType != null) {
  12:         ...
  13:             else if (Blob.class.equals(requiredType)) {
  14:                 return rs.getBlob(index);

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13: 
  14:     public final Blob getBlob(int i)            throws SQLException    { return result.getBlob(i); }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.Statement;
   4:         ...
   5:         
   6:         ResultSet rs = stmt.executeQuery();
   7:         
   8:         ...
   9:                 Arrays.equals(
  10:                     rs.getBlob(4).getBytes(1, TEST_BYTES.length), 
  11:                     TEST_BYTES));
  12:         ...
  13:         
  14:         ResultSet rs = stmt.executeQuery();

View Full Code Here

getBoolean

public boolean getBoolean(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is false
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getBoolean(int columnIndex)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBoolean(key.toString());

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:                 pstmt.setLong(1, projectId);
   6:                 ResultSet rs = pstmt.executeQuery();
   7:                 if (!rs.next())
   8:         ...
   9: 
  10:                 ResultSet rs = pstmt.executeQuery();
  11:                 while (rs.next()) {
  12:         ...
  13:                 com.jisuesoft.tracker.ProjectStatus.valueOf(rs.getInt(8)),
  14:                 rs.getBoolean(9), rs.getBoolean(10));

View Full Code Here
   1:             
   2:             ResultSet rs = ps.executeQuery();
   3:             String rVal = null;
   4:         ...
   5:             
   6:             ResultSet rs = ps.executeQuery();
   7:             boolean found = rs.next();
   8:         ...
   9:             ps.setString(2, hashedPassword);
  10:             ResultSet rs = ps.executeQuery();
  11:             if(!rs.next())
  12:         ...
  13:                     rs.getString("email"),
  14:                     rs.getBoolean("admin"),

View Full Code Here
   1: import java.sql.DatabaseMetaData;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public static Metadata retriveResultSetMetadata (ResultSet res) throws SQLException {
   7:         return new Metadata(res);
   8:         ...
   9: 
  10:     protected Metadata (ResultSet res) throws SQLException {
  11:         setResultSetMetadata(res);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         PreparedStatement pst = null;
   6:         ResultSet res = null;
   7:         Connection connection = null;
   8:         ...
   9:                         res.getString(4),
  10:                         res.getBoolean(5));
  11: 
  12:         ...
  13:         PreparedStatement pst = null;
  14:         ResultSet res = null;

View Full Code Here

getBoolean

public boolean getBoolean(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is false
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getBoolean(String columnName)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBoolean(key.toString());

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:                 pstmt.setLong(1, projectId);
   6:                 ResultSet rs = pstmt.executeQuery();
   7:                 if (!rs.next())
   8:         ...
   9: 
  10:                 ResultSet rs = pstmt.executeQuery();
  11:                 while (rs.next()) {
  12:         ...
  13:                 com.jisuesoft.tracker.ProjectStatus.valueOf(rs.getInt(8)),
  14:                 rs.getBoolean(9), rs.getBoolean(10));

View Full Code Here
   1:             
   2:             ResultSet rs = ps.executeQuery();
   3:             String rVal = null;
   4:         ...
   5:             
   6:             ResultSet rs = ps.executeQuery();
   7:             boolean found = rs.next();
   8:         ...
   9:             ps.setString(2, hashedPassword);
  10:             ResultSet rs = ps.executeQuery();
  11:             if(!rs.next())
  12:         ...
  13:                     rs.getString("email"),
  14:                     rs.getBoolean("admin"),

View Full Code Here
   1: import java.sql.DatabaseMetaData;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public static Metadata retriveResultSetMetadata (ResultSet res) throws SQLException {
   7:         return new Metadata(res);
   8:         ...
   9: 
  10:     protected Metadata (ResultSet res) throws SQLException {
  11:         setResultSetMetadata(res);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         PreparedStatement pst = null;
   6:         ResultSet res = null;
   7:         Connection connection = null;
   8:         ...
   9:                         res.getString(4),
  10:                         res.getBoolean(5));
  11: 
  12:         ...
  13:         PreparedStatement pst = null;
  14:         ResultSet res = null;

View Full Code Here

getByte

public byte getByte(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getByte(int columnIndex)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getByte(key.toString());

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13:     {
  14:         byte r = res.getByte(i);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public byte getByte(String a) throws SQLException
  13:     { return inner.getByte(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized byte getByte(String a) throws SQLException
  13:     { return inner.getByte(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public byte getByte(String columnName) throws SQLException {
  13:         return rs.getByte( findColumn(columnName) );

View Full Code Here

getByte

public byte getByte(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getByte(String columnName)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getByte(key.toString());

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13:     {
  14:         byte r = res.getByte(i);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public byte getByte(String a) throws SQLException
  13:     { return inner.getByte(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized byte getByte(String a) throws SQLException
  13:     { return inner.getByte(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public byte getByte(String columnName) throws SQLException {
  13:         return rs.getByte( findColumn(columnName) );

View Full Code Here

getBytes

public byte[] getBytes(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getBytes(int columnIndex)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9:         return rs.getBytes(columnIndex);
  10:     }
  11:         ...
  12: 
  13:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         ...
  10:         rs.getBytes(1);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public abstract class BaseReadCmd extends BaseCmd {
   6:     protected ResultSet rs = null;
   7: 
   8:         ...
   9:         }
  10:         return rs.getBytes(column);
  11:     }

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBytes(key.toString());

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13:     
  14:     public final byte[] getBytes(int i)            throws SQLException { return result.getBytes(i); }

View Full Code Here

getBytes

public byte[] getBytes(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getBytes(String columnName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9:         return rs.getBytes(columnIndex);
  10:     }
  11:         ...
  12: 
  13:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         ...
  10:         rs.getBytes(1);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public abstract class BaseReadCmd extends BaseCmd {
   6:     protected ResultSet rs = null;
   7: 
   8:         ...
   9:         }
  10:         return rs.getBytes(column);
  11:     }

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getBytes(key.toString());

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13:     
  14:     public final byte[] getBytes(int i)            throws SQLException { return result.getBytes(i); }

View Full Code Here

getCharacterStream

public Reader getCharacterStream(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getCharacterStream(int columnIndex)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9: 
  10:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {
  11:         logger.debug("Returning BLOB as binary stream");
  12:         ...
  13:         logger.debug("Returning CLOB as character stream");
  14:         return rs.getCharacterStream(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         rs.getBytes(1);
  10:         ...
  11:         ResultSet rs = (ResultSet) rsControl.getMock();
  12:         rs.getCharacterStream(1);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Reader getCharacterStream(int a) throws SQLException
  13:     { return inner.getCharacterStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Reader getCharacterStream(int a) throws SQLException
  13:     { return inner.getCharacterStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Reader getCharacterStream(String columnName) throws SQLException {
  13:         return rs.getCharacterStream( findColumn(columnName) );

View Full Code Here

getCharacterStream

public Reader getCharacterStream(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.
Parameters:
columnName - the name of the column
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getCharacterStream(String columnName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException {
   7:         logger.debug("Returning BLOB as bytes");
   8:         ...
   9: 
  10:     public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException {
  11:         logger.debug("Returning BLOB as binary stream");
  12:         ...
  13:         logger.debug("Returning CLOB as character stream");
  14:         return rs.getCharacterStream(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: 
   4:         ...
   5:         LobHandler lobHandler = new DefaultLobHandler();
   6:         MockControl rsControl = MockControl.createControl(ResultSet.class);
   7:         ...
   8:         ResultSet rs = (ResultSet) rsControl.getMock();
   9:         rs.getBytes(1);
  10:         ...
  11:         ResultSet rs = (ResultSet) rsControl.getMock();
  12:         rs.getCharacterStream(1);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Reader getCharacterStream(int a) throws SQLException
  13:     { return inner.getCharacterStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Reader getCharacterStream(int a) throws SQLException
  13:     { return inner.getCharacterStream(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Reader getCharacterStream(String columnName) throws SQLException {
  13:         return rs.getCharacterStream( findColumn(columnName) );

View Full Code Here

getClob

public Clob getClob(int i)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
a Clob object representing the SQL CLOB value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getClob(int i)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getClob(name);
   9:     }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getClob(name);
   9:     }

View Full Code Here
   1: import java.sql.CallableStatement;
   2: import java.sql.ResultSet;
   3: import oracle.sql.CLOB;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     Writer writer= null;
   8:         ...
   9:       {
  10:         CLOB clob = (CLOB)rset.getClob( 1 );
  11:         String newClobData = new String("NEW CLOB DATA");
  12:         ...
  13:     PreparedStatement pstmt = null;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.Clob;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
   7:         ResultSetMetaData rsmd = rs.getMetaData();
   8:         ...
   9: 
  10:     protected Object getColumnValue(ResultSet rs, int index, Class requiredType) throws SQLException {
  11:         if (requiredType != null) {
  12:         ...
  13:             else if (Clob.class.equals(requiredType)) {
  14:                 return rs.getClob(index);

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13: 
  14:     public final Clob getClob(int i)            throws SQLException { return result.getClob(i); }

View Full Code Here

getClob

public Clob getClob(String colName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.
Parameters:
colName - the name of the column from which to retrieve the value
Returns:
a Clob object representing the SQL CLOB value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getClob(String colName)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getClob(name);
   9:     }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public Object get(ResultSet rs, String name) throws HibernateException, SQLException {
   7:         ...
   8:         return rs.getClob(name);
   9:     }

View Full Code Here
   1: import java.sql.CallableStatement;
   2: import java.sql.ResultSet;
   3: import oracle.sql.CLOB;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     Writer writer= null;
   8:         ...
   9:       {
  10:         CLOB clob = (CLOB)rset.getClob( 1 );
  11:         String newClobData = new String("NEW CLOB DATA");
  12:         ...
  13:     PreparedStatement pstmt = null;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.Clob;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
   7:         ResultSetMetaData rsmd = rs.getMetaData();
   8:         ...
   9: 
  10:     protected Object getColumnValue(ResultSet rs, int index, Class requiredType) throws SQLException {
  11:         if (requiredType != null) {
  12:         ...
  13:             else if (Clob.class.equals(requiredType)) {
  14:                 return rs.getClob(index);

View Full Code Here
   1:     protected Statement statement;
   2:     protected ResultSet result;
   3:     public JoStatement(JoConnection conn, int type, int concurrency)
   4:         ...
   5:     {
   6:         this(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   7:     }
   8:         ...
   9: 
  10:     public ResultSet executeQuery(String sql)
  11:         throws SQLException
  12:         ...
  13: 
  14:     public final Clob getClob(int i)            throws SQLException { return result.getClob(i); }

View Full Code Here

getConcurrency

public int getConcurrency()
            throws SQLException
Retrieves the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set.
Returns:
the concurrency type, either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getConcurrency()
   1: package book.util;
   2: import java.sql.ResultSet;
   3: import java.sql.Statement;
   4:         ...
   5:     Statement stmt = conn.createStatement();
   6:     ResultSet rset = stmt.executeQuery("select count(*) from dual" );
   7:     while( rset.next() )
   8:         ...
   9:   }
  10:   public static void close ( ResultSet resultSet, Statement statement,
  11:     Connection connection )
  12:         ...
  13:     }
  14:     int resultSetConcurrency = rset.getConcurrency();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public int getConcurrency() throws SQLException
  13:     { return inner.getConcurrency(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized int getConcurrency() throws SQLException
  13:     { return inner.getConcurrency(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public int getConcurrency() throws SQLException {
  13:         return rs.getConcurrency();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getConcurrency();

View Full Code Here

getCursorName

public String getCursorName()
            throws SQLException
Retrieves the name of the SQL cursor used by this ResultSet object.

In SQL, a result table is retrieved through a cursor that is named. The current row of a result set can be updated or deleted using a positioned update/delete statement that references the cursor name. To insure that the cursor has the proper isolation level to support update, the cursor's SELECT statement should be of the form SELECT FOR UPDATE. If FOR UPDATE is omitted, the positioned updates may fail.

The JDBC API supports this SQL feature by providing the name of the SQL cursor used by a ResultSet object. The current row of a ResultSet object is also the current row of this SQL cursor.

Note: If positioned update is not supported, a SQLException is thrown.

Returns:
the SQL name for this ResultSet object's cursor
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getCursorName()
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     protected void setResultSet(ResultSet value) throws SQLException
   7:     {
   8:         ...
   9: 
  10:     protected ResultSet getResultSet()
  11:     {
  12:         ...
  13:         if (rs != null)
  14:             return rs.getCursorName();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public String getCursorName() throws SQLException
  13:     { return inner.getCursorName(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized String getCursorName() throws SQLException
  13:     { return inner.getCursorName(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public String getCursorName() throws SQLException {
  13:         return rs.getCursorName();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getCursorName();

View Full Code Here

getDate

public Date getDate(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getDate(int columnIndex)
   1: import java.sql.DriverManager;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5:                     
   6:                     ResultSetMetaData metaData = resultSet.getMetaData();
   7:                     ExecutionPlanElement executionPlan = ((ResultSetMetaDataImpl) metaData).getExecutionPlan();
   8:         ...
   9:                     
  10:                     while (resultSet.next()) {
  11:                     }

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: {
   6:   public InstanceEvent(ResultSet rs, Event master)
   7:       throws SQLException, CaldataException
   8:         ...
   9:           Fields.getEventLongdesc(rs),
  10:           rs.getDate(Fields.MDSTARTDATE.getName()), 
  11:           rs.getTime(Fields.MDSTARTTIME.getName()), 
  12:         ...
  13:           rs.getDate(Fields.MDENDDATE.getName()), 

View Full Code Here
   1:     public AttributeType getType() { return AttributeType.INTEGER; }
   2:     public Object getValue(ResultSet rs, int columnIndex)
   3:         throws SQLException
   4:         ...
   5:     public AttributeType getType() { return AttributeType.DOUBLE; }
   6:     public Object getValue(ResultSet rs, int columnIndex)
   7:         throws SQLException
   8:         ...
   9:     public AttributeType getType() { return AttributeType.STRING; }
  10:     public Object getValue(ResultSet rs, int columnIndex)
  11:         throws SQLException
  12:         ...
  13:     {
  14:       return rs.getDate(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: import java.sql.Types;
   4:         ...
   5:                 new AbstractLobStreamingResultSetExtractor() {
   6:                     public void streamData(ResultSet rs) throws SQLException, IOException {
   7:                         FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), os);
   8:         ...
   9: 
  10:       public Object mapRow(ResultSet rs, int rowNumber) throws SQLException {
  11:         Poster p = new Poster(
  12:         ...
  13:             rs.getInt(1),
  14:             rs.getDate(2),

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:         ...
   5:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   6:                 return "hold cursors over commit";
   7:         ...
   8: 
   9:     public static Object getObject(ResultSet resultSet, int column, int type, ClassLoader classLoader, boolean loadLOBs) throws SQLException
  10:     {
  11:         ...
  12:                 {
  13:                     return resultSet.getDate(column);

View Full Code Here

getDate

public Date getDate(int columnIndex,
                    Calendar cal)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
cal - the java.util.Calendar object to use in constructing the date
Returns:
the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getDate(int columnIndex,Calendar cal)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public static Object getValue(final ResultSet rs, final int index, final int sqlType)
   7:     throws SQLException {
   8:         ...
   9:         case Types.DATE:
  10:             return rs.getDate(index, getCalendar());
  11:         case Types.TIMESTAMP:

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Date getDate(int a, Calendar b) throws SQLException
  13:     { return inner.getDate(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Date getDate(int a, Calendar b) throws SQLException
  13:     { return inner.getDate(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Date getDate(int columnIndex, Calendar cal) throws SQLException {
  13:         return rs.getDate(columnIndex, cal);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getDate(a, b);

View Full Code Here

getDate

public Date getDate(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getDate(String columnName)
   1: import java.sql.DriverManager;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5:                     
   6:                     ResultSetMetaData metaData = resultSet.getMetaData();
   7:                     ExecutionPlanElement executionPlan = ((ResultSetMetaDataImpl) metaData).getExecutionPlan();
   8:         ...
   9:                     
  10:                     while (resultSet.next()) {
  11:                     }

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: {
   6:   public InstanceEvent(ResultSet rs, Event master)
   7:       throws SQLException, CaldataException
   8:         ...
   9:           Fields.getEventLongdesc(rs),
  10:           rs.getDate(Fields.MDSTARTDATE.getName()), 
  11:           rs.getTime(Fields.MDSTARTTIME.getName()), 
  12:         ...
  13:           rs.getDate(Fields.MDENDDATE.getName()), 

View Full Code Here
   1:     public AttributeType getType() { return AttributeType.INTEGER; }
   2:     public Object getValue(ResultSet rs, int columnIndex)
   3:         throws SQLException
   4:         ...
   5:     public AttributeType getType() { return AttributeType.DOUBLE; }
   6:     public Object getValue(ResultSet rs, int columnIndex)
   7:         throws SQLException
   8:         ...
   9:     public AttributeType getType() { return AttributeType.STRING; }
  10:     public Object getValue(ResultSet rs, int columnIndex)
  11:         throws SQLException
  12:         ...
  13:     {
  14:       return rs.getDate(columnIndex);

View Full Code Here
   1: import java.sql.SQLException;
   2: import java.sql.ResultSet;
   3: import java.sql.Types;
   4:         ...
   5:                 new AbstractLobStreamingResultSetExtractor() {
   6:                     public void streamData(ResultSet rs) throws SQLException, IOException {
   7:                         FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), os);
   8:         ...
   9: 
  10:       public Object mapRow(ResultSet rs, int rowNumber) throws SQLException {
  11:         Poster p = new Poster(
  12:         ...
  13:             rs.getInt(1),
  14:             rs.getDate(2),

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:         ...
   5:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   6:                 return "hold cursors over commit";
   7:         ...
   8: 
   9:     public static Object getObject(ResultSet resultSet, int column, int type, ClassLoader classLoader, boolean loadLOBs) throws SQLException
  10:     {
  11:         ...
  12:                 {
  13:                     return resultSet.getDate(column);

View Full Code Here

getDate

public Date getDate(String columnName,
                    Calendar cal)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.
Parameters:
columnName - the SQL name of the column from which to retrieve the value
cal - the java.util.Calendar object to use in constructing the date
Returns:
the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getDate(String columnName,Calendar cal)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public static Object getValue(final ResultSet rs, final int index, final int sqlType)
   7:     throws SQLException {
   8:         ...
   9:         case Types.DATE:
  10:             return rs.getDate(index, getCalendar());
  11:         case Types.TIMESTAMP:

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Date getDate(int a, Calendar b) throws SQLException
  13:     { return inner.getDate(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Date getDate(int a, Calendar b) throws SQLException
  13:     { return inner.getDate(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Date getDate(int columnIndex, Calendar cal) throws SQLException {
  13:         return rs.getDate(columnIndex, cal);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getDate(a, b);

View Full Code Here

getDouble

public double getDouble(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getDouble(int columnIndex)
   1:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee where EMP_NO = " + number);
   2:       ResultSet rs = stmt.executeQuery(cmd);
   3:       rs.next();
   4:         ...
   5:         JobDataSource.find(rs.getString("JOB_CODE")),
   6:         rs.getDouble("SALARY"),
   7:         rs.getString("FULL_NAME")
   8:         ...
   9:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee");
  10:       ResultSet rs = stmt.executeQuery(cmd);
  11: 
  12:         ...
  13:           JobDataSource.find(rs.getString("JOB_CODE")),
  14:           rs.getDouble("SALARY"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:             stm = conn.prepareStatement(queryStr);
   6:             ResultSet rs = stm.executeQuery();
   7: 
   8:         ...
   9:             stm.setLong(1, stdBreakfastID);
  10:             ResultSet rs = stm.executeQuery();
  11: 
  12:         ...
  13:             String locale = rs.getString("locale");
  14:             double price = rs.getDouble("price");

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     String orgId = null;
   6:     ResultSet rs = statement.executeQuery(query);
   7:     TimeSpanSet opTempoSchedule = new TimeSpanSet();
   8:         ...
   9:       if (logger.isDebugEnabled()) {
  10:       logger.debug("Querying for OrgActivities for " + myOrgCode + ", got result: OrgID=" + getString(rs, ORG_ID) + ": " + getString(rs, ATTRIBUTE_NAME) + ", " + getString(rs, ATTRIBUTE_VALUE) + ", Start: " + rs.getDouble(START_HOUR) + ", End: " + rs.getDouble(END_HOUR) + ", UIC: " + getString(rs, ORG_CODE_COLUMN));
  11:       }
  12:         ...
  13:                            plugin.getCDay().getTime(), 
  14:                            rs.getDouble(START_HOUR),

View Full Code Here
   1:             stmt.clearParameters();
   2:             ResultSet rs = stmt.executeQuery();
   3:             if (rs.next()) {
   4:         ...
   5:             stmt.setInt(1, Integer.parseInt(codigo));
   6:             ResultSet rs = stmt.executeQuery();
   7:             if (rs.next()) {
   8:         ...
   9:                                           rs.getString(2),
  10:                                           rs.getDouble(3),
  11:                                           rs.getInt(4));
  12:         ...
  13:             stmt.setInt(1, Integer.parseInt(codigo));
  14:             ResultSet rs = stmt.executeQuery();

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getDouble(key.toString());

View Full Code Here

getDouble

public double getDouble(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getDouble(String columnName)
   1:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee where EMP_NO = " + number);
   2:       ResultSet rs = stmt.executeQuery(cmd);
   3:       rs.next();
   4:         ...
   5:         JobDataSource.find(rs.getString("JOB_CODE")),
   6:         rs.getDouble("SALARY"),
   7:         rs.getString("FULL_NAME")
   8:         ...
   9:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee");
  10:       ResultSet rs = stmt.executeQuery(cmd);
  11: 
  12:         ...
  13:           JobDataSource.find(rs.getString("JOB_CODE")),
  14:           rs.getDouble("SALARY"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:             stm = conn.prepareStatement(queryStr);
   6:             ResultSet rs = stm.executeQuery();
   7: 
   8:         ...
   9:             stm.setLong(1, stdBreakfastID);
  10:             ResultSet rs = stm.executeQuery();
  11: 
  12:         ...
  13:             String locale = rs.getString("locale");
  14:             double price = rs.getDouble("price");

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     String orgId = null;
   6:     ResultSet rs = statement.executeQuery(query);
   7:     TimeSpanSet opTempoSchedule = new TimeSpanSet();
   8:         ...
   9:       if (logger.isDebugEnabled()) {
  10:       logger.debug("Querying for OrgActivities for " + myOrgCode + ", got result: OrgID=" + getString(rs, ORG_ID) + ": " + getString(rs, ATTRIBUTE_NAME) + ", " + getString(rs, ATTRIBUTE_VALUE) + ", Start: " + rs.getDouble(START_HOUR) + ", End: " + rs.getDouble(END_HOUR) + ", UIC: " + getString(rs, ORG_CODE_COLUMN));
  11:       }
  12:         ...
  13:                            plugin.getCDay().getTime(), 
  14:                            rs.getDouble(START_HOUR),

View Full Code Here
   1:             stmt.clearParameters();
   2:             ResultSet rs = stmt.executeQuery();
   3:             if (rs.next()) {
   4:         ...
   5:             stmt.setInt(1, Integer.parseInt(codigo));
   6:             ResultSet rs = stmt.executeQuery();
   7:             if (rs.next()) {
   8:         ...
   9:                                           rs.getString(2),
  10:                                           rs.getDouble(3),
  11:                                           rs.getInt(4));
  12:         ...
  13:             stmt.setInt(1, Integer.parseInt(codigo));
  14:             ResultSet rs = stmt.executeQuery();

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getDouble(key.toString());

View Full Code Here

getFetchDirection

public int getFetchDirection()
            throws SQLException
Retrieves the fetch direction for this ResultSet object.
Returns:
the current fetch direction for this ResultSet object
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getFetchDirection()
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public int getFetchDirection() throws SQLException
  13:     { return inner.getFetchDirection(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized int getFetchDirection() throws SQLException
  13:     { return inner.getFetchDirection(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public int getFetchDirection() throws SQLException {
  13:         return rs.getFetchDirection();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getFetchDirection();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getFetchDirection();

View Full Code Here

getFetchSize

public int getFetchSize()
            throws SQLException
Retrieves the fetch size for this ResultSet object.
Returns:
the current fetch size for this ResultSet object
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getFetchSize()
   1: import java.io.IOException;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:   {
   6:     ResultSet rset = null;
   7:     PreparedStatement pstmt = null;
   8:         ...
   9:       pstmt = conn.prepareStatement( stmtString,
  10:         ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
  11:       System.out.print( "For statement: " + stmtString + ", " );
  12:         ...
  13:       rset.setFetchSize(5);
  14:       System.out.println( "New fetch size: " + rset.getFetchSize() );

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.SQLException;
   3:         ...
   4:     PreparedStatement pstmt = null;
   5:     ResultSet rset = null;
   6:  
   7:         ...
   8:       pstmt = conn.prepareStatement( stmtString );
   9:       System.out.println( "\tDefault statement fetch size: " + pstmt.getFetchSize());
  10:       pstmt.setFetchSize( stmtLevelFetchSize );
  11:         ...
  12:       System.out.println( "\tnew statement fetch size: " + pstmt.getFetchSize());

View Full Code Here
   1: import java.sql.Connection;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     Statement st = null;
   6:     ResultSet rs = null;
   7:     try {
   8:         ...
   9:       rs = st.executeQuery(datasetQuery);
  10:       int size = rs.getFetchSize();
  11:       if (size>0) {

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public int getFetchSize() throws SQLException
  13:     { return inner.getFetchSize(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized int getFetchSize() throws SQLException
  13:     { return inner.getFetchSize(); }

View Full Code Here

getFloat

public float getFloat(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getFloat(int columnIndex)
   1:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
   2:       ResultSet rs = prepStmt.executeQuery();
   3: 
   4:         ...
   5:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3), 
   6:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));
   7:         if (rs.getInt(9) > 0)
   8:         ...
   9:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
  10:       ResultSet rs = prepStmt.executeQuery();
  11: 
  12:         ...
  13:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3),
  14:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));

View Full Code Here
   1:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
   2:       ResultSet rs = prepStmt.executeQuery();
   3: 
   4:         ...
   5:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3), 
   6:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));
   7:         if (rs.getInt(9) > 0)
   8:         ...
   9:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
  10:       ResultSet rs = prepStmt.executeQuery();
  11: 
  12:         ...
  13:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3), 
  14:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getFloat(key.toString());

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public float getFloat(String a) throws SQLException
  13:     { return inner.getFloat(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized float getFloat(String a) throws SQLException
  13:     { return inner.getFloat(a); }

View Full Code Here

getFloat

public float getFloat(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getFloat(String columnName)
   1:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
   2:       ResultSet rs = prepStmt.executeQuery();
   3: 
   4:         ...
   5:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3), 
   6:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));
   7:         if (rs.getInt(9) > 0)
   8:         ...
   9:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
  10:       ResultSet rs = prepStmt.executeQuery();
  11: 
  12:         ...
  13:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3),
  14:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));

View Full Code Here
   1:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
   2:       ResultSet rs = prepStmt.executeQuery();
   3: 
   4:         ...
   5:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3), 
   6:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));
   7:         if (rs.getInt(9) > 0)
   8:         ...
   9:       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
  10:       ResultSet rs = prepStmt.executeQuery();
  11: 
  12:         ...
  13:         BookDetails bd = new BookDetails(rs.getString(1), rs.getString(2), rs.getString(3), 
  14:           rs.getString(4), rs.getFloat(5), rs.getBoolean(6), rs.getInt(7), rs.getString(8), rs.getInt(9));

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getFloat(key.toString());

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public float getFloat(String a) throws SQLException
  13:     { return inner.getFloat(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized float getFloat(String a) throws SQLException
  13:     { return inner.getFloat(a); }

View Full Code Here

getInt

public int getInt(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getInt(int columnIndex)
   1: import java.sql.Connection;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         Statement stmt = conn.createStatement();
   6:         ResultSet rs = stmt.executeQuery(queryStr);
   7:         rs.next();
   8:         ...
   9:         return rs.getInt("ChemicalID");
  10:     }

View Full Code Here
   1:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee where EMP_NO = " + number);
   2:       ResultSet rs = stmt.executeQuery(cmd);
   3:       rs.next();
   4:         ...
   5:       employee = new EmployeeImpl(
   6:         rs.getInt("EMP_NO"),
   7:         rs.getString("FIRST_NAME"),
   8:         ...
   9:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee");
  10:       ResultSet rs = stmt.executeQuery(cmd);
  11: 
  12:         ...
  13:         employees.add(new EmployeeImpl(
  14:           rs.getInt("EMP_NO"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     dbc,
  10:                     res.getInt("PUBLISH_TAG"));
  11:                 projects.add(new CmsBackupProject(
  12:         ...
  13:                     res.getInt("PUBLISH_TAG"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     dbc,
  10:                     res.getInt("PUBLISH_TAG"));
  11:                 projects.add(new CmsBackupProject(
  12:         ...
  13:                     res.getInt("PUBLISH_TAG"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     dbc,
  10:                     res.getInt("PUBLISH_TAG"));
  11:                 projects.add(new CmsBackupProject(
  12:         ...
  13:                     res.getInt("PUBLISH_TAG"),

View Full Code Here

getInt

public int getInt(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getInt(String columnName)
   1: import java.sql.Connection;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         Statement stmt = conn.createStatement();
   6:         ResultSet rs = stmt.executeQuery(queryStr);
   7:         rs.next();
   8:         ...
   9:         return rs.getInt("ChemicalID");
  10:     }

View Full Code Here
   1:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee where EMP_NO = " + number);
   2:       ResultSet rs = stmt.executeQuery(cmd);
   3:       rs.next();
   4:         ...
   5:       employee = new EmployeeImpl(
   6:         rs.getInt("EMP_NO"),
   7:         rs.getString("FIRST_NAME"),
   8:         ...
   9:       String cmd = ("select EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, SALARY, FULL_NAME  from employee");
  10:       ResultSet rs = stmt.executeQuery(cmd);
  11: 
  12:         ...
  13:         employees.add(new EmployeeImpl(
  14:           rs.getInt("EMP_NO"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     dbc,
  10:                     res.getInt("PUBLISH_TAG"));
  11:                 projects.add(new CmsBackupProject(
  12:         ...
  13:                     res.getInt("PUBLISH_TAG"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     dbc,
  10:                     res.getInt("PUBLISH_TAG"));
  11:                 projects.add(new CmsBackupProject(
  12:         ...
  13:                     res.getInt("PUBLISH_TAG"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     dbc,
  10:                     res.getInt("PUBLISH_TAG"));
  11:                 projects.add(new CmsBackupProject(
  12:         ...
  13:                     res.getInt("PUBLISH_TAG"),

View Full Code Here

getLong

public long getLong(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getLong(int columnIndex)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:             public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
   7:         ...
   8:                 return rs.getLong("ext_id");
   9:             }
  10:         ...
  11:         ParameterizedRowMapper<Entity> entityMapper = new ParameterizedRowMapper<Entity>() {
  12:             public Entity mapRow(ResultSet rs, int rowNum) throws SQLException {

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     new CmsUUID(res.getString("MANAGERGROUP_ID")),
  10:                     res.getLong("DATE_CREATED"),
  11:                     res.getInt("PROJECT_TYPE"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     new CmsUUID(res.getString("MANAGERGROUP_ID")),
  10:                     res.getLong("DATE_CREATED"),
  11:                     res.getInt("PROJECT_TYPE"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     new CmsUUID(res.getString("MANAGERGROUP_ID")),
  10:                     res.getLong("DATE_CREATED"),
  11:                     res.getInt("PROJECT_TYPE"),

View Full Code Here
   1:      Statement stmt;
   2:      ResultSet rs;
   3:      System.out.println(sql);
   4:         ...
   5:      Statement stmt;
   6:      ResultSet rs;
   7:      long id_wf=-1;
   8:         ...
   9:                 {
  10:                     id_wf =    rs.getLong("IdActivity_wf");
  11:                     if (id_wf!=-1)                    
  12:         ...
  13:      Statement stmt;
  14:      ResultSet rs;

View Full Code Here

getLong

public long getLong(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getLong(String columnName)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:             public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
   7:         ...
   8:                 return rs.getLong("ext_id");
   9:             }
  10:         ...
  11:         ParameterizedRowMapper<Entity> entityMapper = new ParameterizedRowMapper<Entity>() {
  12:             public Entity mapRow(ResultSet rs, int rowNum) throws SQLException {

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     new CmsUUID(res.getString("MANAGERGROUP_ID")),
  10:                     res.getLong("DATE_CREATED"),
  11:                     res.getInt("PROJECT_TYPE"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     new CmsUUID(res.getString("MANAGERGROUP_ID")),
  10:                     res.getLong("DATE_CREATED"),
  11:                     res.getInt("PROJECT_TYPE"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         List projects = new ArrayList();
   6:         ResultSet res = null;
   7:         PreparedStatement stmt = null;
   8:         ...
   9:                     new CmsUUID(res.getString("MANAGERGROUP_ID")),
  10:                     res.getLong("DATE_CREATED"),
  11:                     res.getInt("PROJECT_TYPE"),

View Full Code Here
   1:      Statement stmt;
   2:      ResultSet rs;
   3:      System.out.println(sql);
   4:         ...
   5:      Statement stmt;
   6:      ResultSet rs;
   7:      long id_wf=-1;
   8:         ...
   9:                 {
  10:                     id_wf =    rs.getLong("IdActivity_wf");
  11:                     if (id_wf!=-1)                    
  12:         ...
  13:      Statement stmt;
  14:      ResultSet rs;

View Full Code Here

getMetaData

public ResultSetMetaData getMetaData()
            throws SQLException
Retrieves the number, types and properties of this ResultSet object's columns.
Returns:
the description of this ResultSet object's columns
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getMetaData()
   1: 
   2:   public SimpleResultSetTable(ResultSet rs) throws SQLException {
   3:     setBorder(1);
   4:         ...
   5: 
   6:     ResultSetMetaData rsmd = rs.getMetaData();
   7:     int colCount = rsmd.getColumnCount();
   8: 
   9:     TR row = new TR();

View Full Code Here
   1:     Connection con = DriverManager.getConnection( URL, USER, PASS );
   2:     ResultSet rs = con.createStatement().executeQuery( "SELECT * FROM GEODB_LOCATIONS" );
   3:         ...
   4:     ResultSetMetaData meta = rs.getMetaData();
   5: 
   6:     int numerics = 0;

View Full Code Here
   1: public class XMLForResultSet {
   2:   public static void print(ResultSet rs, String resultElt, String rowElt,
   3:                            PrintWriter out) throws SQLException {
   4:         ...
   5:     ResultSetMetaData rsMeta = rs.getMetaData();
   6:     int colCount = rsMeta.getColumnCount();
   7:     out.println("<?xml version=\"1.0\"?>");
   8:     out.println("<"+resultElt+">");

View Full Code Here
   1:     Statement s = c.createStatement();
   2:     ResultSet rs = s.executeQuery("SELECT * FROM Kurse");
   3: 
   4:         ...
   5:     ResultSetMetaData rsmd = rs.getMetaData();
   6:     int x = rsmd.getColumnCount();
   7:     StringBuffer aus = new StringBuffer("\n");
   8:       aus.append(rsmd.getColumnName(i));

View Full Code Here
   1: 
   2:   private ResultSet rs;
   3: 
   4:         ...
   5:   public HtmlResultSet(ResultSet rs) {
   6:     this.rs = rs;
   7:         ...
   8:     try {
   9:       ResultSetMetaData rsmd = rs.getMetaData();

View Full Code Here

getObject

public Object getObject(int columnIndex)
            throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

This method may also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
a java.lang.Object holding the column value
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getObject(int columnIndex)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public Object row(ResultSet results, int rowNumber) throws SQLException {
   7:         ...
   8:         return results.getObject(1);
   9:     }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:             ResultSet rs = selectStmt.executeQuery();
   7:             if (!rs.next()) {
   8:         ...
   9:             }
  10:             return rs.getObject(1);
  11:         }

View Full Code Here
   1:                 new JdbcRowMapper() {
   2:                     public Object makeDomainObject(ResultSet row)
   3:                             throws SQLException {
   4:         ...
   5:         JdbcRowMapper simpleMapper = new JdbcRowMapper() {
   6:             public Object makeDomainObject(ResultSet row) throws SQLException {
   7:         ...
   8:                 return row.getObject("a");
   9:             }
  10:         ...
  11:         JdbcRowMapper simpleMapper = new JdbcRowMapper() {
  12:             public Object makeDomainObject(ResultSet row) throws SQLException {

View Full Code Here
   1: 
   2:     public static List resultSetAsTable(ResultSet resultSet)
   3:             throws SQLException {
   4:         ...
   5: 
   6:         ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
   7:         int columnCount = resultSetMetaData.getColumnCount();
   8:         ...
   9:             for (int i = 1; i <= columnCount; i++) {
  10:                 Object columnData = resultSet.getObject(i);
  11:                 rowData.add(columnData);
  12:         ...
  13:                 try {
  14:                     resultSet.getObject((String) key);

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:         ...
   5:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   6:                 return "hold cursors over commit";
   7:         ...
   8: 
   9:     public static Object getObject(ResultSet resultSet, int column, int type, ClassLoader classLoader, boolean loadLOBs) throws SQLException
  10:     {
  11:         ...
  12:         }
  13:         return resultSet.getObject(column);

View Full Code Here

getObject

public Object getObject(int i,
                        java.util.Map> map)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the given Map object for the custom mapping of the SQL structured or distinct type that is being retrieved.
Parameters:
i - the first column is 1, the second is 2, ...
map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
Returns:
an Object in the Java programming language representing the SQL value
Throws:
SQLException - if a database access error occurs
Since:
1.2

getObject

public Object getObject(String columnName)
            throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

This method may also be used to read database-specific abstract data types.

In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Parameters:
columnName - the SQL name of the column
Returns:
a java.lang.Object holding the column value
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getObject(String columnName)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public Object row(ResultSet results, int rowNumber) throws SQLException {
   7:         ...
   8:         return results.getObject(1);
   9:     }

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:             ResultSet rs = selectStmt.executeQuery();
   7:             if (!rs.next()) {
   8:         ...
   9:             }
  10:             return rs.getObject(1);
  11:         }

View Full Code Here
   1:                 new JdbcRowMapper() {
   2:                     public Object makeDomainObject(ResultSet row)
   3:                             throws SQLException {
   4:         ...
   5:         JdbcRowMapper simpleMapper = new JdbcRowMapper() {
   6:             public Object makeDomainObject(ResultSet row) throws SQLException {
   7:         ...
   8:                 return row.getObject("a");
   9:             }
  10:         ...
  11:         JdbcRowMapper simpleMapper = new JdbcRowMapper() {
  12:             public Object makeDomainObject(ResultSet row) throws SQLException {

View Full Code Here
   1: 
   2:     public static List resultSetAsTable(ResultSet resultSet)
   3:             throws SQLException {
   4:         ...
   5: 
   6:         ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
   7:         int columnCount = resultSetMetaData.getColumnCount();
   8:         ...
   9:             for (int i = 1; i <= columnCount; i++) {
  10:                 Object columnData = resultSet.getObject(i);
  11:                 rowData.add(columnData);
  12:         ...
  13:                 try {
  14:                     resultSet.getObject((String) key);

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:         ...
   5:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   6:                 return "hold cursors over commit";
   7:         ...
   8: 
   9:     public static Object getObject(ResultSet resultSet, int column, int type, ClassLoader classLoader, boolean loadLOBs) throws SQLException
  10:     {
  11:         ...
  12:         }
  13:         return resultSet.getObject(column);

View Full Code Here

getObject

public Object getObject(String colName,
                        java.util.Map> map)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the specified Map object for custom mapping if appropriate.
Parameters:
colName - the name of the column from which to retrieve the value
map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
Returns:
an Object representing the SQL value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2

getRef

public Ref getRef(int i)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
a Ref object representing an SQL REF value
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getRef(int i)
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import oracle.sql.STRUCT;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     try
   8:         ...
   9:       {
  10:         managerRef = rset.getRef( 1 );
  11:       }
  12:         ...
  13:     PreparedStatement pstmt = null;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Ref getRef(String a) throws SQLException
  13:     { return inner.getRef(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Ref getRef(String a) throws SQLException
  13:     { return inner.getRef(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Ref getRef(String columnName) throws SQLException {
  13:         return rs.getRef( findColumn(columnName) );

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getRef(a);

View Full Code Here

getRef

public Ref getRef(String colName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a Ref object in the Java programming language.
Parameters:
colName - the column name
Returns:
a Ref object representing the SQL REF value in the specified column
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getRef(String colName)
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import oracle.sql.STRUCT;
   4:         ...
   5:     PreparedStatement pstmt = null;
   6:     ResultSet rset = null;
   7:     try
   8:         ...
   9:       {
  10:         managerRef = rset.getRef( 1 );
  11:       }
  12:         ...
  13:     PreparedStatement pstmt = null;
  14:     ResultSet rset = null;

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Ref getRef(String a) throws SQLException
  13:     { return inner.getRef(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Ref getRef(String a) throws SQLException
  13:     { return inner.getRef(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Ref getRef(String columnName) throws SQLException {
  13:         return rs.getRef( findColumn(columnName) );

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getRef(a);

View Full Code Here

getRow

public int getRow()
            throws SQLException
Retrieves the current row number. The first row is number 1, the second number 2, and so on.
Returns:
the current row number; 0 if there is no current row
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getRow()
   1: import java.io.IOException;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:   {
   6:     ResultSet rset = null;
   7:     PreparedStatement pstmt = null;
   8:         ...
   9:       pstmt = conn.prepareStatement( stmtString,
  10:         ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
  11:       System.out.print( "For statement: " + stmtString + ", " );
  12:         ...
  13:       System.out.println( "New fetch size: " + rset.getFetchSize() );
  14:       System.out.println( "Row number " + rset.getRow() + " has a value = " + rset.getInt( 1 ) );

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public static String[] getColumnNames(final ResultSet rs) throws SQLException {
   7:         final ResultSetMetaData md = rs.getMetaData();
   8:         ...
   9: 
  10:     public static String[] getColumnLabels(final ResultSet rs) throws SQLException {
  11:         final ResultSetMetaData md = rs.getMetaData();
  12:         ...
  13:     public static int getRowCount(final ResultSet rs) throws SQLException {
  14:         return rs.last() ? rs.getRow() : 0;

View Full Code Here
   1:       Connection con = DriverManager.getConnection(Course.dbName, Course.mySQLUser, Course.mySQLPass);
   2:       Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
   3:       String sql = "SELECT Name FROM " + PDTable + " ORDER BY Name";
   4:         ...
   5:       log.paranoid("Executing: " + sql,"PermissionData:loadPermission");
   6:       ResultSet rs = stmt.executeQuery(sql);
   7:       if (!rs.next()) {
   8:         ...
   9:       rs.last();
  10:       int numRows = rs.getRow();
  11:       log.paranoid("numRows: " + numRows,"Permissions:loadPermissions");
  12:         ...
  13:         Connection con = DriverManager.getConnection(Course.dbName, Course.mySQLUser, Course.mySQLPass);
  14:         Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

View Full Code Here
   1:       Connection con = DriverManager.getConnection(Course.dbName, Course.mySQLUser, Course.mySQLPass);
   2:       Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
   3:       String sql = "SELECT * FROM " + PDTable + " WHERE Name='" + pName + "'";
   4:         ...
   5:       log.paranoid("Executing: " + sql,"PermissionData:loadPermission");
   6:       ResultSet rs = stmt.executeQuery(sql);
   7:       if (!rs.next()) {
   8:         ...
   9:           rs.last();
  10:           int num=rs.getRow();
  11:           if (num != numArgs) {
  12:         ...
  13:       Connection con = DriverManager.getConnection(Course.dbName, Course.mySQLUser, Course.mySQLPass);
  14:       Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

View Full Code Here
   1: 
   2:    public ResultSetTableModel(ResultSet resultSet)
   3:    {
   4:         ...
   5:       super();
   6:       this.resultSet = resultSet;
   7:       try
   8:         ...
   9:             resultSet.last();
  10:             numOfElements = resultSet.getRow();
  11:          }

View Full Code Here

getShort

public short getShort(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getShort(int columnIndex)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getShort(key.toString());

View Full Code Here
   1: import java.sql.DatabaseMetaData;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public static Metadata retriveResultSetMetadata (ResultSet res) throws SQLException {
   7:         return new Metadata(res);
   8:         ...
   9: 
  10:     protected Metadata (ResultSet res) throws SQLException {
  11:         setResultSetMetadata(res);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public short getShort(String a) throws SQLException
  13:     { return inner.getShort(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized short getShort(String a) throws SQLException
  13:     { return inner.getShort(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public short getShort(String columnName) throws SQLException {
  13:         return rs.getShort( findColumn(columnName) );

View Full Code Here

getShort

public short getShort(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getShort(String columnName)
   1: import java.math.BigDecimal;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: public class ResultSetEcmaWrap {
   6:   private static final Logger log = Log.open(ResultSet.class);
   7: 
   8:         ...
   9:   public static String getString(ResultSet rs, ESBase col)
  10:     throws Throwable
  11:         ...
  12:     if (key.isString())
  13:       return rs.getShort(key.toString());

View Full Code Here
   1: import java.sql.DatabaseMetaData;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     public static Metadata retriveResultSetMetadata (ResultSet res) throws SQLException {
   7:         return new Metadata(res);
   8:         ...
   9: 
  10:     protected Metadata (ResultSet res) throws SQLException {
  11:         setResultSetMetadata(res);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public short getShort(String a) throws SQLException
  13:     { return inner.getShort(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized short getShort(String a) throws SQLException
  13:     { return inner.getShort(a); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public short getShort(String columnName) throws SQLException {
  13:         return rs.getShort( findColumn(columnName) );

View Full Code Here

getStatement

public Statement getStatement()
            throws SQLException
Retrieves the Statement object that produced this ResultSet object. If the result set was generated some other way, such as by a DatabaseMetaData method, this method returns null.
Returns:
the Statment object that produced this ResultSet object or null if the result set was produced some other way
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getStatement()
   1: import java.sql.DriverManager;
   2: import java.sql.ResultSet;
   3: import java.sql.Statement;
   4:         ...
   5:         Statement st = conn.createStatement();
   6:         ResultSet rs = null;
   7:         try {
   8:         ...
   9: 
  10:     public ResultSet executeQuery(Connection conn, String sql) throws Exception {
  11:         Statement st = conn.createStatement();
  12:         ...
  13:             if (rs != null) {
  14:                 Statement st = rs.getStatement();

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Statement getStatement() throws SQLException
  13:     { return inner.getStatement(); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     private final ResultSet resultSet;
   7: 
   8:         ...
   9:         try {
  10:             tempStatement = resultSet.getStatement();
  11:         } catch (SQLException e) {

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Statement getStatement() throws SQLException
  13:     { return inner.getStatement(); }

View Full Code Here
   1: import java.sql.Connection;
   2: import java.sql.ResultSet;
   3: import java.sql.Statement;
   4:         ...
   5:     
   6:     ResultSet rs = null;
   7:     try{
   8:         ...
   9:       rs.close();
  10:       rs.getStatement().close();
  11:     } catch (SQLException e){
  12:         ...
  13: 
  14:   public ResultSet getResultSet (Connection connection, String sqlQuery) {

View Full Code Here

getString

public String getString(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getString(int columnIndex)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   protected Object mapRow(ResultSet rs, int rownum) throws SQLException {
   7:         ...
   8:    return rs.getString("DCTL_NAME");
   9:   }

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     protected Object mapRow(
   6:       ResultSet rs,
   7:       int rownum) throws SQLException {
   8:         ...
   9:       return rs.getString("ASL_NAME");
  10:     }

View Full Code Here
   1:                 pstmt.setInt(2, M_PriceList_ID);
   2:             ResultSet rs = pstmt.executeQuery();
   3:             if (rs.next())
   4:         ...
   5:                 m_PriceList_ID = rs.getInt(1);
   6:                 m_name = rs.getString(2);
   7:         ...
   8:                 m_description = rs.getString(3);
   9:         ...
  10:                 m_taxIncluded = "Y".equals(rs.getString(4));

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:                 pstmt.setLong(1, fieldId);
   6:                 ResultSet rs = pstmt.executeQuery();
   7:                 if (!rs.next())
   8:         ...
   9:             pstmt.setBoolean(7, field.isRequired());
  10:             pstmt.setString(8, StringUtils.getString(field.getOptionNames(), ","));
  11:             pstmt.setLong(9, field.getProject().getId());
  12:         ...
  13:             pstmt.setLong(1, project.getId());
  14:             ResultSet rs = pstmt.executeQuery();

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         try {
   6:             ResultSet rs = ps.executeQuery();
   7:             try {
   8:         ...
   9:                     TemplateRequest request = new TemplateRequest(rs.getInt(1),
  10:                             rs.getInt(2), rs.getString(3));
  11:                     String path = Configuration.CONFIG_DIR + "xslt/"
  12:         ...
  13:                             + rs.getString(4) + "/" + rs.getString(5);

View Full Code Here

getString

public String getString(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getString(String columnName)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   protected Object mapRow(ResultSet rs, int rownum) throws SQLException {
   7:         ...
   8:    return rs.getString("DCTL_NAME");
   9:   }

View Full Code Here
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:     protected Object mapRow(
   6:       ResultSet rs,
   7:       int rownum) throws SQLException {
   8:         ...
   9:       return rs.getString("ASL_NAME");
  10:     }

View Full Code Here
   1:                 pstmt.setInt(2, M_PriceList_ID);
   2:             ResultSet rs = pstmt.executeQuery();
   3:             if (rs.next())
   4:         ...
   5:                 m_PriceList_ID = rs.getInt(1);
   6:                 m_name = rs.getString(2);
   7:         ...
   8:                 m_description = rs.getString(3);
   9:         ...
  10:                 m_taxIncluded = "Y".equals(rs.getString(4));

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:                 pstmt.setLong(1, fieldId);
   6:                 ResultSet rs = pstmt.executeQuery();
   7:                 if (!rs.next())
   8:         ...
   9:             pstmt.setBoolean(7, field.isRequired());
  10:             pstmt.setString(8, StringUtils.getString(field.getOptionNames(), ","));
  11:             pstmt.setLong(9, field.getProject().getId());
  12:         ...
  13:             pstmt.setLong(1, project.getId());
  14:             ResultSet rs = pstmt.executeQuery();

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:         try {
   6:             ResultSet rs = ps.executeQuery();
   7:             try {
   8:         ...
   9:                     TemplateRequest request = new TemplateRequest(rs.getInt(1),
  10:                             rs.getInt(2), rs.getString(3));
  11:                     String path = Configuration.CONFIG_DIR + "xslt/"
  12:         ...
  13:                             + rs.getString(4) + "/" + rs.getString(5);

View Full Code Here

getTime

public Time getTime(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getTime(int columnIndex)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: {
   6:   public InstanceEvent(ResultSet rs, Event master)
   7:       throws SQLException, CaldataException
   8:         ...
   9:           rs.getDate(Fields.MDSTARTDATE.getName()), 
  10:           rs.getTime(Fields.MDSTARTTIME.getName()), 
  11:           rs.getDate(Fields.MDENDDATE.getName()), 
  12:         ...
  13:           rs.getTime(Fields.MDENDTIME.getName()), 

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:         ...
   5:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   6:                 return "hold cursors over commit";
   7:         ...
   8: 
   9:     public static Object getObject(ResultSet resultSet, int column, int type, ClassLoader classLoader, boolean loadLOBs) throws SQLException
  10:     {
  11:         ...
  12:             case Types.TIME:
  13:                 return resultSet.getTime(column);

View Full Code Here
   1: import java.sql.Date;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     protected void introspect(ResultSet resultSet) throws SQLException {
   7: 
   8:         ...
   9:         if (type.equals(Time.class)) {
  10:             return resultSet.getTime(columnName);
  11:         }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Time getTime(String columnName) throws SQLException {
  13:         return rs.getTime( findColumn(columnName) );

View Full Code Here
   1: import java.sql.Date;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   public Event(ResultSet rs) throws SQLException, CaldataException
   7:   {
   8:         ...
   9:          rs.getDate(Fields.ESTARTDATE.getName()), 
  10:          rs.getTime(Fields.ESTARTTIME.getName()), 
  11:          rs.getDate(Fields.EENDDATE.getName()), 
  12:         ...
  13:          rs.getTime(Fields.EENDTIME.getName()), 

View Full Code Here

getTime

public Time getTime(int columnIndex,
                    Calendar cal)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
cal - the java.util.Calendar object to use in constructing the time
Returns:
the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getTime(int columnIndex,Calendar cal)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public static Object getValue(final ResultSet rs, final int index, final int sqlType)
   7:     throws SQLException {
   8:         ...
   9:         case Types.TIME:
  10:             return rs.getTime(index, getCalendar());
  11:         case Types.DATE:

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Time getTime(int a, Calendar b) throws SQLException
  13:     { return inner.getTime(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Time getTime(int a, Calendar b) throws SQLException
  13:     { return inner.getTime(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Time getTime(int columnIndex, Calendar cal) throws SQLException {
  13:         return rs.getTime(columnIndex, cal);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getTime(a, b);

View Full Code Here

getTime

public Time getTime(String columnName)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
Parameters:
columnName - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getTime(String columnName)
   1: 
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: {
   6:   public InstanceEvent(ResultSet rs, Event master)
   7:       throws SQLException, CaldataException
   8:         ...
   9:           rs.getDate(Fields.MDSTARTDATE.getName()), 
  10:           rs.getTime(Fields.MDSTARTTIME.getName()), 
  11:           rs.getDate(Fields.MDENDDATE.getName()), 
  12:         ...
  13:           rs.getTime(Fields.MDENDTIME.getName()), 

View Full Code Here
   1:         {
   2:             case ResultSet.CLOSE_CURSORS_AT_COMMIT:
   3:                 return "close cursors at commit";
   4:         ...
   5:             case ResultSet.HOLD_CURSORS_OVER_COMMIT:
   6:                 return "hold cursors over commit";
   7:         ...
   8: 
   9:     public static Object getObject(ResultSet resultSet, int column, int type, ClassLoader classLoader, boolean loadLOBs) throws SQLException
  10:     {
  11:         ...
  12:             case Types.TIME:
  13:                 return resultSet.getTime(column);

View Full Code Here
   1: import java.sql.Date;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6:     protected void introspect(ResultSet resultSet) throws SQLException {
   7: 
   8:         ...
   9:         if (type.equals(Time.class)) {
  10:             return resultSet.getTime(columnName);
  11:         }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Time getTime(String columnName) throws SQLException {
  13:         return rs.getTime( findColumn(columnName) );

View Full Code Here
   1: import java.sql.Date;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   public Event(ResultSet rs) throws SQLException, CaldataException
   7:   {
   8:         ...
   9:          rs.getDate(Fields.ESTARTDATE.getName()), 
  10:          rs.getTime(Fields.ESTARTTIME.getName()), 
  11:          rs.getDate(Fields.EENDDATE.getName()), 
  12:         ...
  13:          rs.getTime(Fields.EENDTIME.getName()), 

View Full Code Here

getTime

public Time getTime(String columnName,
                    Calendar cal)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.
Parameters:
columnName - the SQL name of the column
cal - the java.util.Calendar object to use in constructing the time
Returns:
the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getTime(String columnName,Calendar cal)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     public static Object getValue(final ResultSet rs, final int index, final int sqlType)
   7:     throws SQLException {
   8:         ...
   9:         case Types.TIME:
  10:             return rs.getTime(index, getCalendar());
  11:         case Types.DATE:

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class FilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public Time getTime(int a, Calendar b) throws SQLException
  13:     { return inner.getTime(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public abstract class SynchronizedFilterResultSet implements ResultSet
   7: {
   8:         ...
   9:     protected ResultSet inner;
  10:     
  11:         ...
  12:     public synchronized Time getTime(int a, Calendar b) throws SQLException
  13:     { return inner.getTime(a, b); }

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: public class ResultSetWrapper implements ResultSet {
   7: 
   8:         ...
   9:     private ResultSet rs;
  10:     private ColumnNameCache columnNameCache;
  11:         ...
  12:     public Time getTime(int columnIndex, Calendar cal) throws SQLException {
  13:         return rs.getTime(columnIndex, cal);

View Full Code Here
   1: import java.sql.Ref;
   2: import java.sql.ResultSet;
   3: import java.sql.ResultSetMetaData;
   4:         ...
   5: 
   6: abstract class C3P0ResultSet implements ResultSet, ClosableResource
   7: {
   8:         ...
   9:     ResultSet inner;
  10: 
  11:         ...
  12:     {
  13:         return inner.getTime(a, b);

View Full Code Here

getTimestamp

public Timestamp getTimestamp(int columnIndex)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getTimestamp(int columnIndex)
   1:             
   2:             ResultSet rs = ps.executeQuery();
   3:             String rVal = null;
   4:         ...
   5:             
   6:             ResultSet rs = ps.executeQuery();
   7:             boolean found = rs.next();
   8:         ...
   9:             ps.setString(2, hashedPassword);
  10:             ResultSet rs = ps.executeQuery();
  11:             if(!rs.next())
  12:         ...
  13:                     rs.getBoolean("admin"),
  14:                     rs.getTimestamp("lastLogin"),

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:    {
   6:       ResultSet rsResults = null;
   7:       int       iGeneratedKey = DataObject.NEW_ID;
   8:         ...
   9:                   data.setId(iGeneratedKey);
  10:                   data.setCreationTimestamp(rsResults.getTimestamp(1));
  11:                   if (data instanceof ModifiableDataObject)
  12:         ...
  13:                      ((ModifiableDataObject)data).setModificationTimestamp(
  14:                                                      rsResults.getTimestamp(2));

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;
   4:         ...
   5:    {
   6:       ResultSet rsResults = null;
   7:       int       iGeneratedKey = DataObject.NEW_ID;
   8:         ...
   9:                   data.setId(iGeneratedKey);
  10:                   data.setCreationTimestamp(rsResults.getTimestamp(1));
  11:                   if (data instanceof ModifiableDataObject)
  12:         ...
  13:                      ((ModifiableDataObject)data).setModificationTimestamp(
  14:                                                      rsResults.getTimestamp(2));

View Full Code Here
   1:             pstmt.setTimestamp(3, m_endDate);
   2:             ResultSet rs = pstmt.executeQuery();
   3:             while (rs.next())
   4:         ...
   5:             {
   6:                 ma = new MAssignmentSlot (TimeUtil.getDay(rs.getTimestamp(2)),
   7:                     Msg.getMsg (m_ctx, "ResourceUnAvailable"), rs.getString(1),
   8:         ...
   9:             pstmt.setTimestamp(2, endDay);
  10:             ResultSet rs = pstmt.executeQuery();
  11:             while (rs.next())
  12:         ...
  13:             {
  14:                 ma = new MAssignmentSlot (TimeUtil.getDay(rs.getTimestamp(2)),

View Full Code Here
   1:             pstmt.setInt(1, m_report.getC_Calendar_ID());
   2:             ResultSet rs = pstmt.executeQuery();
   3:             while (rs.next())
   4:         ...
   5:                 FinReportPeriod frp = new FinReportPeriod (rs.getInt(1), rs.getString(2),
   6:                     rs.getTimestamp(3), rs.getTimestamp(4), rs.getTimestamp(5));
   7:                 list.add(frp);
   8:                 if (p_C_Period_ID == 0 && frp.inPeriod(today))
   9:                     p_C_Period_ID = frp.getC_Period_ID();

View Full Code Here

getTimestamp

public Timestamp getTimestamp(int columnIndex,
                              Calendar cal)
            throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
cal - the java.util.Calendar object to use in constructing the timestamp
Returns:
the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getTimestamp(int columnIndex,Calendar cal)
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLWarning;
   4:         ...
   5:             try {
   6:                 ResultSet rs = stmt.executeQuery("SELECT  cast(\"today\" as date) - 7 FROM rdb$database");
   7:                 assertTrue("Should have at least one row.", rs.next());
   8:         ...
   9:                     s.execute("INSERT INTO LONGTEST (LONGID) VALUES (" + Long.MAX_VALUE + ")");
  10:                     ResultSet rs = s.executeQuery("SELECT LONGID FROM LONGTEST");
  11:                     try 
  12:         ...
  13:                         assertTrue("Should have one row!", rs.next());
  14:                         Timestamp x2 = rs.getTimestamp(1, cal);

View Full Code Here
   1: import java.sql.PreparedStatement;
   2: import java.sql.ResultSet;
   3: import java.sql.SQLException;