public class Record extends SQLUtil.DBHashtable
Title: Record.java
Description: 封装每条记录的详细信息
Copyright: Copyright (c) 2007
| 构造器和说明 |
|---|
Record() |
Record(int i) |
Record(int initialCapacity,
float loadFactor) |
Record(int initialCapacity,
float loadFactor,
java.lang.String[] fields,
java.util.Map sameCols) |
Record(int i,
java.lang.String[] fields,
java.util.Map sameCols) |
Record(java.util.Map t) |
Record(java.util.Map t,
java.lang.String[] fields) |
Record(java.lang.String[] fields,
java.util.Map sameCols) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.sql.Array |
getArray(int i)
Retrieves the value of the designated JDBC
ARRAY parameter as an
Array object in the Java programming language. |
java.sql.Array |
getArray(java.lang.String parameterName)
Retrieves the value of a JDBC
ARRAY parameter as an
Array object in the Java programming language. |
java.io.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. |
java.io.InputStream |
getAsciiStream(java.lang.String colName) |
java.math.BigDecimal |
getBigDecimal(int parameterIndex)
Retrieves the value of the designated JDBC
NUMERIC parameter as a
java.math.BigDecimal object with as many digits to the
right of the decimal point as the value contains. |
java.math.BigDecimal |
getBigDecimal(int parameterIndex,
int scale)
已过时。
use
getBigDecimal(int parameterIndex)
or getBigDecimal(String parameterName) |
java.math.BigDecimal |
getBigDecimal(java.lang.String parameterName)
Retrieves the value of a JDBC
NUMERIC parameter as a
java.math.BigDecimal object with as many digits to the
right of the decimal point as the value contains. |
java.io.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. |
java.io.InputStream |
getBinaryStream(java.lang.String columnName) |
java.sql.Blob |
getBlob(int i)
Retrieves the value of the designated JDBC
BLOB parameter as a
Blob object in the Java programming language. |
java.sql.Blob |
getBlob(java.lang.String parameterName)
Retrieves the value of a JDBC
BLOB parameter as a
Blob object in the Java programming language. |
boolean |
getBoolean(int parameterIndex)
Retrieves the value of the designated JDBC
BIT parameter as a
boolean in the Java programming language. |
boolean |
getBoolean(java.lang.String parameterName)
Retrieves the value of a JDBC
BIT parameter as a
boolean in the Java programming language. |
byte |
getByte(int parameterIndex)
Retrieves the value of the designated JDBC
TINYINT parameter
as a byte in the Java programming language. |
byte |
getByte(java.lang.String parameterName)
Retrieves the value of a JDBC
TINYINT parameter as a byte
in the Java programming language. |
byte[] |
getBytes(int parameterIndex)
Retrieves the value of the designated JDBC
BINARY or
VARBINARY parameter as an array of byte
values in the Java programming language. |
byte[] |
getBytes(java.lang.String parameterName)
Retrieves the value of a JDBC
BINARY or VARBINARY
parameter as an array of byte values in the Java
programming language. |
java.io.Reader |
getCharacterStream(int columnIndex) |
java.io.Reader |
getCharacterStream(java.lang.String columnName) |
java.sql.Clob |
getClob(int i)
Retrieves the value of the designated JDBC
CLOB parameter as a
Clob object in the Java programming language. |
java.sql.Clob |
getClob(java.lang.String parameterName)
Retrieves the value of a JDBC
CLOB parameter as a
Clob object in the Java programming language. |
java.sql.Date |
getDate(int parameterIndex)
Retrieves the value of the designated JDBC
DATE parameter as a
java.sql.Date object. |
java.sql.Date |
getDate(int parameterIndex,
java.util.Calendar cal)
Retrieves the value of the designated JDBC
DATE parameter as a
java.sql.Date object, using
the given Calendar object
to construct the date. |
java.sql.Date |
getDate(java.lang.String parameterName)
Retrieves the value of a JDBC
DATE parameter as a
java.sql.Date object. |
java.sql.Date |
getDate(java.lang.String parameterName,
java.util.Calendar cal)
Retrieves the value of a JDBC
DATE parameter as a
java.sql.Date object, using
the given Calendar object
to construct the date. |
double |
getDouble(int parameterIndex)
Retrieves the value of the designated JDBC
DOUBLE parameter as a double
in the Java programming language. |
double |
getDouble(java.lang.String parameterName)
Retrieves the value of a JDBC
DOUBLE parameter as a double
in the Java programming language. |
double |
getDoubleFromObject(java.lang.Object value) |
void |
getFile(int index,
java.io.File file) |
void |
getFile(java.lang.Object value,
java.io.File file) |
void |
getFile(java.lang.String parameterName,
java.io.File file) |
float |
getFloat(int parameterIndex)
Retrieves the value of the designated JDBC
FLOAT parameter
as a float in the Java programming language. |
float |
getFloat(java.lang.String parameterName)
Retrieves the value of a JDBC
FLOAT parameter as a float
in the Java programming language. |
float |
getFloatFromObject(java.lang.Object value) |
int |
getInt(int parameterIndex)
Retrieves the value of the designated JDBC
INTEGER parameter
as an int in the Java programming language. |
int |
getInt(java.lang.String parameterName)
Retrieves the value of a JDBC
INTEGER parameter as an int
in the Java programming language. |
int |
getIntFromObject(java.lang.Object value) |
long |
getLong(int parameterIndex)
Retrieves the value of the designated JDBC
BIGINT parameter
as a long in the Java programming language. |
long |
getLong(java.lang.String parameterName)
Retrieves the value of a JDBC
BIGINT parameter as a long
in the Java programming language. |
long |
getLongFromObject(java.lang.Object value) |
java.lang.Object |
getObject(int parameterIndex)
Retrieves the value of the designated parameter as an
Object
in the Java programming language. |
java.lang.Object |
getObject(int i,
java.util.Map map)
Returns an object representing the value of OUT parameter
i and uses map for the custom
mapping of the parameter value. |
java.lang.Object |
getObject(java.lang.String parameterName)
Retrieves the value of a parameter as an
Object in the Java
programming language. |
java.lang.Object |
getObject(java.lang.String parameterName,
java.util.Map map)
Returns an object representing the value of OUT parameter
i and uses map for the custom
mapping of the parameter value. |
java.sql.Ref |
getRef(int i)
Retrieves the value of the designated JDBC
REF(<structured-type>)
parameter as a Ref object in the Java programming language. |
java.sql.Ref |
getRef(java.lang.String parameterName)
Retrieves the value of a JDBC
REF(<structured-type>)
parameter as a Ref object in the Java programming language. |
int |
getRowid() |
java.io.Serializable |
getSerializable(int parameterIndex) |
java.io.Serializable |
getSerializable(java.lang.String field) |
short |
getShort(int parameterIndex)
Retrieves the value of the designated JDBC
SMALLINT parameter
as a short in the Java programming language. |
short |
getShort(java.lang.String parameterName)
Retrieves the value of a JDBC
SMALLINT parameter as a short
in the Java programming language. |
short |
getShortFromObject(java.lang.Object value) |
java.lang.String |
getString(int parameterIndex)
Retrieves the value of the designated JDBC
CHAR,
VARCHAR, or LONGVARCHAR parameter as a
String in the Java programming language. |
java.lang.String |
getString(java.lang.String parameterName)
Retrieves the value of a JDBC
CHAR, VARCHAR,
or LONGVARCHAR parameter as a String in
the Java programming language. |
java.sql.Time |
getTime(int parameterIndex)
Retrieves the value of the designated JDBC
TIME parameter as a
java.sql.Time object. |
java.sql.Time |
getTime(int parameterIndex,
java.util.Calendar cal)
Retrieves the value of the designated JDBC
TIME parameter as a
java.sql.Time object, using
the given Calendar object
to construct the time. |
java.sql.Time |
getTime(java.lang.String parameterName)
Retrieves the value of a JDBC
TIME parameter as a
java.sql.Time object. |
java.sql.Time |
getTime(java.lang.String parameterName,
java.util.Calendar cal)
Retrieves the value of a JDBC
TIME parameter as a
java.sql.Time object, using
the given Calendar object
to construct the time. |
java.sql.Timestamp |
getTimestamp(int parameterIndex)
Retrieves the value of the designated JDBC
TIMESTAMP parameter as a
java.sql.Timestamp object. |
java.sql.Timestamp |
getTimestamp(int parameterIndex,
java.util.Calendar cal)
Retrieves the value of the designated JDBC
TIMESTAMP parameter as a
java.sql.Timestamp object, using
the given Calendar object to construct
the Timestamp object. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName)
Retrieves the value of a JDBC
TIMESTAMP parameter as a
java.sql.Timestamp object. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName,
java.util.Calendar cal)
Retrieves the value of a JDBC
TIMESTAMP parameter as a
java.sql.Timestamp object, using
the given Calendar object to construct
the Timestamp object. |
java.io.InputStream |
getUnicodeStream(int columnIndex)
已过时。
use
getCharacterStream in place of
getUnicodeStream |
java.io.InputStream |
getUnicodeStream(java.lang.String columnName)
已过时。
use
getCharacterStream in place of
getUnicodeStream |
java.net.URL |
getURL(int parameterIndex)
Retrieves the value of the designated JDBC
DATALINK parameter as a
java.net.URL object. |
java.net.URL |
getURL(java.lang.String parameterName)
Retrieves the value of a JDBC
DATALINK parameter as a
java.net.URL object. |
void |
setRowid(int rowid) |
boolean |
wasNull()
Retrieves whether the last OUT parameter read had the value of
SQL
NULL. |
public Record(int i)
public Record(int i,
java.lang.String[] fields,
java.util.Map sameCols)
public Record(java.lang.String[] fields,
java.util.Map sameCols)
public Record()
public Record(int initialCapacity,
float loadFactor,
java.lang.String[] fields,
java.util.Map sameCols)
public Record(int initialCapacity,
float loadFactor)
public Record(java.util.Map t)
public Record(java.util.Map t,
java.lang.String[] fields)
public void setRowid(int rowid)
public int getRowid()
public boolean wasNull()
throws java.sql.SQLException
NULL. Note that this method should be called only after
calling a getter method; otherwise, there is no value to use in
determining whether it is null or not.true if the last parameter read was SQL
NULL; false otherwisejava.sql.SQLException - if a database access error occurspublic java.lang.String getString(int parameterIndex)
throws java.sql.SQLException
CHAR,
VARCHAR, or LONGVARCHAR parameter as a
String in the Java programming language.
For the fixed-length type JDBC CHAR,
the String object
returned has exactly the same value the JDBC
CHAR value had in the
database, including any padding added by the database.
parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL,
the result
is null.java.sql.SQLException - if a database access error occurs#setStringpublic boolean getBoolean(int parameterIndex)
throws java.sql.SQLException
BIT parameter as a
boolean in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL,
the result is false.java.sql.SQLException - if a database access error occurs#setBooleanpublic byte getByte(int parameterIndex)
throws java.sql.SQLException
TINYINT parameter
as a byte in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setBytepublic short getShort(int parameterIndex)
throws java.sql.SQLException
SMALLINT parameter
as a short in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setShortpublic short getShortFromObject(java.lang.Object value)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getIntFromObject(java.lang.Object value)
throws java.sql.SQLException
java.sql.SQLExceptionpublic float getFloatFromObject(java.lang.Object value)
throws java.sql.SQLException
java.sql.SQLExceptionpublic double getDoubleFromObject(java.lang.Object value)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getInt(int parameterIndex)
throws java.sql.SQLException
INTEGER parameter
as an int in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setIntpublic long getLong(int parameterIndex)
throws java.sql.SQLException
BIGINT parameter
as a long in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setLongpublic long getLongFromObject(java.lang.Object value)
throws java.sql.SQLException
java.sql.SQLExceptionpublic float getFloat(int parameterIndex)
throws java.sql.SQLException
FLOAT parameter
as a float in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setFloatpublic double getDouble(int parameterIndex)
throws java.sql.SQLException
DOUBLE parameter as a double
in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setDoublepublic java.math.BigDecimal getBigDecimal(int parameterIndex,
int scale)
throws java.sql.SQLException
getBigDecimal(int parameterIndex)
or getBigDecimal(String parameterName)NUMERIC parameter as a
java.math.BigDecimal object with scale digits to
the right of the decimal point.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onscale - the number of digits to the right of the decimal pointNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setBigDecimalpublic byte[] getBytes(int parameterIndex)
throws java.sql.SQLException
BINARY or
VARBINARY parameter as an array of byte
values in the Java programming language.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setBytespublic java.sql.Date getDate(int parameterIndex)
throws java.sql.SQLException
DATE parameter as a
java.sql.Date object.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setDatepublic java.sql.Time getTime(int parameterIndex)
throws java.sql.SQLException
TIME parameter as a
java.sql.Time object.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setTimepublic java.sql.Timestamp getTimestamp(int parameterIndex)
throws java.sql.SQLException
TIMESTAMP parameter as a
java.sql.Timestamp object.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setTimestamppublic java.lang.Object getObject(int parameterIndex)
throws java.sql.SQLException
Object
in the Java programming language. If the value is an SQL NULL,
the driver returns a Java null.
This method returns a Java object whose type corresponds to the JDBC
type that was registered for this parameter using the method
registerOutParameter. By registering the target JDBC
type as java.sql.Types.OTHER, this method can be used
to read database-specific abstract data types.
parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onjava.lang.Object holding the OUT parameter valuejava.sql.SQLException - if a database access error occursTypes,
#setObjectpublic java.math.BigDecimal getBigDecimal(int parameterIndex)
throws java.sql.SQLException
NUMERIC parameter as a
java.math.BigDecimal object with as many digits to the
right of the decimal point as the value contains.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onNULL, the result is null.java.sql.SQLException - if a database access error occurs#setBigDecimalpublic java.lang.Object getObject(int i,
java.util.Map map)
throws java.sql.SQLException
i and uses map for the custom
mapping of the parameter value.
This method returns a Java object whose type corresponds to the
JDBC type that was registered for this parameter using the method
registerOutParameter. By registering the target
JDBC type as java.sql.Types.OTHER, this method can
be used to read database-specific abstract data types.
i - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1, and so onmap - the mapping from SQL type names to Java classesjava.lang.Object holding the OUT parameter valuejava.sql.SQLException - if a database access error occurs#setObjectpublic java.io.Reader getCharacterStream(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getAsciiStream(int columnIndex)
throws java.sql.SQLException
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
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.
rowid - the first row is 0, the second is 1columnIndex - the first column is 0, the second is 1, ...NULL, the value returned is nulljava.sql.SQLException - if a database access error occurspublic java.io.InputStream getAsciiStream(java.lang.String colName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.Reader getCharacterStream(java.lang.String columnName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getUnicodeStream(int columnIndex)
throws java.sql.SQLException
getCharacterStream in place of
getUnicodeStreamResultSet object as as a stream of two-byte Unicode
characters. The first byte is the high byte; the second byte is the low
byte.
The value can then be read in chunks from the stream. This method is
particularly suitable for retrieving large LONGVARCHARvalues.
The JDBC driver will do any necessary conversion from the database format
into Unicode.
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.
rowid - the first row is 0, the second is 1columnIndex - the first column is 0, the second is 1, ...NULL, the value returned is nulljava.sql.SQLException - if a database access error occurspublic java.io.InputStream getBinaryStream(int columnIndex)
throws java.sql.SQLException
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.
rowid - the first row is 0, the second is 1columnIndex - the first column is 0, the second is 1, ...NULL, the value returned is nulljava.sql.SQLException - if a database access error occurspublic java.io.InputStream getBinaryStream(java.lang.String columnName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getUnicodeStream(java.lang.String columnName)
throws java.sql.SQLException
getCharacterStream in place of
getUnicodeStreamResultSet object as as a stream of two-byte Unicode
characters. The first byte is the high byte; the second byte is the low
byte.
The value can then be read in chunks from the stream. This method is
particularly suitable for retrieving large LONGVARCHARvalues.
The JDBC driver will do any necessary conversion from the database format
into Unicode.
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.
rowid - the first row is 0, the second is 1columnIndex - the first column is 0, the second is 1, ...NULL, the value returned is nulljava.sql.SQLException - if a database access error occurspublic java.sql.Ref getRef(int i)
throws java.sql.SQLException
REF(<structured-type>)
parameter as a Ref object in the Java programming language.i - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so onRef object in the
Java programming language. If the value was SQL NULL, the value
null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Blob getBlob(int i)
throws java.sql.SQLException
BLOB parameter as a
Blob object in the Java programming language.i - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1, and so onBlob object in the
Java programming language. If the value was SQL NULL, the value
null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Clob getClob(int i)
throws java.sql.SQLException
CLOB parameter as a
Clob object in the Java programming language.i - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1, and
so onClob object in the
Java programming language. If the value was SQL NULL, the
value null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Array getArray(int i)
throws java.sql.SQLException
ARRAY parameter as an
Array object in the Java programming language.i - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1, and
so onArray object in
the Java programming language. If the value was SQL NULL, the
value null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Date getDate(int parameterIndex,
java.util.Calendar cal)
throws java.sql.SQLException
DATE parameter as a
java.sql.Date object, using
the given Calendar object
to construct the date.
With a Calendar object, the driver
can calculate the date taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so oncal - the Calendar object the driver will use
to construct the dateNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setDatepublic java.sql.Time getTime(int parameterIndex,
java.util.Calendar cal)
throws java.sql.SQLException
TIME parameter as a
java.sql.Time object, using
the given Calendar object
to construct the time.
With a Calendar object, the driver
can calculate the time taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so oncal - the Calendar object the driver will use
to construct the timeNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setTimepublic java.sql.Timestamp getTimestamp(int parameterIndex,
java.util.Calendar cal)
throws java.sql.SQLException
TIMESTAMP parameter as a
java.sql.Timestamp object, using
the given Calendar object to construct
the Timestamp object.
With a Calendar object, the driver
can calculate the timestamp taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,
and so oncal - the Calendar object the driver will use
to construct the timestampNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setTimestamppublic java.net.URL getURL(int parameterIndex)
throws java.sql.SQLException
DATALINK parameter as a
java.net.URL object.parameterIndex - 存储过程返回的数据:the first parameter is 1, the second is 2 一般查询的结果集: the first parameter is 0, the second is 1,...java.net.URL object that represents the
JDBC DATALINK value used as the designated
parameterjava.sql.SQLException - if a database access error occurs,
or if the URL being returned is
not a valid URL on the Java platform#setURLpublic java.lang.String getString(java.lang.String parameterName)
throws java.sql.SQLException
CHAR, VARCHAR,
or LONGVARCHAR parameter as a String in
the Java programming language.
For the fixed-length type JDBC CHAR,
the String object
returned has exactly the same value the JDBC
CHAR value had in the
database, including any padding added by the database.
parameterName - the name of the parameterNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setStringpublic boolean getBoolean(java.lang.String parameterName)
throws java.sql.SQLException
BIT parameter as a
boolean in the Java programming language.parameterName - the name of the parameterNULL, the result
is false.java.sql.SQLException - if a database access error occurs#setBooleanpublic byte getByte(java.lang.String parameterName)
throws java.sql.SQLException
TINYINT parameter as a byte
in the Java programming language.parameterName - the name of the parameterNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setBytepublic short getShort(java.lang.String parameterName)
throws java.sql.SQLException
SMALLINT parameter as a short
in the Java programming language.parameterName - the name of the parameterNULL, the result
is 0.java.sql.SQLException - if a database access error occurs#setShortpublic int getInt(java.lang.String parameterName)
throws java.sql.SQLException
INTEGER parameter as an int
in the Java programming language.parameterName - the name of the parameterNULL,
the result is 0.java.sql.SQLException - if a database access error occurs#setIntpublic long getLong(java.lang.String parameterName)
throws java.sql.SQLException
BIGINT parameter as a long
in the Java programming language.parameterName - the name of the parameterNULL,
the result is 0.java.sql.SQLException - if a database access error occurs#setLongpublic float getFloat(java.lang.String parameterName)
throws java.sql.SQLException
FLOAT parameter as a float
in the Java programming language.parameterName - the name of the parameterNULL,
the result is 0.java.sql.SQLException - if a database access error occurs#setFloatpublic double getDouble(java.lang.String parameterName)
throws java.sql.SQLException
DOUBLE parameter as a double
in the Java programming language.parameterName - the name of the parameterNULL,
the result is 0.java.sql.SQLException - if a database access error occurs#setDoublepublic byte[] getBytes(java.lang.String parameterName)
throws java.sql.SQLException
BINARY or VARBINARY
parameter as an array of byte values in the Java
programming language.parameterName - the name of the parameterNULL, the result is
null.java.sql.SQLException - if a database access error occurs#setBytespublic java.sql.Date getDate(java.lang.String parameterName)
throws java.sql.SQLException
DATE parameter as a
java.sql.Date object.parameterName - the name of the parameterNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setDatepublic java.sql.Time getTime(java.lang.String parameterName)
throws java.sql.SQLException
TIME parameter as a
java.sql.Time object.parameterName - the name of the parameterNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setTimepublic java.sql.Timestamp getTimestamp(java.lang.String parameterName)
throws java.sql.SQLException
TIMESTAMP parameter as a
java.sql.Timestamp object.parameterName - the name of the parameterNULL, the result
is null.java.sql.SQLException - if a database access error occurs#setTimestamppublic java.lang.Object getObject(java.lang.String parameterName)
throws java.sql.SQLException
Object in the Java
programming language. If the value is an SQL NULL, the
driver returns a Java null.
This method returns a Java object whose type corresponds to the JDBC
type that was registered for this parameter using the method
registerOutParameter. By registering the target JDBC
type as java.sql.Types.OTHER, this method can be used
to read database-specific abstract data types.
parameterName - the name of the parameterjava.lang.Object holding the OUT parameter value.java.sql.SQLException - if a database access error occursTypes,
#setObjectpublic java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
throws java.sql.SQLException
NUMERIC parameter as a
java.math.BigDecimal object with as many digits to the
right of the decimal point as the value contains.parameterName - the name of the parameterNULL, the result is null.java.sql.SQLException - if a database access error occurs#setBigDecimalpublic java.lang.Object getObject(java.lang.String parameterName,
java.util.Map map)
throws java.sql.SQLException
i and uses map for the custom
mapping of the parameter value.
This method returns a Java object whose type corresponds to the
JDBC type that was registered for this parameter using the method
registerOutParameter. By registering the target
JDBC type as java.sql.Types.OTHER, this method can
be used to read database-specific abstract data types.
parameterName - the name of the parametermap - the mapping from SQL type names to Java classesjava.lang.Object holding the OUT parameter valuejava.sql.SQLException - if a database access error occurs#setObjectpublic java.sql.Ref getRef(java.lang.String parameterName)
throws java.sql.SQLException
REF(<structured-type>)
parameter as a Ref object in the Java programming language.parameterName - the name of the parameterRef object in the
Java programming language. If the value was SQL NULL,
the value null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Blob getBlob(java.lang.String parameterName)
throws java.sql.SQLException
BLOB parameter as a
Blob object in the Java programming language.parameterName - the name of the parameterBlob object in the
Java programming language. If the value was SQL NULL,
the value null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Clob getClob(java.lang.String parameterName)
throws java.sql.SQLException
CLOB parameter as a
Clob object in the Java programming language.parameterName - the name of the parameterClob object in the
Java programming language. If the value was SQL NULL,
the value null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Array getArray(java.lang.String parameterName)
throws java.sql.SQLException
ARRAY parameter as an
Array object in the Java programming language.parameterName - the name of the parameterArray object in
Java programming language. If the value was SQL NULL,
the value null is returned.java.sql.SQLException - if a database access error occurspublic java.sql.Date getDate(java.lang.String parameterName,
java.util.Calendar cal)
throws java.sql.SQLException
DATE parameter as a
java.sql.Date object, using
the given Calendar object
to construct the date.
With a Calendar object, the driver
can calculate the date taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale.parameterName - the name of the parametercal - the Calendar object the driver will use
to construct the dateNULL,
the result is null.java.sql.SQLException - if a database access error occurs#setDatepublic java.sql.Time getTime(java.lang.String parameterName,
java.util.Calendar cal)
throws java.sql.SQLException
TIME parameter as a
java.sql.Time object, using
the given Calendar object
to construct the time.
With a Calendar object, the driver
can calculate the time taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale.parameterName - the name of the parametercal - the Calendar object the driver will use
to construct the timeNULL, the result is
null.java.sql.SQLException - if a database access error occurs#setTimepublic java.sql.Timestamp getTimestamp(java.lang.String parameterName,
java.util.Calendar cal)
throws java.sql.SQLException
TIMESTAMP parameter as a
java.sql.Timestamp object, using
the given Calendar object to construct
the Timestamp object.
With a Calendar object, the driver
can calculate the timestamp taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale.parameterName - the name of the parametercal - the Calendar object the driver will use
to construct the timestampNULL, the result is
null.java.sql.SQLException - if a database access error occurs#setTimestamppublic java.net.URL getURL(java.lang.String parameterName)
throws java.sql.SQLException
DATALINK parameter as a
java.net.URL object.parameterName - the name of the parameterjava.net.URL object in the
Java programming language. If the value was SQL NULL, the
value null is returned.java.sql.SQLException - if a database access error occurs,
or if there is a problem with the URL#setURLpublic void getFile(int index,
java.io.File file)
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionpublic void getFile(java.lang.Object value,
java.io.File file)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void getFile(java.lang.String parameterName,
java.io.File file)
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionpublic java.io.Serializable getSerializable(java.lang.String field)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.Serializable getSerializable(int parameterIndex)
throws java.sql.SQLException
java.sql.SQLException