Java Doc for MockResultSet.java in  » Testing » mockrunner-0.4 » com » mockrunner » mock » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » mockrunner 0.4 » com.mockrunner.mock.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.mockrunner.mock.jdbc.MockResultSet

MockResultSet
public class MockResultSet implements ResultSet,Cloneable(Code)
Mock implementation of ResultSet. Can be used to add simulated database entries. You can add Java objects of any type. This mock implementation does not care about SQL data types. It tries to perform the necessary type conversions for the Java objects (e.g. it will convert a String "1" to int 1). Please check out the documentation of ResultSet for the description of the methods in this interface. The additional methods are described here.



Constructor Summary
public  MockResultSet(String id)
    
public  MockResultSet(String id, String cursorName)
    

Method Summary
public  booleanabsolute(int row)
    
public  voidaddColumn()
     Adds a column to the simulated database table. The column will get the name ColumnX where X is the column index.
public  voidaddColumn(String columnName)
     Adds a column to the simulated database table.
public  voidaddColumn(Object[] values)
     Adds a column to the simulated database table. The column will get the name ColumnX where X is the column index.
public  voidaddColumn(List values)
     Adds a column to the simulated database table. The column will get the name ColumnX where X is the column index.
public  voidaddColumn(String columnName, Object[] values)
     Adds a column to the simulated database table. The column will get the specified name. The specified data will be stored in the new column.
public  voidaddColumn(String columnName, List values)
     Adds a column to the simulated database table. The column will get the specified name. The specified data will be stored in the new column.
public  voidaddRow(Object[] values)
     Adds a row to the simulated database table. If there are not enough columns (initially there are no columns, you have to specify them with the addColumn methods) the missing columns will be added automatically.
public  voidaddRow(List values)
     Adds a row to the simulated database table. If there are not enough columns (initially there are no columns, you have to specify them with the addColumn methods) the missing columns will be added automatically.
public  voidafterLast()
    
public  voidbeforeFirst()
    
public  voidcancelRowUpdates()
    
public  voidclearWarnings()
    
public  Objectclone()
     Copies this ResultSet.
public  voidclose()
    
public  voiddeleteRow()
    
public  intfindColumn(String columnName)
    
public  booleanfirst()
    
public  ArraygetArray(int columnIndex)
    
public  ArraygetArray(String columnName)
    
public  InputStreamgetAsciiStream(int columnIndex)
    
public  InputStreamgetAsciiStream(String columnName)
    
public  BigDecimalgetBigDecimal(int columnIndex, int scale)
    
public  BigDecimalgetBigDecimal(String columnName, int scale)
    
public  BigDecimalgetBigDecimal(int columnIndex)
    
public  BigDecimalgetBigDecimal(String columnName)
    
public  InputStreamgetBinaryStream(int columnIndex)
    
public  InputStreamgetBinaryStream(String columnName)
    
public  BlobgetBlob(int columnIndex)
    
public  BlobgetBlob(String columnName)
    
public  booleangetBoolean(int columnIndex)
    
public  booleangetBoolean(String columnName)
    
public  bytegetByte(int columnIndex)
    
public  bytegetByte(String columnName)
    
public  byte[]getBytes(int columnIndex)
    
public  byte[]getBytes(String columnName)
    
public  ReadergetCharacterStream(int columnIndex)
    
public  ReadergetCharacterStream(String columnName)
    
public  ClobgetClob(int columnIndex)
    
public  ClobgetClob(String columnName)
    
public  ListgetColumn(int number)
     Returns the column with the specified number.
public  ListgetColumn(String name)
     Returns the column with the specified name.
public  intgetColumnCount()
     Returns the current number of columns.
public  intgetConcurrency()
    
public  StringgetCursorName()
    
public  DategetDate(int columnIndex)
    
public  DategetDate(String columnName)
    
public  DategetDate(int columnIndex, Calendar calendar)
    
public  DategetDate(String columnName, Calendar calendar)
    
public  doublegetDouble(int columnIndex)
    
public  doublegetDouble(String columnName)
    
public  intgetFetchDirection()
    
public  intgetFetchSize()
    
public  floatgetFloat(int columnIndex)
    
public  floatgetFloat(String columnName)
    
public  intgetHoldability()
    
public  StringgetId()
     Returns the id of this ResultSet.
public  intgetInt(int columnIndex)
    
public  intgetInt(String columnName)
    
public  longgetLong(int columnIndex)
    
public  longgetLong(String columnName)
    
public  ResultSetMetaDatagetMetaData()
    
public  ReadergetNCharacterStream(int columnIndex)
    
public  ReadergetNCharacterStream(String columnLabel)
    
public  StringgetNString(int columnIndex)
    
public  StringgetNString(String columnLabel)
    
public  ObjectgetObject(int columnIndex)
    
public  ObjectgetObject(String columnName)
    
public  ObjectgetObject(int columnIndex, Map map)
    
public  ObjectgetObject(String colName, Map map)
    
public  RefgetRef(int columnIndex)
    
public  RefgetRef(String columnName)
    
public  ListgetRow(int number)
     Returns the row with the specified number. The first row has the number 1. If number is less than 1 or higher than the current row count, null will be returned.
public  intgetRow()
    
public  intgetRowCount()
     Returns the current number of rows.
public  shortgetShort(int columnIndex)
    
public  shortgetShort(String columnName)
    
public  StatementgetStatement()
    
public  StringgetString(int columnIndex)
    
public  StringgetString(String columnName)
    
public  TimegetTime(int columnIndex)
    
public  TimegetTime(String columnName)
    
public  TimegetTime(int columnIndex, Calendar calendar)
    
public  TimegetTime(String columnName, Calendar calendar)
    
public  TimestampgetTimestamp(int columnIndex)
    
public  TimestampgetTimestamp(String columnName)
    
public  TimestampgetTimestamp(int columnIndex, Calendar calendar)
    
public  TimestampgetTimestamp(String columnName, Calendar calendar)
    
public  intgetType()
    
public  URLgetURL(int columnIndex)
    
public  URLgetURL(String columnName)
    
public  InputStreamgetUnicodeStream(int columnIndex)
    
public  InputStreamgetUnicodeStream(String columnName)
    
public  SQLWarninggetWarnings()
    
public  voidinsertRow()
    
public  booleanisAfterLast()
    
public  booleanisBeforeFirst()
    
public  booleanisClosed()
     Returns if this ResultSet is closed.
public  booleanisColumnEqual(int number, List columnData)
     Returns if the column with the specified number is equal to the specified data.
public  booleanisColumnEqual(String name, List columnData)
     Returns if the column with the specified name is equal to the specified data.
public  booleanisEqual(MockResultSet resultSet)
     Returns if the specified ResultSet is equal to this ResultSet.
public  booleanisFirst()
    
public  booleanisLast()
    
public  booleanisRowEqual(int number, List rowData)
     Returns if the row with the specified number is equal to the specified data.
public  booleanisWrapperFor(Class iface)
    
public  booleanlast()
    
public  voidmoveToCurrentRow()
    
public  voidmoveToInsertRow()
    
public  booleannext()
    
public  booleanprevious()
    
public  voidrefreshRow()
    
public  booleanrelative(int rows)
    
public  booleanrowDeleted(int number)
     Returns if the row with the specified number was deleted The first row has the number 1.
public  booleanrowDeleted()
    
public  booleanrowInserted(int number)
     Returns if the row with the specified number was inserted The first row has the number 1.
public  booleanrowInserted()
    
public  booleanrowUpdated(int number)
     Returns if the row with the specified number was updated The first row has the number 1.
public  booleanrowUpdated()
    
public  voidsetColumnsCaseSensitive(boolean columnsCaseSensitive)
     Set if column names are case sensitive.
public  voidsetCursorName(String cursorName)
     Sets the cursor name.
public  voidsetDatabaseView(boolean databaseView)
     The MockResultSet keeps the data that's stored in the simulated database and a copy of the data that represents the current ResultSet data. The update methods only update the ResultSet data.
public  voidsetFetchDirection(int fetchDirection)
    
public  voidsetFetchSize(int fetchSize)
    
public  voidsetResultSetConcurrency(int resultSetConcurrency)
     Sets the result set concurrency.
public  voidsetResultSetHoldability(int resultSetHoldability)
     Sets the result set holdability.
public  voidsetResultSetMetaData(ResultSetMetaData resultSetMetaData)
     Sets the ResultSetMetaData for this ResultSet. The specified object will be returned when calling MockResultSet.getMetaData . If no ResultSetMetaData is set, the method MockResultSet.getMetaData will return an object of MockResultSetMetaData .
public  voidsetResultSetType(int resultSetType)
     Sets the result set type.
public  voidsetStatement(Statement statement)
     Sets the Statement for this ResultSet.
public  StringtoString()
    
public  Objectunwrap(Class iface)
    
public  voidupdateArray(int columnIndex, Array array)
    
public  voidupdateArray(String columnName, Array array)
    
public  voidupdateAsciiStream(int columnIndex, InputStream stream, int length)
    
public  voidupdateAsciiStream(String columnName, InputStream stream, int length)
    
public  voidupdateAsciiStream(int columnIndex, InputStream stream, long length)
    
public  voidupdateAsciiStream(String columnName, InputStream stream, long length)
    
public  voidupdateAsciiStream(int columnIndex, InputStream stream)
    
public  voidupdateAsciiStream(String columnName, InputStream stream)
    
public  voidupdateBigDecimal(int columnIndex, BigDecimal bigDecimal)
    
public  voidupdateBigDecimal(String columnName, BigDecimal bigDecimal)
    
public  voidupdateBinaryStream(int columnIndex, InputStream stream, int length)
    
public  voidupdateBinaryStream(String columnName, InputStream stream, int length)
    
public  voidupdateBinaryStream(int columnIndex, InputStream stream, long length)
    
public  voidupdateBinaryStream(String columnName, InputStream stream, long length)
    
public  voidupdateBinaryStream(int columnIndex, InputStream stream)
    
public  voidupdateBinaryStream(String columnName, InputStream stream)
    
public  voidupdateBlob(int columnIndex, Blob blob)
    
public  voidupdateBlob(String columnName, Blob blob)
    
public  voidupdateBlob(int columnIndex, InputStream stream, long length)
    
public  voidupdateBlob(String columnName, InputStream stream, long length)
    
public  voidupdateBlob(int columnIndex, InputStream stream)
    
public  voidupdateBlob(String columnName, InputStream stream)
    
public  voidupdateBoolean(int columnIndex, boolean booleanValue)
    
public  voidupdateBoolean(String columnName, boolean booleanValue)
    
public  voidupdateByte(int columnIndex, byte byteValue)
    
public  voidupdateByte(String columnName, byte byteValue)
    
public  voidupdateBytes(int columnIndex, byte[] byteArray)
    
public  voidupdateBytes(String columnName, byte[] byteArray)
    
public  voidupdateCharacterStream(int columnIndex, Reader reader, int length)
    
public  voidupdateCharacterStream(String columnName, Reader reader, int length)
    
public  voidupdateCharacterStream(int columnIndex, Reader reader, long length)
    
public  voidupdateCharacterStream(String columnName, Reader reader, long length)
    
public  voidupdateCharacterStream(int columnIndex, Reader reader)
    
public  voidupdateCharacterStream(String columnName, Reader reader)
    
public  voidupdateClob(int columnIndex, Clob clob)
    
public  voidupdateClob(String columnName, Clob clob)
    
public  voidupdateClob(int columnIndex, Reader reader, long length)
    
public  voidupdateClob(String columnName, Reader reader, long length)
    
public  voidupdateClob(int columnIndex, Reader reader)
    
public  voidupdateClob(String columnName, Reader reader)
    
public  voidupdateDate(int columnIndex, Date date)
    
public  voidupdateDate(String columnName, Date date)
    
public  voidupdateDouble(int columnIndex, double doubleValue)
    
public  voidupdateDouble(String columnName, double doubleValue)
    
public  voidupdateFloat(int columnIndex, float floatValue)
    
public  voidupdateFloat(String columnName, float floatValue)
    
public  voidupdateInt(int columnIndex, int intValue)
    
public  voidupdateInt(String columnName, int intValue)
    
public  voidupdateLong(int columnIndex, long longValue)
    
public  voidupdateLong(String columnName, long longValue)
    
public  voidupdateNCharacterStream(int columnIndex, Reader reader)
    
public  voidupdateNCharacterStream(String columnLabel, Reader reader)
    
public  voidupdateNCharacterStream(int columnIndex, Reader reader, long length)
    
public  voidupdateNCharacterStream(String columnLabel, Reader reader, long length)
    
public  voidupdateNString(int columnIndex, String value)
    
public  voidupdateNString(String columnLabel, String value)
    
public  voidupdateNull(int columnIndex)
    
public  voidupdateNull(String columnName)
    
public  voidupdateObject(int columnIndex, Object value)
    
public  voidupdateObject(int columnIndex, Object value, int scale)
    
public  voidupdateObject(String columnName, Object value, int scale)
    
public  voidupdateObject(String columnName, Object value)
    
public  voidupdateRef(int columnIndex, Ref ref)
    
public  voidupdateRef(String columnName, Ref ref)
    
public  voidupdateRow()
    
public  voidupdateShort(int columnIndex, short shortValue)
    
public  voidupdateShort(String columnName, short shortValue)
    
public  voidupdateString(int columnIndex, String value)
    
public  voidupdateString(String columnName, String value)
    
public  voidupdateTime(int columnIndex, Time time)
    
public  voidupdateTime(String columnName, Time time)
    
public  voidupdateTimestamp(int columnIndex, Timestamp timeStamp)
    
public  voidupdateTimestamp(String columnName, Timestamp timeStamp)
    
public  booleanwasNull()
    


Constructor Detail
MockResultSet
public MockResultSet(String id)(Code)



MockResultSet
public MockResultSet(String id, String cursorName)(Code)




Method Detail
absolute
public boolean absolute(int row) throws SQLException(Code)



addColumn
public void addColumn()(Code)
Adds a column to the simulated database table. The column will get the name ColumnX where X is the column index. The first added column will have the name Column1. No data will be stored in the column.



addColumn
public void addColumn(String columnName)(Code)
Adds a column to the simulated database table. The column will get the specified name. No data will be stored in the column.
Parameters:
  columnName - the column name



addColumn
public void addColumn(Object[] values)(Code)
Adds a column to the simulated database table. The column will get the name ColumnX where X is the column index. The specified data will be stored in the new column. If there are other columns with not enough rows, the other columns will be extended and filled with null values.
Parameters:
  values - the column data as array, the array indexcorresponds to the row index, i.e.values[0] will be stored in the first rowand so on



addColumn
public void addColumn(List values)(Code)
Adds a column to the simulated database table. The column will get the name ColumnX where X is the column index. The specified data will be stored in the new column. If there are other columns with not enough rows, the other columns will be extended and filled with null values.
Parameters:
  values - the column data as List, the indexin the List corresponds to the row index, i.e. values.get(0) will be stored in the first row and so on



addColumn
public void addColumn(String columnName, Object[] values)(Code)
Adds a column to the simulated database table. The column will get the specified name. The specified data will be stored in the new column. If there are other columns with not enough rows, the other columns will be extended and filled with null values.
Parameters:
  columnName - the column name
Parameters:
  values - the column data as array, the array indexcorresponds to the row index, i.e.values[0] will be stored in the first rowand so on



addColumn
public void addColumn(String columnName, List values)(Code)
Adds a column to the simulated database table. The column will get the specified name. The specified data will be stored in the new column. If there are other columns with not enough rows, the other columns will be extended and filled with null values.
Parameters:
  columnName - the column name
Parameters:
  values - the column data as List, the indexin the List corresponds to the row index, i.e. values.get(0) will be stored in the first row and so on



addRow
public void addRow(Object[] values)(Code)
Adds a row to the simulated database table. If there are not enough columns (initially there are no columns, you have to specify them with the addColumn methods) the missing columns will be added automatically. Automatically created columns will get the name ColumnX where X is the column index.
Parameters:
  values - the row data as array, the array indexcorresponds to the column index, i.e.values[0] will be stored in the first columnand so on



addRow
public void addRow(List values)(Code)
Adds a row to the simulated database table. If there are not enough columns (initially there are no columns, you have to specify them with the addColumn methods) the missing columns will be added automatically. Automatically created columns will get the name ColumnX where X is the column index.
Parameters:
  values - the row data as List, the indexin the List corresponds to the column index, i.e. values.get(0) will be stored in the first column and so on



afterLast
public void afterLast() throws SQLException(Code)



beforeFirst
public void beforeFirst() throws SQLException(Code)



cancelRowUpdates
public void cancelRowUpdates() throws SQLException(Code)



clearWarnings
public void clearWarnings() throws SQLException(Code)



clone
public Object clone()(Code)
Copies this ResultSet. The data of the ResultSet is copied using the com.mockrunner.jdbc.ParameterUtil.copyParameter method. a copy of this ResultSet



close
public void close() throws SQLException(Code)



deleteRow
public void deleteRow() throws SQLException(Code)



findColumn
public int findColumn(String columnName) throws SQLException(Code)



first
public boolean first() throws SQLException(Code)



getArray
public Array getArray(int columnIndex) throws SQLException(Code)



getArray
public Array getArray(String columnName) throws SQLException(Code)



getAsciiStream
public InputStream getAsciiStream(int columnIndex) throws SQLException(Code)



getAsciiStream
public InputStream getAsciiStream(String columnName) throws SQLException(Code)



getBigDecimal
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException(Code)



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



getBigDecimal
public BigDecimal getBigDecimal(int columnIndex) throws SQLException(Code)



getBigDecimal
public BigDecimal getBigDecimal(String columnName) throws SQLException(Code)



getBinaryStream
public InputStream getBinaryStream(int columnIndex) throws SQLException(Code)



getBinaryStream
public InputStream getBinaryStream(String columnName) throws SQLException(Code)



getBlob
public Blob getBlob(int columnIndex) throws SQLException(Code)



getBlob
public Blob getBlob(String columnName) throws SQLException(Code)



getBoolean
public boolean getBoolean(int columnIndex) throws SQLException(Code)



getBoolean
public boolean getBoolean(String columnName) throws SQLException(Code)



getByte
public byte getByte(int columnIndex) throws SQLException(Code)



getByte
public byte getByte(String columnName) throws SQLException(Code)



getBytes
public byte[] getBytes(int columnIndex) throws SQLException(Code)



getBytes
public byte[] getBytes(String columnName) throws SQLException(Code)



getCharacterStream
public Reader getCharacterStream(int columnIndex) throws SQLException(Code)



getCharacterStream
public Reader getCharacterStream(String columnName) throws SQLException(Code)



getClob
public Clob getClob(int columnIndex) throws SQLException(Code)



getClob
public Clob getClob(String columnName) throws SQLException(Code)



getColumn
public List getColumn(int number)(Code)
Returns the column with the specified number. The first column has the number 1. If number is less than 1 or higher than the current column count, null will be returned.
Parameters:
  number - the number of the column the column data as List



getColumn
public List getColumn(String name)(Code)
Returns the column with the specified name. If a column with that name does not exist, null will be returned.
Parameters:
  name - the name of the column the column data as List



getColumnCount
public int getColumnCount()(Code)
Returns the current number of columns. the number of columns



getConcurrency
public int getConcurrency() throws SQLException(Code)



getCursorName
public String getCursorName() throws SQLException(Code)



getDate
public Date getDate(int columnIndex) throws SQLException(Code)



getDate
public Date getDate(String columnName) throws SQLException(Code)



getDate
public Date getDate(int columnIndex, Calendar calendar) throws SQLException(Code)



getDate
public Date getDate(String columnName, Calendar calendar) throws SQLException(Code)



getDouble
public double getDouble(int columnIndex) throws SQLException(Code)



getDouble
public double getDouble(String columnName) throws SQLException(Code)



getFetchDirection
public int getFetchDirection() throws SQLException(Code)



getFetchSize
public int getFetchSize() throws SQLException(Code)



getFloat
public float getFloat(int columnIndex) throws SQLException(Code)



getFloat
public float getFloat(String columnName) throws SQLException(Code)



getHoldability
public int getHoldability() throws SQLException(Code)



getId
public String getId()(Code)
Returns the id of this ResultSet. Ids are used to identify ResultSet objects in tests, because they are usually cloned when executing statements, so you cannot rely on the object identity. the id of this ResultSet



getInt
public int getInt(int columnIndex) throws SQLException(Code)



getInt
public int getInt(String columnName) throws SQLException(Code)



getLong
public long getLong(int columnIndex) throws SQLException(Code)



getLong
public long getLong(String columnName) throws SQLException(Code)



getMetaData
public ResultSetMetaData getMetaData() throws SQLException(Code)



getNCharacterStream
public Reader getNCharacterStream(int columnIndex) throws SQLException(Code)



getNCharacterStream
public Reader getNCharacterStream(String columnLabel) throws SQLException(Code)



getNString
public String getNString(int columnIndex) throws SQLException(Code)



getNString
public String getNString(String columnLabel) throws SQLException(Code)



getObject
public Object getObject(int columnIndex) throws SQLException(Code)



getObject
public Object getObject(String columnName) throws SQLException(Code)



getObject
public Object getObject(int columnIndex, Map map) throws SQLException(Code)



getObject
public Object getObject(String colName, Map map) throws SQLException(Code)



getRef
public Ref getRef(int columnIndex) throws SQLException(Code)



getRef
public Ref getRef(String columnName) throws SQLException(Code)



getRow
public List getRow(int number)(Code)
Returns the row with the specified number. The first row has the number 1. If number is less than 1 or higher than the current row count, null will be returned. The result of this method depends on the setting of databaseView. See MockResultSet.setDatabaseView .
Parameters:
  number - the number of the row the row data as List



getRow
public int getRow() throws SQLException(Code)



getRowCount
public int getRowCount()(Code)
Returns the current number of rows. the number of rows



getShort
public short getShort(int columnIndex) throws SQLException(Code)



getShort
public short getShort(String columnName) throws SQLException(Code)



getStatement
public Statement getStatement() throws SQLException(Code)



getString
public String getString(int columnIndex) throws SQLException(Code)



getString
public String getString(String columnName) throws SQLException(Code)



getTime
public Time getTime(int columnIndex) throws SQLException(Code)



getTime
public Time getTime(String columnName) throws SQLException(Code)



getTime
public Time getTime(int columnIndex, Calendar calendar) throws SQLException(Code)



getTime
public Time getTime(String columnName, Calendar calendar) throws SQLException(Code)



getTimestamp
public Timestamp getTimestamp(int columnIndex) throws SQLException(Code)



getTimestamp
public Timestamp getTimestamp(String columnName) throws SQLException(Code)



getTimestamp
public Timestamp getTimestamp(int columnIndex, Calendar calendar) throws SQLException(Code)



getTimestamp
public Timestamp getTimestamp(String columnName, Calendar calendar) throws SQLException(Code)



getType
public int getType() throws SQLException(Code)



getURL
public URL getURL(int columnIndex) throws SQLException(Code)



getURL
public URL getURL(String columnName) throws SQLException(Code)



getUnicodeStream
public InputStream getUnicodeStream(int columnIndex) throws SQLException(Code)



getUnicodeStream
public InputStream getUnicodeStream(String columnName) throws SQLException(Code)



getWarnings
public SQLWarning getWarnings() throws SQLException(Code)



insertRow
public void insertRow() throws SQLException(Code)



isAfterLast
public boolean isAfterLast() throws SQLException(Code)



isBeforeFirst
public boolean isBeforeFirst() throws SQLException(Code)



isClosed
public boolean isClosed()(Code)
Returns if this ResultSet is closed. true if this ResultSet is closed,false otherwise



isColumnEqual
public boolean isColumnEqual(int number, List columnData)(Code)
Returns if the column with the specified number is equal to the specified data. Uses com.mockrunner.jdbc.ParameterUtil.compareParameter . The first column has the number 1. If the compared parameters are not of the same type (and cannot be equal according to the com.mockrunner.jdbc.ParameterUtil.compareParameter method) they will be converted to a string with the toString() method before comparison.
Parameters:
  number - the number of the column
Parameters:
  columnData - the column data true if the column is equal to the specified data,false otherwise



isColumnEqual
public boolean isColumnEqual(String name, List columnData)(Code)
Returns if the column with the specified name is equal to the specified data. Uses com.mockrunner.jdbc.ParameterUtil.compareParameter . The first column has the number 1. If the compared parameters are not of the same type (and cannot be equal according to the com.mockrunner.jdbc.ParameterUtil.compareParameter method) they will be converted to a string with the toString() method before comparison.
Parameters:
  name - the name of the column
Parameters:
  columnData - the column data true if the column is equal to the specified data,false otherwise



isEqual
public boolean isEqual(MockResultSet resultSet)(Code)
Returns if the specified ResultSet is equal to this ResultSet. If the compared parameters are not of the same type (and cannot be equal according to the com.mockrunner.jdbc.ParameterUtil.compareParameter method) they will be converted to a string with the toString() method before comparison. true if the two ResultSet objects are equal,false otherwise



isFirst
public boolean isFirst() throws SQLException(Code)



isLast
public boolean isLast() throws SQLException(Code)



isRowEqual
public boolean isRowEqual(int number, List rowData)(Code)
Returns if the row with the specified number is equal to the specified data. Uses com.mockrunner.jdbc.ParameterUtil.compareParameter . The first row has the number 1. If the compared parameters are not of the same type (and cannot be equal according to the com.mockrunner.jdbc.ParameterUtil.compareParameter method) they will be converted to a string with the toString() method before comparison.
Parameters:
  number - the number of the row
Parameters:
  rowData - the row data true if the row is equal to the specified data,false otherwise



isWrapperFor
public boolean isWrapperFor(Class iface) throws SQLException(Code)



last
public boolean last() throws SQLException(Code)



moveToCurrentRow
public void moveToCurrentRow() throws SQLException(Code)



moveToInsertRow
public void moveToInsertRow() throws SQLException(Code)



next
public boolean next() throws SQLException(Code)



previous
public boolean previous() throws SQLException(Code)



refreshRow
public void refreshRow() throws SQLException(Code)



relative
public boolean relative(int rows) throws SQLException(Code)



rowDeleted
public boolean rowDeleted(int number)(Code)
Returns if the row with the specified number was deleted The first row has the number 1.
Parameters:
  number - the number of the row true if the row was deleted,false otherwise



rowDeleted
public boolean rowDeleted() throws SQLException(Code)



rowInserted
public boolean rowInserted(int number)(Code)
Returns if the row with the specified number was inserted The first row has the number 1.
Parameters:
  number - the number of the row true if the row was inserted,false otherwise



rowInserted
public boolean rowInserted() throws SQLException(Code)



rowUpdated
public boolean rowUpdated(int number)(Code)
Returns if the row with the specified number was updated The first row has the number 1.
Parameters:
  number - the number of the row true if the row was updated,false otherwise



rowUpdated
public boolean rowUpdated() throws SQLException(Code)



setColumnsCaseSensitive
public void setColumnsCaseSensitive(boolean columnsCaseSensitive)(Code)
Set if column names are case sensitive. Default is false. Please note, that switching this attribute clears and resets the complete ResultSet.
Parameters:
  columnsCaseSensitive - are column names case sensitive



setCursorName
public void setCursorName(String cursorName)(Code)
Sets the cursor name. It's not possible to set this in a real ResultSet.
Parameters:
  cursorName - the cursor name



setDatabaseView
public void setDatabaseView(boolean databaseView)(Code)
The MockResultSet keeps the data that's stored in the simulated database and a copy of the data that represents the current ResultSet data. The update methods only update the ResultSet data. This data will be persisted when you call MockResultSet.updateRow . When you set databaseView to true the get methods will return the data in the database, otherwise the current ResultSet data is returned.
Parameters:
  databaseView - false = get the data from the ResultSet, true = get the datafrom the database, default is false



setFetchDirection
public void setFetchDirection(int fetchDirection) throws SQLException(Code)



setFetchSize
public void setFetchSize(int fetchSize) throws SQLException(Code)



setResultSetConcurrency
public void setResultSetConcurrency(int resultSetConcurrency)(Code)
Sets the result set concurrency. It's not possible to set this in a real ResultSet, but in tests it can make sense to change it.
Parameters:
  resultSetConcurrency - the result set concurrency



setResultSetHoldability
public void setResultSetHoldability(int resultSetHoldability)(Code)
Sets the result set holdability. It's not possible to set this in a real ResultSet, but in tests it can make sense to change it.
Parameters:
  resultSetHoldability - the result set holdability



setResultSetMetaData
public void setResultSetMetaData(ResultSetMetaData resultSetMetaData)(Code)
Sets the ResultSetMetaData for this ResultSet. The specified object will be returned when calling MockResultSet.getMetaData . If no ResultSetMetaData is set, the method MockResultSet.getMetaData will return an object of MockResultSetMetaData . The MockResultSetMetaData returns default values for most of its attributes (however the correct number of columns will be returned). Usually you do not have to set the ResultSetMetaData.
Parameters:
  resultSetMetaData - the ResultSetMetaData



setResultSetType
public void setResultSetType(int resultSetType)(Code)
Sets the result set type. It's not possible to set this in a real ResultSet, but in tests it can make sense to change it.
Parameters:
  resultSetType - the result set type



setStatement
public void setStatement(Statement statement)(Code)
Sets the Statement for this ResultSet. The ResultSet takes the result set type, result set concurrency and the fetch direction from the specified Statement.
Parameters:
  statement - the statement



toString
public String toString()(Code)



unwrap
public Object unwrap(Class iface) throws SQLException(Code)



updateArray
public void updateArray(int columnIndex, Array array) throws SQLException(Code)



updateArray
public void updateArray(String columnName, Array array) throws SQLException(Code)



updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream stream, int length) throws SQLException(Code)



updateAsciiStream
public void updateAsciiStream(String columnName, InputStream stream, int length) throws SQLException(Code)



updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream stream, long length) throws SQLException(Code)



updateAsciiStream
public void updateAsciiStream(String columnName, InputStream stream, long length) throws SQLException(Code)



updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream stream) throws SQLException(Code)



updateAsciiStream
public void updateAsciiStream(String columnName, InputStream stream) throws SQLException(Code)



updateBigDecimal
public void updateBigDecimal(int columnIndex, BigDecimal bigDecimal) throws SQLException(Code)



updateBigDecimal
public void updateBigDecimal(String columnName, BigDecimal bigDecimal) throws SQLException(Code)



updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream stream, int length) throws SQLException(Code)



updateBinaryStream
public void updateBinaryStream(String columnName, InputStream stream, int length) throws SQLException(Code)



updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream stream, long length) throws SQLException(Code)



updateBinaryStream
public void updateBinaryStream(String columnName, InputStream stream, long length) throws SQLException(Code)



updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream stream) throws SQLException(Code)



updateBinaryStream
public void updateBinaryStream(String columnName, InputStream stream) throws SQLException(Code)



updateBlob
public void updateBlob(int columnIndex, Blob blob) throws SQLException(Code)



updateBlob
public void updateBlob(String columnName, Blob blob) throws SQLException(Code)



updateBlob
public void updateBlob(int columnIndex, InputStream stream, long length) throws SQLException(Code)



updateBlob
public void updateBlob(String columnName, InputStream stream, long length) throws SQLException(Code)



updateBlob
public void updateBlob(int columnIndex, InputStream stream) throws SQLException(Code)



updateBlob
public void updateBlob(String columnName, InputStream stream) throws SQLException(Code)



updateBoolean
public void updateBoolean(int columnIndex, boolean booleanValue) throws SQLException(Code)



updateBoolean
public void updateBoolean(String columnName, boolean booleanValue) throws SQLException(Code)



updateByte
public void updateByte(int columnIndex, byte byteValue) throws SQLException(Code)



updateByte
public void updateByte(String columnName, byte byteValue) throws SQLException(Code)



updateBytes
public void updateBytes(int columnIndex, byte[] byteArray) throws SQLException(Code)



updateBytes
public void updateBytes(String columnName, byte[] byteArray) throws SQLException(Code)



updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader reader, int length) throws SQLException(Code)



updateCharacterStream
public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException(Code)



updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader reader, long length) throws SQLException(Code)



updateCharacterStream
public void updateCharacterStream(String columnName, Reader reader, long length) throws SQLException(Code)



updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader reader) throws SQLException(Code)



updateCharacterStream
public void updateCharacterStream(String columnName, Reader reader) throws SQLException(Code)



updateClob
public void updateClob(int columnIndex, Clob clob) throws SQLException(Code)



updateClob
public void updateClob(String columnName, Clob clob) throws SQLException(Code)



updateClob
public void updateClob(int columnIndex, Reader reader, long length) throws SQLException(Code)



updateClob
public void updateClob(String columnName, Reader reader, long length) throws SQLException(Code)



updateClob
public void updateClob(int columnIndex, Reader reader) throws SQLException(Code)



updateClob
public void updateClob(String columnName, Reader reader) throws SQLException(Code)



updateDate
public void updateDate(int columnIndex, Date date) throws SQLException(Code)



updateDate
public void updateDate(String columnName, Date date) throws SQLException(Code)



updateDouble
public void updateDouble(int columnIndex, double doubleValue) throws SQLException(Code)



updateDouble
public void updateDouble(String columnName, double doubleValue) throws SQLException(Code)



updateFloat
public void updateFloat(int columnIndex, float floatValue) throws SQLException(Code)



updateFloat
public void updateFloat(String columnName, float floatValue) throws SQLException(Code)



updateInt
public void updateInt(int columnIndex, int intValue) throws SQLException(Code)



updateInt
public void updateInt(String columnName, int intValue) throws SQLException(Code)



updateLong
public void updateLong(int columnIndex, long longValue) throws SQLException(Code)



updateLong
public void updateLong(String columnName, long longValue) throws SQLException(Code)



updateNCharacterStream
public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException(Code)



updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException(Code)



updateNCharacterStream
public void updateNCharacterStream(int columnIndex, Reader reader, long length) throws SQLException(Code)



updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException(Code)



updateNString
public void updateNString(int columnIndex, String value) throws SQLException(Code)



updateNString
public void updateNString(String columnLabel, String value) throws SQLException(Code)



updateNull
public void updateNull(int columnIndex) throws SQLException(Code)



updateNull
public void updateNull(String columnName) throws SQLException(Code)



updateObject
public void updateObject(int columnIndex, Object value) throws SQLException(Code)



updateObject
public void updateObject(int columnIndex, Object value, int scale) throws SQLException(Code)



updateObject
public void updateObject(String columnName, Object value, int scale) throws SQLException(Code)



updateObject
public void updateObject(String columnName, Object value) throws SQLException(Code)



updateRef
public void updateRef(int columnIndex, Ref ref) throws SQLException(Code)



updateRef
public void updateRef(String columnName, Ref ref) throws SQLException(Code)



updateRow
public void updateRow() throws SQLException(Code)



updateShort
public void updateShort(int columnIndex, short shortValue) throws SQLException(Code)



updateShort
public void updateShort(String columnName, short shortValue) throws SQLException(Code)



updateString
public void updateString(int columnIndex, String value) throws SQLException(Code)



updateString
public void updateString(String columnName, String value) throws SQLException(Code)



updateTime
public void updateTime(int columnIndex, Time time) throws SQLException(Code)



updateTime
public void updateTime(String columnName, Time time) throws SQLException(Code)



updateTimestamp
public void updateTimestamp(int columnIndex, Timestamp timeStamp) throws SQLException(Code)



updateTimestamp
public void updateTimestamp(String columnName, Timestamp timeStamp) throws SQLException(Code)



wasNull
public boolean wasNull() throws SQLException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.