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 TypeMethodDescriptionbooleanabsolute(int row) Calls notImplemented.voidaddExpectedIndexedValues(Object[] values) Add expected values from an array to be retrieved by index.voidaddExpectedNamedValues(String[] names, Object[] values) Add expected values from an array to be retrieved by name or index.voidAdd expected values from a Map to be retrieved by name or index.voidCalls notImplemented.voidCalls notImplemented.voidCalls notImplemented.voidCalls notImplemented.voidclose()voidCalls notImplemented.intfindColumn(String columnName) Calls notImplemented.booleanfirst()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) booleangetBoolean(int columnIndex) booleangetBoolean(String columnName) bytegetByte(int columnIndex) bytebyte[]getBytes(int columnIndex) byte[]getCharacterStream(int columnIndex) getCharacterStream(String columnName) getClob(int i) intgetDate(int columnIndex) doublegetDouble(int columnIndex) doubleintCalls notImplemented.intCalls notImplemented.floatgetFloat(int columnIndex) floatintgetInt(int columnIndex) intlonggetLong(int columnIndex) longgetObject(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) intgetRow()Return 1 if next has been called exactly once.shortgetShort(int columnIndex) shortgetString(int columnIndex) getTime(int columnIndex) getTimestamp(int columnIndex) getTimestamp(int columnIndex, Calendar cal) getTimestamp(String columnName) getTimestamp(String columnName, Calendar cal) intgetType()Calls notImplemented.getUnicodeStream(int columnIndex) getUnicodeStream(String columnName) Calls notImplemented.voidCalls notImplemented.booleanCalls notImplemented.booleanCalls notImplemented.booleanisFirst()Calls notImplemented.booleanisLast()Calls notImplemented.booleanlast()Calls notImplemented.voidCalls notImplemented.voidCalls notImplemented.booleannext()Return true if this is the first time next is called.booleanprevious()Calls notImplemented.voidCalls notImplemented.booleanrelative(int rows) Calls notImplemented.booleanCalls notImplemented.booleanCalls notImplemented.booleanCalls notImplemented.voidsetExpectedCloseCalls(int calls) voidsetExpectedNextCalls(int calls) voidsetFetchDirection(int direction) Calls notImplemented.voidsetFetchSize(int rows) Calls notImplemented.voidsetupMetaData(ResultSetMetaData metaData) voidsetupStatement(Statement statement) voidupdateAsciiStream(int columnIndex, InputStream x, int length) Calls notImplemented.voidupdateAsciiStream(String columnName, InputStream x, int length) Calls notImplemented.voidupdateBigDecimal(int columnIndex, BigDecimal x) Calls notImplemented.voidupdateBigDecimal(String columnName, BigDecimal x) Calls notImplemented.voidupdateBinaryStream(int columnIndex, InputStream x, int length) Calls notImplemented.voidupdateBinaryStream(String columnName, InputStream x, int length) Calls notImplemented.voidupdateBoolean(int columnIndex, boolean x) Calls notImplemented.voidupdateBoolean(String columnName, boolean x) Calls notImplemented.voidupdateByte(int columnIndex, byte x) Calls notImplemented.voidupdateByte(String columnName, byte x) Calls notImplemented.voidupdateBytes(int columnIndex, byte[] x) Calls notImplemented.voidupdateBytes(String columnName, byte[] x) Calls notImplemented.voidupdateCharacterStream(int columnIndex, Reader x, int length) Calls notImplemented.voidupdateCharacterStream(String columnName, Reader reader, int length) Calls notImplemented.voidupdateDate(int columnIndex, Date x) Calls notImplemented.voidupdateDate(String columnName, Date x) Calls notImplemented.voidupdateDouble(int columnIndex, double x) Calls notImplemented.voidupdateDouble(String columnName, double x) Calls notImplemented.voidupdateFloat(int columnIndex, float x) Calls notImplemented.voidupdateFloat(String columnName, float x) Calls notImplemented.voidupdateInt(int columnIndex, int x) Calls notImplemented.voidCalls notImplemented.voidupdateLong(int columnIndex, long x) Calls notImplemented.voidupdateLong(String columnName, long x) Calls notImplemented.voidupdateNull(int columnIndex) Calls notImplemented.voidupdateNull(String columnName) Calls notImplemented.voidupdateObject(int columnIndex, Object x) Calls notImplemented.voidupdateObject(int columnIndex, Object x, int scale) Calls notImplemented.voidupdateObject(String columnName, Object x) Calls notImplemented.voidupdateObject(String columnName, Object x, int scale) Calls notImplemented.voidCalls notImplemented.voidupdateShort(int columnIndex, short x) Calls notImplemented.voidupdateShort(String columnName, short x) Calls notImplemented.voidupdateString(int columnIndex, String x) Calls notImplemented.voidupdateString(String columnName, String x) Calls notImplemented.voidupdateTime(int columnIndex, Time x) Calls notImplemented.voidupdateTime(String columnName, Time x) Calls notImplemented.voidupdateTimestamp(int columnIndex, Timestamp x) Calls notImplemented.voidupdateTimestamp(String columnName, Timestamp x) Calls notImplemented.booleanwasNull()Calls notImplemented.Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verifyMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateSQLXMLMethods 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:
nextin interfaceResultSet- Throws:
SQLException
-
getRow
Return 1 if next has been called exactly once.- Specified by:
getRowin 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:
getObjectin 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:
getObjectin interfaceResultSet- Throws:
SQLException- See Also:
-
setExpectedCloseCalls
public void setExpectedCloseCalls(int calls) -
setExpectedNextCalls
public void setExpectedNextCalls(int calls) -
setupMetaData
-
setupStatement
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultSet- Throws:
SQLException
-
getArray
- Specified by:
getArrayin interfaceResultSet- Throws:
SQLException
-
getArray
- Specified by:
getArrayin interfaceResultSet- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStreamin interfaceResultSet- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStreamin interfaceResultSet- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceResultSet- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceResultSet- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceResultSet- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceResultSet- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStreamin interfaceResultSet- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStreamin interfaceResultSet- Throws:
SQLException
-
getBlob
- Specified by:
getBlobin interfaceResultSet- Throws:
SQLException
-
getBlob
- Specified by:
getBlobin interfaceResultSet- Throws:
SQLException
-
getBoolean
- Specified by:
getBooleanin interfaceResultSet- Throws:
SQLException
-
getBoolean
- Specified by:
getBooleanin interfaceResultSet- Throws:
SQLException
-
getByte
- Specified by:
getBytein interfaceResultSet- Throws:
SQLException
-
getByte
- Specified by:
getBytein interfaceResultSet- Throws:
SQLException
-
getBytes
- Specified by:
getBytesin interfaceResultSet- Throws:
SQLException
-
getBytes
- Specified by:
getBytesin interfaceResultSet- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceResultSet- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceResultSet- Throws:
SQLException
-
getClob
- Specified by:
getClobin interfaceResultSet- Throws:
SQLException
-
getClob
- Specified by:
getClobin interfaceResultSet- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceResultSet- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceResultSet- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceResultSet- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceResultSet- Throws:
SQLException
-
getDouble
- Specified by:
getDoublein interfaceResultSet- Throws:
SQLException
-
getDouble
- Specified by:
getDoublein interfaceResultSet- Throws:
SQLException
-
getFloat
- Specified by:
getFloatin interfaceResultSet- Throws:
SQLException
-
getFloat
- Specified by:
getFloatin interfaceResultSet- Throws:
SQLException
-
getInt
- Specified by:
getIntin interfaceResultSet- Throws:
SQLException
-
getInt
- Specified by:
getIntin interfaceResultSet- Throws:
SQLException
-
getLong
- Specified by:
getLongin interfaceResultSet- Throws:
SQLException
-
getLong
- Specified by:
getLongin interfaceResultSet- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaDatain interfaceResultSet- Throws:
SQLException
-
getRef
- Specified by:
getRefin interfaceResultSet- Throws:
SQLException
-
getRef
- Specified by:
getRefin interfaceResultSet- Throws:
SQLException
-
getShort
- Specified by:
getShortin interfaceResultSet- Throws:
SQLException
-
getShort
- Specified by:
getShortin interfaceResultSet- Throws:
SQLException
-
getStatement
- Specified by:
getStatementin interfaceResultSet- Throws:
SQLException
-
getString
- Specified by:
getStringin interfaceResultSet- Throws:
SQLException
-
getString
- Specified by:
getStringin interfaceResultSet- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceResultSet- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceResultSet- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceResultSet- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceResultSet- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceResultSet- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceResultSet- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceResultSet- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceResultSet- Throws:
SQLException
-
getUnicodeStream
- Specified by:
getUnicodeStreamin interfaceResultSet- Throws:
SQLException
-
getUnicodeStream
- Specified by:
getUnicodeStreamin interfaceResultSet- Throws:
SQLException
-
getCursorName
- Specified by:
getCursorNamein interfaceResultSet- Throws:
SQLException
-
getConcurrency
- Specified by:
getConcurrencyin interfaceResultSet- Throws:
SQLException
-
getFetchDirection
Calls notImplemented. Returns 0.- Specified by:
getFetchDirectionin interfaceResultSet- Throws:
SQLException
-
getFetchSize
Calls notImplemented. Returns 0.- Specified by:
getFetchSizein interfaceResultSet- Throws:
SQLException
-
getObject
Calls notImplemented. Returns null.- Specified by:
getObjectin interfaceResultSet- Throws:
SQLException
-
getObject
Calls notImplemented. Returns null.- Specified by:
getObjectin interfaceResultSet- Throws:
SQLException
-
getType
Calls notImplemented. Returns 0.- Specified by:
getTypein interfaceResultSet- Throws:
SQLException
-
getWarnings
Calls notImplemented. Returns null.- Specified by:
getWarningsin interfaceResultSet- Throws:
SQLException
-
clearWarnings
Calls notImplemented.- Specified by:
clearWarningsin interfaceResultSet- Throws:
SQLException
-
findColumn
Calls notImplemented. Returns 0.- Specified by:
findColumnin interfaceResultSet- Throws:
SQLException
-
isBeforeFirst
Calls notImplemented. Returns false.- Specified by:
isBeforeFirstin interfaceResultSet- Throws:
SQLException
-
isAfterLast
Calls notImplemented. Returns false.- Specified by:
isAfterLastin interfaceResultSet- Throws:
SQLException
-
isFirst
Calls notImplemented. Returns false.- Specified by:
isFirstin interfaceResultSet- Throws:
SQLException
-
isLast
Calls notImplemented. Returns false.- Specified by:
isLastin interfaceResultSet- Throws:
SQLException
-
beforeFirst
Calls notImplemented.- Specified by:
beforeFirstin interfaceResultSet- Throws:
SQLException
-
afterLast
Calls notImplemented.- Specified by:
afterLastin interfaceResultSet- Throws:
SQLException
-
first
Calls notImplemented. Returns false.- Specified by:
firstin interfaceResultSet- Throws:
SQLException
-
last
Calls notImplemented. Returns false.- Specified by:
lastin interfaceResultSet- Throws:
SQLException
-
absolute
Calls notImplemented. Returns false.- Specified by:
absolutein interfaceResultSet- Throws:
SQLException
-
relative
Calls notImplemented. Returns false.- Specified by:
relativein interfaceResultSet- Throws:
SQLException
-
previous
Calls notImplemented. Returns false.- Specified by:
previousin interfaceResultSet- Throws:
SQLException
-
setFetchDirection
Calls notImplemented.- Specified by:
setFetchDirectionin interfaceResultSet- Throws:
SQLException
-
setFetchSize
Calls notImplemented.- Specified by:
setFetchSizein interfaceResultSet- Throws:
SQLException
-
rowUpdated
Calls notImplemented. Returns false.- Specified by:
rowUpdatedin interfaceResultSet- Throws:
SQLException
-
rowInserted
Calls notImplemented. Returns false.- Specified by:
rowInsertedin interfaceResultSet- Throws:
SQLException
-
rowDeleted
Calls notImplemented. Returns false.- Specified by:
rowDeletedin interfaceResultSet- Throws:
SQLException
-
updateNull
Calls notImplemented.- Specified by:
updateNullin interfaceResultSet- Throws:
SQLException
-
updateBoolean
Calls notImplemented.- Specified by:
updateBooleanin interfaceResultSet- Throws:
SQLException
-
updateByte
Calls notImplemented.- Specified by:
updateBytein interfaceResultSet- Throws:
SQLException
-
updateShort
Calls notImplemented.- Specified by:
updateShortin interfaceResultSet- Throws:
SQLException
-
updateInt
Calls notImplemented.- Specified by:
updateIntin interfaceResultSet- Throws:
SQLException
-
updateLong
Calls notImplemented.- Specified by:
updateLongin interfaceResultSet- Throws:
SQLException
-
updateFloat
Calls notImplemented.- Specified by:
updateFloatin interfaceResultSet- Throws:
SQLException
-
updateDouble
Calls notImplemented.- Specified by:
updateDoublein interfaceResultSet- Throws:
SQLException
-
updateBigDecimal
Calls notImplemented.- Specified by:
updateBigDecimalin interfaceResultSet- Throws:
SQLException
-
updateString
Calls notImplemented.- Specified by:
updateStringin interfaceResultSet- Throws:
SQLException
-
updateBytes
Calls notImplemented.- Specified by:
updateBytesin interfaceResultSet- Throws:
SQLException
-
updateDate
Calls notImplemented.- Specified by:
updateDatein interfaceResultSet- Throws:
SQLException
-
updateTime
Calls notImplemented.- Specified by:
updateTimein interfaceResultSet- Throws:
SQLException
-
updateTimestamp
Calls notImplemented.- Specified by:
updateTimestampin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
Calls notImplemented.- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
Calls notImplemented.- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
Calls notImplemented.- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateNull
Calls notImplemented.- Specified by:
updateNullin interfaceResultSet- Throws:
SQLException
-
updateBoolean
Calls notImplemented.- Specified by:
updateBooleanin interfaceResultSet- Throws:
SQLException
-
updateByte
Calls notImplemented.- Specified by:
updateBytein interfaceResultSet- Throws:
SQLException
-
updateShort
Calls notImplemented.- Specified by:
updateShortin interfaceResultSet- Throws:
SQLException
-
updateInt
Calls notImplemented.- Specified by:
updateIntin interfaceResultSet- Throws:
SQLException
-
updateLong
Calls notImplemented.- Specified by:
updateLongin interfaceResultSet- Throws:
SQLException
-
updateFloat
Calls notImplemented.- Specified by:
updateFloatin interfaceResultSet- Throws:
SQLException
-
updateDouble
Calls notImplemented.- Specified by:
updateDoublein interfaceResultSet- Throws:
SQLException
-
updateBigDecimal
Calls notImplemented.- Specified by:
updateBigDecimalin interfaceResultSet- Throws:
SQLException
-
updateString
Calls notImplemented.- Specified by:
updateStringin interfaceResultSet- Throws:
SQLException
-
updateBytes
Calls notImplemented.- Specified by:
updateBytesin interfaceResultSet- Throws:
SQLException
-
updateDate
Calls notImplemented.- Specified by:
updateDatein interfaceResultSet- Throws:
SQLException
-
updateTime
Calls notImplemented.- Specified by:
updateTimein interfaceResultSet- Throws:
SQLException
-
updateTimestamp
Calls notImplemented.- Specified by:
updateTimestampin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
Calls notImplemented.- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
Calls notImplemented.- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
Calls notImplemented.- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
Calls notImplemented.- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
insertRow
Calls notImplemented.- Specified by:
insertRowin interfaceResultSet- Throws:
SQLException
-
updateRow
Calls notImplemented.- Specified by:
updateRowin interfaceResultSet- Throws:
SQLException
-
deleteRow
Calls notImplemented.- Specified by:
deleteRowin interfaceResultSet- Throws:
SQLException
-
refreshRow
Calls notImplemented.- Specified by:
refreshRowin interfaceResultSet- Throws:
SQLException
-
cancelRowUpdates
Calls notImplemented.- Specified by:
cancelRowUpdatesin interfaceResultSet- Throws:
SQLException
-
moveToInsertRow
Calls notImplemented.- Specified by:
moveToInsertRowin interfaceResultSet- Throws:
SQLException
-
moveToCurrentRow
Calls notImplemented.- Specified by:
moveToCurrentRowin interfaceResultSet- Throws:
SQLException
-
wasNull
Calls notImplemented.- Specified by:
wasNullin interfaceResultSet- Throws:
SQLException
-