Java Doc for AbstractParameterResultSetHandler.java in  » Testing » mockrunner-0.4 » com » mockrunner » 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.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.mockrunner.jdbc.AbstractResultSetHandler
      com.mockrunner.jdbc.AbstractParameterResultSetHandler

All known Subclasses:   com.mockrunner.jdbc.AbstractOutParameterResultSetHandler,  com.mockrunner.jdbc.PreparedStatementResultSetHandler,
AbstractParameterResultSetHandler
abstract public class AbstractParameterResultSetHandler extends AbstractResultSetHandler (Code)
Abstract base class for all statement types that support parameters, i.e. PreparedStatement and CallableStatement.

Inner Class :protected class ParameterWrapper



Method Summary
public  voidaddParameterMapForExecutedStatement(String sql, Map parameters)
     Collects all SQL strings that were executed.
public  voidclearGeneratedKeys()
     Clears the list of statements that return generated keys.
public  voidclearResultSets()
     Clears the ResultSet objects.
public  voidclearThrowsSQLException()
    
public  voidclearUpdateCounts()
     Clears the update counts.
public  MapgetExecutedStatementParameter()
    
public  MapgetExecutedStatementParameterMap()
     Returns the Map of executed SQL strings.
public  MockResultSetgetGeneratedKeys(String sql, Map parameters)
     Returns the first generated keys ResultSet that matches the specified SQL string.
protected  ParameterWrappergetMatchingParameterWrapper(String sql, Map parameters, Map statementMap)
    
public  ParameterSetsgetParametersForExecutedStatement(String sql)
     Returns the ParameterSets for a specified SQL string.
public  MockResultSetgetResultSet(String sql, Map parameters)
     Returns the first ResultSet that matches the specified SQL string and the specified parameters.
public  MockResultSet[]getResultSets(String sql, Map parameters)
     Returns the first ResultSet[] that matches the specified SQL string and the specified parameters.
public  SQLExceptiongetSQLException(String sql, Map parameters)
     Returns the SQLException the specified SQL string should throw.
public  booleangetThrowsSQLException(String sql, Map parameters)
     Returns if the specified SQL string with the specified parameters should raise an exception.
public  IntegergetUpdateCount(String sql, Map parameters)
     Returns the first update count that matches the specified SQL string and the specified parameters.
public  Integer[]getUpdateCounts(String sql, Map parameters)
     Returns the first update count array that matches the specified SQL string and the specified parameters.
public  booleanhasMultipleResultSets(String sql, Map parameters)
     Returns the if the specified SQL string with the specified parameters returns multiple result sets.
public  booleanhasMultipleUpdateCounts(String sql, Map parameters)
     Returns the if the specified SQL string with the specified parameters returns multiple update counts.
public  voidprepareGeneratedKeys(String sql, MockResultSet generatedKeysResult, Object[] parameters)
     Prepare the generated keys ResultSet for a specified SQL string. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter.
public  voidprepareGeneratedKeys(String sql, MockResultSet generatedKeysResult, List parameters)
     Prepare the generated keys ResultSet for a specified SQL string. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter.
public  voidprepareGeneratedKeys(String sql, MockResultSet generatedKeysResult, Map parameters)
     Prepare the generated keys ResultSet for a specified SQL string. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter.
public  voidprepareResultSet(String sql, MockResultSet resultSet, Object[] parameters)
     Prepare a ResultSet for a specified SQL string and the specified parameters.
public  voidprepareResultSet(String sql, MockResultSet resultSet, List parameters)
     Prepare a ResultSet for a specified SQL string and the specified parameters.
public  voidprepareResultSet(String sql, MockResultSet resultSet, Map parameters)
     Prepare a ResultSet for a specified SQL string and the specified parameters.
public  voidprepareResultSets(String sql, MockResultSet[] resultSets, Object[] parameters)
     Prepare an array of ResultSet objects for a specified SQL string and the specified parameters.
public  voidprepareResultSets(String sql, MockResultSet[] resultSets, List parameters)
     Prepare an array of ResultSet objects for a specified SQL string and the specified parameters.
public  voidprepareResultSets(String sql, MockResultSet[] resultSets, Map parameters)
     Prepare an array of ResultSet objects for a specified SQL string and the specified parameters.
public  voidprepareThrowsSQLException(String sql, Object[] parameters)
     Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception.
public  voidprepareThrowsSQLException(String sql, List parameters)
     Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception.
public  voidprepareThrowsSQLException(String sql, Map parameters)
     Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception.
public  voidprepareThrowsSQLException(String sql, SQLException exc, Object[] parameters)
     Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter.
public  voidprepareThrowsSQLException(String sql, SQLException exc, List parameters)
     Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter.
public  voidprepareThrowsSQLException(String sql, SQLException exc, Map parameters)
     Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter.
public  voidprepareUpdateCount(String sql, int updateCount, Object[] parameters)
     Prepare the update count for execute update calls for a specified SQL string and the specified parameters.
public  voidprepareUpdateCount(String sql, int updateCount, List parameters)
     Prepare the update count for execute update calls for a specified SQL string and the specified parameters.
public  voidprepareUpdateCount(String sql, int updateCount, Map parameters)
     Prepare the update count for execute update calls for a specified SQL string and the specified parameters.
public  voidprepareUpdateCounts(String sql, int[] updateCounts, Object[] parameters)
     Prepare an array update count values for execute update calls for a specified SQL string and the specified parameters.
public  voidprepareUpdateCounts(String sql, int[] updateCounts, List parameters)
     Prepare an array update count values for execute update calls for a specified SQL string and the specified parameters.
public  voidprepareUpdateCounts(String sql, int[] updateCounts, Map parameters)
     Prepare an array update count values for execute update calls for a specified SQL string and the specified parameters.
public  voidsetExactMatchParameter(boolean exactMatchParameter)
     Sets if the specified parameters must match exactly in order and number. Defaults to false, i.e.



Method Detail
addParameterMapForExecutedStatement
public void addParameterMapForExecutedStatement(String sql, Map parameters)(Code)
Collects all SQL strings that were executed.
Parameters:
  sql - the SQL string
Parameters:
  parameters - a copy of the corresponding parameter map



clearGeneratedKeys
public void clearGeneratedKeys()(Code)
Clears the list of statements that return generated keys.



clearResultSets
public void clearResultSets()(Code)
Clears the ResultSet objects.



clearThrowsSQLException
public void clearThrowsSQLException()(Code)
Clears the list of statements that should throw an exception



clearUpdateCounts
public void clearUpdateCounts()(Code)
Clears the update counts.



getExecutedStatementParameter
public Map getExecutedStatementParameter()(Code)
AbstractParameterResultSetHandler.getExecutedStatementParameterMap



getExecutedStatementParameterMap
public Map getExecutedStatementParameterMap()(Code)
Returns the Map of executed SQL strings. Each string maps to the corresponding ParameterSets object. the Map of parameters



getGeneratedKeys
public MockResultSet getGeneratedKeys(String sql, Map parameters)(Code)
Returns the first generated keys ResultSet that matches the specified SQL string. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters the corresponding generated keys MockResultSet



getMatchingParameterWrapper
protected ParameterWrapper getMatchingParameterWrapper(String sql, Map parameters, Map statementMap)(Code)



getParametersForExecutedStatement
public ParameterSets getParametersForExecutedStatement(String sql)(Code)
Returns the ParameterSets for a specified SQL string.
Parameters:
  sql - the SQL string the Map of parameters



getResultSet
public MockResultSet getResultSet(String sql, Map parameters)(Code)
Returns the first ResultSet that matches the specified SQL string and the specified parameters. If the specified SQL string was prepared to return multiple result sets, the first one will be returned. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters the corresponding MockResultSet



getResultSets
public MockResultSet[] getResultSets(String sql, Map parameters)(Code)
Returns the first ResultSet[] that matches the specified SQL string and the specified parameters. If the specified SQL string was prepared to return one single ResultSet, this ResultSet will be wrapped in an array with one element. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters the corresponding update count



getSQLException
public SQLException getSQLException(String sql, Map parameters)(Code)
Returns the SQLException the specified SQL string should throw. Returns null if the specified SQL string should not throw an exception. This can be used to simulate database exceptions. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters the SQLException or null



getThrowsSQLException
public boolean getThrowsSQLException(String sql, Map parameters)(Code)
Returns if the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters true if the specified SQL string should raise an exception,false otherwise



getUpdateCount
public Integer getUpdateCount(String sql, Map parameters)(Code)
Returns the first update count that matches the specified SQL string and the specified parameters. If the specified SQL string was prepared to return multiple update counts, the first one will be returned. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters the corresponding update count



getUpdateCounts
public Integer[] getUpdateCounts(String sql, Map parameters)(Code)
Returns the first update count array that matches the specified SQL string and the specified parameters. If the specified SQL string was prepared to return one update count, this value will be wrapped in an array with one element. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters the corresponding update count



hasMultipleResultSets
public boolean hasMultipleResultSets(String sql, Map parameters)(Code)
Returns the if the specified SQL string with the specified parameters returns multiple result sets. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string true if the SQL string returns multiple update counts,false otherwise



hasMultipleUpdateCounts
public boolean hasMultipleUpdateCounts(String sql, Map parameters)(Code)
Returns the if the specified SQL string with the specified parameters returns multiple update counts. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string true if the SQL string returns multiple update counts,false otherwise



prepareGeneratedKeys
public void prepareGeneratedKeys(String sql, MockResultSet generatedKeysResult, Object[] parameters)(Code)
Prepare the generated keys ResultSet for a specified SQL string. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  generatedKeysResult - the generated keys MockResultSet
Parameters:
  parameters - the parameters



prepareGeneratedKeys
public void prepareGeneratedKeys(String sql, MockResultSet generatedKeysResult, List parameters)(Code)
Prepare the generated keys ResultSet for a specified SQL string. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  generatedKeysResult - the generated keys MockResultSet
Parameters:
  parameters - the parameters



prepareGeneratedKeys
public void prepareGeneratedKeys(String sql, MockResultSet generatedKeysResult, Map parameters)(Code)
Prepare the generated keys ResultSet for a specified SQL string. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  generatedKeysResult - the generated keys MockResultSet
Parameters:
  parameters - the parameters



prepareResultSet
public void prepareResultSet(String sql, MockResultSet resultSet, Object[] parameters)(Code)
Prepare a ResultSet for a specified SQL string and the specified parameters. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  resultSet - the corresponding MockResultSet
Parameters:
  parameters - the parameters



prepareResultSet
public void prepareResultSet(String sql, MockResultSet resultSet, List parameters)(Code)
Prepare a ResultSet for a specified SQL string and the specified parameters. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  resultSet - the corresponding MockResultSet
Parameters:
  parameters - the parameters



prepareResultSet
public void prepareResultSet(String sql, MockResultSet resultSet, Map parameters)(Code)
Prepare a ResultSet for a specified SQL string and the specified parameters. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  resultSet - the corresponding MockResultSet
Parameters:
  parameters - the parameters



prepareResultSets
public void prepareResultSets(String sql, MockResultSet[] resultSets, Object[] parameters)(Code)
Prepare an array of ResultSet objects for a specified SQL string and the specified parameters. This method can be used for queries that return multiple result sets. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  resultSets - the corresponding MockResultSet[]
Parameters:
  parameters - the parameters



prepareResultSets
public void prepareResultSets(String sql, MockResultSet[] resultSets, List parameters)(Code)
Prepare an array of ResultSet objects for a specified SQL string and the specified parameters. This method can be used for queries that return multiple result sets. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  resultSets - the corresponding MockResultSet[]
Parameters:
  parameters - the parameters



prepareResultSets
public void prepareResultSets(String sql, MockResultSet[] resultSets, Map parameters)(Code)
Prepare an array of ResultSet objects for a specified SQL string and the specified parameters. This method can be used for queries that return multiple result sets. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  resultSets - the corresponding MockResultSet[]
Parameters:
  parameters - the parameters



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, Object[] parameters)(Code)
Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception. With AbstractParameterResultSetHandler.prepareThrowsSQLException(String,SQLException,Object[]) you can specify the exception. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, List parameters)(Code)
Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception. With AbstractParameterResultSetHandler.prepareThrowsSQLException(String,SQLException,List) you can specify the exception. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, Map parameters)(Code)
Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception. With AbstractParameterResultSetHandler.prepareThrowsSQLException(String,SQLException,Map) you can specify the exception. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  parameters - the parameters



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, SQLException exc, Object[] parameters)(Code)
Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  exc - the SQLException that should be thrown
Parameters:
  parameters - the parameters



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, SQLException exc, List parameters)(Code)
Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  exc - the SQLException that should be thrown
Parameters:
  parameters - the parameters



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, SQLException exc, Map parameters)(Code)
Prepare that the specified SQL string with the specified parameters should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  exc - the SQLException that should be thrown
Parameters:
  parameters - the parameters



prepareUpdateCount
public void prepareUpdateCount(String sql, int updateCount, Object[] parameters)(Code)
Prepare the update count for execute update calls for a specified SQL string and the specified parameters. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  updateCount - the update count
Parameters:
  parameters - the parameters



prepareUpdateCount
public void prepareUpdateCount(String sql, int updateCount, List parameters)(Code)
Prepare the update count for execute update calls for a specified SQL string and the specified parameters. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  updateCount - the update count
Parameters:
  parameters - the parameters



prepareUpdateCount
public void prepareUpdateCount(String sql, int updateCount, Map parameters)(Code)
Prepare the update count for execute update calls for a specified SQL string and the specified parameters. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  updateCount - the update count
Parameters:
  parameters - the parameters



prepareUpdateCounts
public void prepareUpdateCounts(String sql, int[] updateCounts, Object[] parameters)(Code)
Prepare an array update count values for execute update calls for a specified SQL string and the specified parameters. This method can be used if multiple update counts are returned. The specified parameters array must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  updateCounts - the update count array
Parameters:
  parameters - the parameters



prepareUpdateCounts
public void prepareUpdateCounts(String sql, int[] updateCounts, List parameters)(Code)
Prepare an array update count values for execute update calls for a specified SQL string and the specified parameters. This method can be used if multiple update counts are returned. The specified parameters List must contain the parameters in the correct order starting with index 0 for the first parameter. Please keep in mind that parameters in PreparedStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  updateCounts - the update count array
Parameters:
  parameters - the parameters



prepareUpdateCounts
public void prepareUpdateCounts(String sql, int[] updateCounts, Map parameters)(Code)
Prepare an array update count values for execute update calls for a specified SQL string and the specified parameters. This method can be used if multiple update counts are returned. The specified parameters Map must contain the parameters by mapping Integer objects to the corresponding parameter. The Integer object is the index of the parameter. In the case of a CallableStatement, String keys for named parameters are also allowed. Please note that you can modify the match parameters with AbstractParameterResultSetHandler.setCaseSensitive , AbstractParameterResultSetHandler.setExactMatch and AbstractParameterResultSetHandler.setUseRegularExpressions and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter .
Parameters:
  sql - the SQL string
Parameters:
  updateCounts - the update count array
Parameters:
  parameters - the parameters



setExactMatchParameter
public void setExactMatchParameter(boolean exactMatchParameter)(Code)
Sets if the specified parameters must match exactly in order and number. Defaults to false, i.e. the specified parameters must be present in the actual parameter list of the prepared statement with the correct index but it's ok if there are more actual parameters.
Parameters:
  exactMatchParameter - must parameters match exactly



Methods inherited from com.mockrunner.jdbc.AbstractResultSetHandler
public void addExecutedStatement(String sql)(Code)(Java Doc)
public void addReturnedResultSet(MockResultSet resultSet)(Code)(Java Doc)
public void addReturnedResultSets(MockResultSet[] resultSets)(Code)(Java Doc)
public void clearGeneratedKeys()(Code)(Java Doc)
public void clearGlobalGeneratedKeys()(Code)(Java Doc)
public void clearGlobalResultSet()(Code)(Java Doc)
public void clearGlobalUpdateCount()(Code)(Java Doc)
public void clearResultSets()(Code)(Java Doc)
public void clearReturnsResultSet()(Code)(Java Doc)
public void clearThrowsSQLException()(Code)(Java Doc)
public void clearUpdateCounts()(Code)(Java Doc)
public MockResultSet createResultSet()(Code)(Java Doc)
public MockResultSet createResultSet(String id)(Code)(Java Doc)
public MockResultSet createResultSet(ResultSetFactory factory)(Code)(Java Doc)
public MockResultSet createResultSet(String id, ResultSetFactory factory)(Code)(Java Doc)
protected boolean getCaseSensitive()(Code)(Java Doc)
public boolean getContinueProcessingOnBatchFailure()(Code)(Java Doc)
protected boolean getExactMatch()(Code)(Java Doc)
public List getExecutedStatements()(Code)(Java Doc)
public MockResultSet getGeneratedKeys(String sql)(Code)(Java Doc)
public Map getGeneratedKeysMap()(Code)(Java Doc)
public MockResultSet getGlobalGeneratedKeys()(Code)(Java Doc)
public MockResultSet getGlobalResultSet()(Code)(Java Doc)
public MockResultSet[] getGlobalResultSets()(Code)(Java Doc)
public int getGlobalUpdateCount()(Code)(Java Doc)
public int[] getGlobalUpdateCounts()(Code)(Java Doc)
public MockResultSet getResultSet(String sql)(Code)(Java Doc)
public Map getResultSetMap()(Code)(Java Doc)
public MockResultSet[] getResultSets(String sql)(Code)(Java Doc)
public List getReturnedResultSets()(Code)(Java Doc)
public Boolean getReturnsResultSet(String sql)(Code)(Java Doc)
public SQLException getSQLException(String sql)(Code)(Java Doc)
public boolean getThrowsSQLException(String sql)(Code)(Java Doc)
public Integer getUpdateCount(String sql)(Code)(Java Doc)
public Map getUpdateCountMap()(Code)(Java Doc)
public Integer[] getUpdateCounts(String sql)(Code)(Java Doc)
protected boolean getUseRegularExpressions()(Code)(Java Doc)
public boolean hasMultipleGlobalResultSets()(Code)(Java Doc)
public boolean hasMultipleGlobalUpdateCounts()(Code)(Java Doc)
public boolean hasMultipleResultSets(String sql)(Code)(Java Doc)
public boolean hasMultipleUpdateCounts(String sql)(Code)(Java Doc)
public void prepareGeneratedKeys(String sql, MockResultSet generatedKeysResult)(Code)(Java Doc)
public void prepareGlobalGeneratedKeys(MockResultSet generatedKeysResult)(Code)(Java Doc)
public void prepareGlobalResultSet(MockResultSet resultSet)(Code)(Java Doc)
public void prepareGlobalResultSets(MockResultSet[] resultSets)(Code)(Java Doc)
public void prepareGlobalUpdateCount(int updateCount)(Code)(Java Doc)
public void prepareGlobalUpdateCounts(int[] updateCounts)(Code)(Java Doc)
public void prepareResultSet(String sql, MockResultSet resultSet)(Code)(Java Doc)
public void prepareResultSets(String sql, MockResultSet[] resultSets)(Code)(Java Doc)
public void prepareReturnsResultSet(String sql, boolean returnsResultSet)(Code)(Java Doc)
public void prepareThrowsSQLException(String sql)(Code)(Java Doc)
public void prepareThrowsSQLException(String sql, SQLException exc)(Code)(Java Doc)
public void prepareUpdateCount(String sql, int updateCount)(Code)(Java Doc)
public void prepareUpdateCounts(String sql, int[] updateCounts)(Code)(Java Doc)
public void setCaseSensitive(boolean caseSensitive)(Code)(Java Doc)
public void setContinueProcessingOnBatchFailure(boolean continueProcessingOnBatchFailure)(Code)(Java Doc)
public void setExactMatch(boolean exactMatch)(Code)(Java Doc)
public void setUseRegularExpressions(boolean useRegularExpressions)(Code)(Java Doc)

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.