Package com.mockobjects.sql
Class MockSingleRowResultSet
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.sql.MockSingleRowResultSet
- All Implemented Interfaces:
Verifiable
,AutoCloseable
,ResultSet
,Wrapper
-
Field Summary
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
absolute
(int row) Calls notImplemented.void
addExpectedIndexedValues
(Object[] values) Add expected values from an array to be retrieved by index.void
addExpectedNamedValues
(String[] names, Object[] values) Add expected values from an array to be retrieved by name or index.void
Add expected values from a Map to be retrieved by name or index.void
Calls notImplemented.void
Calls notImplemented.void
Calls notImplemented.void
Calls notImplemented.void
close()
void
Calls notImplemented.int
findColumn
(String columnName) Calls notImplemented.boolean
first()
Calls notImplemented.getArray
(int i) getAsciiStream
(int columnIndex) getAsciiStream
(String columnName) getBigDecimal
(int columnIndex) getBigDecimal
(int columnIndex, int scale) getBigDecimal
(String columnName) getBigDecimal
(String columnName, int scale) getBinaryStream
(int columnIndex) getBinaryStream
(String columnName) getBlob
(int i) boolean
getBoolean
(int columnIndex) boolean
getBoolean
(String columnName) byte
getByte
(int columnIndex) byte
byte[]
getBytes
(int columnIndex) byte[]
getCharacterStream
(int columnIndex) getCharacterStream
(String columnName) getClob
(int i) int
getDate
(int columnIndex) double
getDouble
(int columnIndex) double
int
Calls notImplemented.int
Calls notImplemented.float
getFloat
(int columnIndex) float
int
getInt
(int columnIndex) int
long
getLong
(int columnIndex) long
getObject
(int columnIndex) Return value set for given index by an addExpected* method.Calls notImplemented.Return value set for given name by an addExpectedNamedValue method.Calls notImplemented.getRef
(int i) int
getRow()
Return 1 if next has been called exactly once.short
getShort
(int columnIndex) short
getString
(int columnIndex) getTime
(int columnIndex) getTimestamp
(int columnIndex) getTimestamp
(int columnIndex, Calendar cal) getTimestamp
(String columnName) getTimestamp
(String columnName, Calendar cal) int
getType()
Calls notImplemented.getUnicodeStream
(int columnIndex) getUnicodeStream
(String columnName) Calls notImplemented.void
Calls notImplemented.boolean
Calls notImplemented.boolean
Calls notImplemented.boolean
isFirst()
Calls notImplemented.boolean
isLast()
Calls notImplemented.boolean
last()
Calls notImplemented.void
Calls notImplemented.void
Calls notImplemented.boolean
next()
Return true if this is the first time next is called.boolean
previous()
Calls notImplemented.void
Calls notImplemented.boolean
relative
(int rows) Calls notImplemented.boolean
Calls notImplemented.boolean
Calls notImplemented.boolean
Calls notImplemented.void
setExpectedCloseCalls
(int calls) void
setExpectedNextCalls
(int calls) void
setFetchDirection
(int direction) Calls notImplemented.void
setFetchSize
(int rows) Calls notImplemented.void
setupMetaData
(ResultSetMetaData metaData) void
setupStatement
(Statement statement) void
updateAsciiStream
(int columnIndex, InputStream x, int length) Calls notImplemented.void
updateAsciiStream
(String columnName, InputStream x, int length) Calls notImplemented.void
updateBigDecimal
(int columnIndex, BigDecimal x) Calls notImplemented.void
updateBigDecimal
(String columnName, BigDecimal x) Calls notImplemented.void
updateBinaryStream
(int columnIndex, InputStream x, int length) Calls notImplemented.void
updateBinaryStream
(String columnName, InputStream x, int length) Calls notImplemented.void
updateBoolean
(int columnIndex, boolean x) Calls notImplemented.void
updateBoolean
(String columnName, boolean x) Calls notImplemented.void
updateByte
(int columnIndex, byte x) Calls notImplemented.void
updateByte
(String columnName, byte x) Calls notImplemented.void
updateBytes
(int columnIndex, byte[] x) Calls notImplemented.void
updateBytes
(String columnName, byte[] x) Calls notImplemented.void
updateCharacterStream
(int columnIndex, Reader x, int length) Calls notImplemented.void
updateCharacterStream
(String columnName, Reader reader, int length) Calls notImplemented.void
updateDate
(int columnIndex, Date x) Calls notImplemented.void
updateDate
(String columnName, Date x) Calls notImplemented.void
updateDouble
(int columnIndex, double x) Calls notImplemented.void
updateDouble
(String columnName, double x) Calls notImplemented.void
updateFloat
(int columnIndex, float x) Calls notImplemented.void
updateFloat
(String columnName, float x) Calls notImplemented.void
updateInt
(int columnIndex, int x) Calls notImplemented.void
Calls notImplemented.void
updateLong
(int columnIndex, long x) Calls notImplemented.void
updateLong
(String columnName, long x) Calls notImplemented.void
updateNull
(int columnIndex) Calls notImplemented.void
updateNull
(String columnName) Calls notImplemented.void
updateObject
(int columnIndex, Object x) Calls notImplemented.void
updateObject
(int columnIndex, Object x, int scale) Calls notImplemented.void
updateObject
(String columnName, Object x) Calls notImplemented.void
updateObject
(String columnName, Object x, int scale) Calls notImplemented.void
Calls notImplemented.void
updateShort
(int columnIndex, short x) Calls notImplemented.void
updateShort
(String columnName, short x) Calls notImplemented.void
updateString
(int columnIndex, String x) Calls notImplemented.void
updateString
(String columnName, String x) Calls notImplemented.void
updateTime
(int columnIndex, Time x) Calls notImplemented.void
updateTime
(String columnName, Time x) Calls notImplemented.void
updateTimestamp
(int columnIndex, Timestamp x) Calls notImplemented.void
updateTimestamp
(String columnName, Timestamp x) Calls notImplemented.boolean
wasNull()
Calls notImplemented.Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.ResultSet
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getRowId, getRowId, getSQLXML, getSQLXML, getURL, getURL, isClosed, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRowId, updateRowId, updateSQLXML, updateSQLXML
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
MockSingleRowResultSet
public MockSingleRowResultSet()
-
-
Method Details
-
addExpectedIndexedValues
Add expected values from an array to be retrieved by index. -
addExpectedNamedValues
Add expected values from an array to be retrieved by name or index. -
addExpectedNamedValues
Add expected values from a Map to be retrieved by name or index. -
next
Return true if this is the first time next is called.- Specified by:
next
in interfaceResultSet
- Throws:
SQLException
-
getRow
Return 1 if next has been called exactly once.- Specified by:
getRow
in interfaceResultSet
- Throws:
SQLException
-
getObject
Return value set for given index by an addExpected* method. Called by superclass to cast values to appropriate type.- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
- See Also:
-
getObject
Return value set for given name by an addExpectedNamedValue method. Called by superclass to cast values to appropriate type.- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
- See Also:
-
setExpectedCloseCalls
public void setExpectedCloseCalls(int calls) -
setExpectedNextCalls
public void setExpectedNextCalls(int calls) -
setupMetaData
-
setupStatement
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceResultSet
- Throws:
SQLException
-
getArray
- Specified by:
getArray
in interfaceResultSet
- Throws:
SQLException
-
getArray
- Specified by:
getArray
in interfaceResultSet
- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
getBlob
- Specified by:
getBlob
in interfaceResultSet
- Throws:
SQLException
-
getBlob
- Specified by:
getBlob
in interfaceResultSet
- Throws:
SQLException
-
getBoolean
- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getBoolean
- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getByte
- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getByte
- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getBytes
- Specified by:
getBytes
in interfaceResultSet
- Throws:
SQLException
-
getBytes
- Specified by:
getBytes
in interfaceResultSet
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getClob
- Specified by:
getClob
in interfaceResultSet
- Throws:
SQLException
-
getClob
- Specified by:
getClob
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDouble
- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getDouble
- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getFloat
- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getFloat
- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getInt
- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getInt
- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getLong
- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getLong
- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaData
in interfaceResultSet
- Throws:
SQLException
-
getRef
- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getRef
- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getShort
- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getShort
- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getStatement
- Specified by:
getStatement
in interfaceResultSet
- Throws:
SQLException
-
getString
- Specified by:
getString
in interfaceResultSet
- Throws:
SQLException
-
getString
- Specified by:
getString
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
- Specified by:
getUnicodeStream
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
- Specified by:
getUnicodeStream
in interfaceResultSet
- Throws:
SQLException
-
getCursorName
- Specified by:
getCursorName
in interfaceResultSet
- Throws:
SQLException
-
getConcurrency
- Specified by:
getConcurrency
in interfaceResultSet
- Throws:
SQLException
-
getFetchDirection
Calls notImplemented. Returns 0.- Specified by:
getFetchDirection
in interfaceResultSet
- Throws:
SQLException
-
getFetchSize
Calls notImplemented. Returns 0.- Specified by:
getFetchSize
in interfaceResultSet
- Throws:
SQLException
-
getObject
Calls notImplemented. Returns null.- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getObject
Calls notImplemented. Returns null.- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getType
Calls notImplemented. Returns 0.- Specified by:
getType
in interfaceResultSet
- Throws:
SQLException
-
getWarnings
Calls notImplemented. Returns null.- Specified by:
getWarnings
in interfaceResultSet
- Throws:
SQLException
-
clearWarnings
Calls notImplemented.- Specified by:
clearWarnings
in interfaceResultSet
- Throws:
SQLException
-
findColumn
Calls notImplemented. Returns 0.- Specified by:
findColumn
in interfaceResultSet
- Throws:
SQLException
-
isBeforeFirst
Calls notImplemented. Returns false.- Specified by:
isBeforeFirst
in interfaceResultSet
- Throws:
SQLException
-
isAfterLast
Calls notImplemented. Returns false.- Specified by:
isAfterLast
in interfaceResultSet
- Throws:
SQLException
-
isFirst
Calls notImplemented. Returns false.- Specified by:
isFirst
in interfaceResultSet
- Throws:
SQLException
-
isLast
Calls notImplemented. Returns false.- Specified by:
isLast
in interfaceResultSet
- Throws:
SQLException
-
beforeFirst
Calls notImplemented.- Specified by:
beforeFirst
in interfaceResultSet
- Throws:
SQLException
-
afterLast
Calls notImplemented.- Specified by:
afterLast
in interfaceResultSet
- Throws:
SQLException
-
first
Calls notImplemented. Returns false.- Specified by:
first
in interfaceResultSet
- Throws:
SQLException
-
last
Calls notImplemented. Returns false.- Specified by:
last
in interfaceResultSet
- Throws:
SQLException
-
absolute
Calls notImplemented. Returns false.- Specified by:
absolute
in interfaceResultSet
- Throws:
SQLException
-
relative
Calls notImplemented. Returns false.- Specified by:
relative
in interfaceResultSet
- Throws:
SQLException
-
previous
Calls notImplemented. Returns false.- Specified by:
previous
in interfaceResultSet
- Throws:
SQLException
-
setFetchDirection
Calls notImplemented.- Specified by:
setFetchDirection
in interfaceResultSet
- Throws:
SQLException
-
setFetchSize
Calls notImplemented.- Specified by:
setFetchSize
in interfaceResultSet
- Throws:
SQLException
-
rowUpdated
Calls notImplemented. Returns false.- Specified by:
rowUpdated
in interfaceResultSet
- Throws:
SQLException
-
rowInserted
Calls notImplemented. Returns false.- Specified by:
rowInserted
in interfaceResultSet
- Throws:
SQLException
-
rowDeleted
Calls notImplemented. Returns false.- Specified by:
rowDeleted
in interfaceResultSet
- Throws:
SQLException
-
updateNull
Calls notImplemented.- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
Calls notImplemented.- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateByte
Calls notImplemented.- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateShort
Calls notImplemented.- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateInt
Calls notImplemented.- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateLong
Calls notImplemented.- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
Calls notImplemented.- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
Calls notImplemented.- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
Calls notImplemented.- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateString
Calls notImplemented.- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
Calls notImplemented.- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateDate
Calls notImplemented.- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateTime
Calls notImplemented.- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
Calls notImplemented.- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
Calls notImplemented.- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
Calls notImplemented.- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
Calls notImplemented.- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateNull
Calls notImplemented.- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
Calls notImplemented.- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateByte
Calls notImplemented.- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateShort
Calls notImplemented.- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateInt
Calls notImplemented.- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateLong
Calls notImplemented.- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
Calls notImplemented.- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
Calls notImplemented.- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
Calls notImplemented.- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateString
Calls notImplemented.- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
Calls notImplemented.- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateDate
Calls notImplemented.- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateTime
Calls notImplemented.- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
Calls notImplemented.- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
Calls notImplemented.- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
Calls notImplemented.- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
Calls notImplemented.- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
insertRow
Calls notImplemented.- Specified by:
insertRow
in interfaceResultSet
- Throws:
SQLException
-
updateRow
Calls notImplemented.- Specified by:
updateRow
in interfaceResultSet
- Throws:
SQLException
-
deleteRow
Calls notImplemented.- Specified by:
deleteRow
in interfaceResultSet
- Throws:
SQLException
-
refreshRow
Calls notImplemented.- Specified by:
refreshRow
in interfaceResultSet
- Throws:
SQLException
-
cancelRowUpdates
Calls notImplemented.- Specified by:
cancelRowUpdates
in interfaceResultSet
- Throws:
SQLException
-
moveToInsertRow
Calls notImplemented.- Specified by:
moveToInsertRow
in interfaceResultSet
- Throws:
SQLException
-
moveToCurrentRow
Calls notImplemented.- Specified by:
moveToCurrentRow
in interfaceResultSet
- Throws:
SQLException
-
wasNull
Calls notImplemented.- Specified by:
wasNull
in interfaceResultSet
- Throws:
SQLException
-