public class AutoGenerateKeysResultSet extends ReadonlyScrollResultSet
ResultSet 实现类,结果集最多包含一个自增主键值。
说明:AutoGenerateKeysResultSet 类是非线程安全的,不允许多个线程使用同一个实例。
Statement.getGeneratedKeys()| 构造器和说明 |
|---|
AutoGenerateKeysResultSet(long autoGenerateKey,
java.sql.Statement statement)
构造一个自增主键查询结果
ResultSet 实现类。 |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearWarnings() |
void |
close() |
int |
findColumn(java.lang.String columnLabel) |
java.sql.Array |
getArray(int columnIndex) |
java.sql.Array |
getArray(java.lang.String columnLabel) |
java.io.InputStream |
getAsciiStream(int columnIndex) |
java.io.InputStream |
getAsciiStream(java.lang.String columnLabel) |
java.math.BigDecimal |
getBigDecimal(int columnIndex) |
java.math.BigDecimal |
getBigDecimal(int columnIndex,
int scale) |
java.math.BigDecimal |
getBigDecimal(java.lang.String columnLabel) |
java.math.BigDecimal |
getBigDecimal(java.lang.String columnLabel,
int scale) |
java.io.InputStream |
getBinaryStream(int columnIndex) |
java.io.InputStream |
getBinaryStream(java.lang.String columnLabel) |
java.sql.Blob |
getBlob(int columnIndex) |
java.sql.Blob |
getBlob(java.lang.String columnLabel) |
boolean |
getBoolean(int columnIndex) |
boolean |
getBoolean(java.lang.String columnLabel) |
byte |
getByte(int columnIndex) |
byte |
getByte(java.lang.String columnLabel) |
byte[] |
getBytes(int columnIndex) |
byte[] |
getBytes(java.lang.String columnLabel) |
java.io.Reader |
getCharacterStream(int columnIndex) |
java.io.Reader |
getCharacterStream(java.lang.String columnLabel) |
java.sql.Clob |
getClob(int columnIndex) |
java.sql.Clob |
getClob(java.lang.String columnLabel) |
java.lang.String |
getCursorName() |
java.sql.Date |
getDate(int columnIndex) |
java.sql.Date |
getDate(int columnIndex,
java.util.Calendar cal) |
java.sql.Date |
getDate(java.lang.String columnLabel) |
java.sql.Date |
getDate(java.lang.String columnLabel,
java.util.Calendar cal) |
double |
getDouble(int columnIndex) |
double |
getDouble(java.lang.String columnLabel) |
float |
getFloat(int columnIndex) |
float |
getFloat(java.lang.String columnLabel) |
int |
getHoldability() |
int |
getInt(int columnIndex) |
int |
getInt(java.lang.String columnLabel) |
long |
getLong(int columnIndex) |
long |
getLong(java.lang.String columnLabel) |
java.sql.ResultSetMetaData |
getMetaData() |
java.io.Reader |
getNCharacterStream(int columnIndex) |
java.io.Reader |
getNCharacterStream(java.lang.String columnLabel) |
java.sql.NClob |
getNClob(int columnIndex) |
java.sql.NClob |
getNClob(java.lang.String columnLabel) |
java.lang.String |
getNString(int columnIndex) |
java.lang.String |
getNString(java.lang.String columnLabel) |
java.lang.Object |
getObject(int columnIndex) |
<T> T |
getObject(int columnIndex,
java.lang.Class<T> type) |
java.lang.Object |
getObject(int columnIndex,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.lang.Object |
getObject(java.lang.String columnLabel) |
<T> T |
getObject(java.lang.String columnLabel,
java.lang.Class<T> type) |
java.lang.Object |
getObject(java.lang.String columnLabel,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.sql.Ref |
getRef(int columnIndex) |
java.sql.Ref |
getRef(java.lang.String columnLabel) |
java.sql.RowId |
getRowId(int columnIndex) |
java.sql.RowId |
getRowId(java.lang.String columnLabel) |
int |
getRowsSize() |
short |
getShort(int columnIndex) |
short |
getShort(java.lang.String columnLabel) |
java.sql.SQLXML |
getSQLXML(int columnIndex) |
java.sql.SQLXML |
getSQLXML(java.lang.String columnLabel) |
java.sql.Statement |
getStatement() |
java.lang.String |
getString(int columnIndex) |
java.lang.String |
getString(java.lang.String columnLabel) |
java.sql.Time |
getTime(int columnIndex) |
java.sql.Time |
getTime(int columnIndex,
java.util.Calendar cal) |
java.sql.Time |
getTime(java.lang.String columnLabel) |
java.sql.Time |
getTime(java.lang.String columnLabel,
java.util.Calendar cal) |
java.sql.Timestamp |
getTimestamp(int columnIndex) |
java.sql.Timestamp |
getTimestamp(int columnIndex,
java.util.Calendar cal) |
java.sql.Timestamp |
getTimestamp(java.lang.String columnLabel) |
java.sql.Timestamp |
getTimestamp(java.lang.String columnLabel,
java.util.Calendar cal) |
java.io.InputStream |
getUnicodeStream(int columnIndex) |
java.io.InputStream |
getUnicodeStream(java.lang.String columnLabel) |
java.net.URL |
getURL(int columnIndex) |
java.net.URL |
getURL(java.lang.String columnLabel) |
java.sql.SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
<T> T |
unwrap(java.lang.Class<T> iface) |
boolean |
wasNull() |
absolute, afterLast, beforeFirst, first, getFetchDirection, getFetchSize, getRow, getType, isAfterLast, isBeforeFirst, isFirst, isLast, last, next, previous, relative, setFetchDirection, setFetchSizecancelRowUpdates, deleteRow, getConcurrency, insertRow, moveToCurrentRow, moveToInsertRow, refreshRow, rowDeleted, rowInserted, rowUpdated, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamppublic AutoGenerateKeysResultSet(long autoGenerateKey,
java.sql.Statement statement)
ResultSet 实现类。autoGenerateKey - 自增主键,如果为 -1,则不存在自增主键statement - SQL 语句执行器public int getRowsSize()
getRowsSize 在类中 ReadonlyScrollResultSetpublic void close()
public boolean wasNull()
public java.lang.String getString(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getString(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic short getShort(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic short getShort(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getInt(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getInt(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long getLong(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long getLong(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic float getFloat(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic float getFloat(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic double getDouble(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic double getDouble(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.math.BigDecimal getBigDecimal(int columnIndex,
int scale)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.math.BigDecimal getBigDecimal(java.lang.String columnLabel,
int scale)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getObject(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getObject(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int findColumn(java.lang.String columnLabel)
public java.sql.Statement getStatement()
public java.sql.ResultSetMetaData getMetaData()
public boolean getBoolean(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean getBoolean(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic byte getByte(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic byte getByte(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic byte[] getBytes(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Date getDate(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Time getTime(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Timestamp getTimestamp(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getAsciiStream(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getUnicodeStream(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic byte[] getBytes(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Date getDate(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Time getTime(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Timestamp getTimestamp(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getAsciiStream(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getUnicodeStream(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getCursorName()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.Reader getCharacterStream(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.Reader getCharacterStream(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.math.BigDecimal getBigDecimal(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.math.BigDecimal getBigDecimal(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getObject(int columnIndex,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Ref getRef(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Blob getBlob(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Clob getClob(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Array getArray(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getObject(java.lang.String columnLabel,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Ref getRef(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Blob getBlob(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Clob getClob(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Array getArray(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Date getDate(int columnIndex,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Date getDate(java.lang.String columnLabel,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Time getTime(int columnIndex,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Time getTime(java.lang.String columnLabel,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Timestamp getTimestamp(int columnIndex,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Timestamp getTimestamp(java.lang.String columnLabel,
java.util.Calendar cal)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.net.URL getURL(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.net.URL getURL(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.RowId getRowId(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.RowId getRowId(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getHoldability()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.NClob getNClob(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.NClob getNClob(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.SQLXML getSQLXML(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.SQLXML getSQLXML(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getNString(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getNString(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.Reader getNCharacterStream(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.Reader getNCharacterStream(java.lang.String columnLabel)
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> T getObject(int columnIndex,
java.lang.Class<T> type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> T getObject(java.lang.String columnLabel,
java.lang.Class<T> type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.SQLWarning getWarnings()
public void clearWarnings()
public boolean isClosed()
public <T> T unwrap(java.lang.Class<T> iface)
public boolean isWrapperFor(java.lang.Class<?> iface)
Copyright © 2019. All Rights Reserved.