Java Doc for AbstractResultSetHandler.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

All known Subclasses:   com.mockrunner.jdbc.StatementResultSetHandler,  com.mockrunner.jdbc.AbstractParameterResultSetHandler,
AbstractResultSetHandler
abstract public class AbstractResultSetHandler (Code)
Abstract base class for all ResultSet handlers. Used to coordinate ResultSet objects for a statement. You can use this class to prepare ResultSet objects and update count values that are returned by the execute method of a statement, if the current SQL string matches. Furthermore it can be used to create ResultSet objects. Please note that the ResultSet objects you create and prepare with this handler are cloned when executing statements. So you cannot rely on object identity. You have to use the id of the ResultSet to identify it. The ResultSet objects returned by AbstractResultSetHandler.getReturnedResultSets are actually the instances the executed statements returned.




Method Summary
public  voidaddExecutedStatement(String sql)
     Collects all SQL strings that were executed.
public  voidaddReturnedResultSet(MockResultSet resultSet)
     Collects all ResultSet objects that were returned by a Statement, PreparedStatement or CallableStatement.
public  voidaddReturnedResultSets(MockResultSet[] resultSets)
     Collects all ResultSet[] objects that were returned by a Statement, PreparedStatement or CallableStatement.
public  voidclearGeneratedKeys()
     Clears the list of statements that return generated keys.
public  voidclearGlobalGeneratedKeys()
     Clears the prepared global generated keys ResultSet.
public  voidclearGlobalResultSet()
     Clears the prepared global ResultSet.
public  voidclearGlobalUpdateCount()
     Clears the prepared global update count.
public  voidclearResultSets()
     Clears all prepared ResultSet objects.
public  voidclearReturnsResultSet()
     Clears the definitions if statements return ResultSet objects or update counts.
public  voidclearThrowsSQLException()
     Clears the list of statements that should throw an exception.
public  voidclearUpdateCounts()
     Clears all prepared update counts.
public  MockResultSetcreateResultSet()
     Creates a new ResultSet with a random id.
public  MockResultSetcreateResultSet(String id)
     Creates a new ResultSet with the specified id.
public  MockResultSetcreateResultSet(ResultSetFactory factory)
     Returns a new ResultSet created by the specified factory.
public  MockResultSetcreateResultSet(String id, ResultSetFactory factory)
     Returns a new ResultSet created by the specified factory.
protected  booleangetCaseSensitive()
     Returns if specified SQL strings should be handled case sensitive.
public  booleangetContinueProcessingOnBatchFailure()
     Returns if batch processing should be continued if one of the commands in the batch fails.
protected  booleangetExactMatch()
     Returns if specified SQL statements must match exactly.
public  ListgetExecutedStatements()
     Returns the List of all executed SQL strings.
public  MockResultSetgetGeneratedKeys(String sql)
     Returns the first generated keys ResultSet that matches the specified SQL string.
public  MapgetGeneratedKeysMap()
     Returns the Map of all generated keys ResultSet objects, that were added with AbstractResultSetHandler.prepareGeneratedKeys(String,MockResultSet) .
public  MockResultSetgetGlobalGeneratedKeys()
     Returns the global generated keys ResultSet.
public  MockResultSetgetGlobalResultSet()
     Returns the global ResultSet.
public  MockResultSet[]getGlobalResultSets()
     Returns the global ResultSet[].
public  intgetGlobalUpdateCount()
     Returns the global update count for executeUpdate calls.
public  int[]getGlobalUpdateCounts()
     Returns the array of global update counts.
public  MockResultSetgetResultSet(String sql)
     Returns the first ResultSet that matches the specified SQL string.
public  MapgetResultSetMap()
     Returns the Map of all ResultSet objects, that were added with AbstractResultSetHandler.prepareResultSet(String,MockResultSet) .
public  MockResultSet[]getResultSets(String sql)
     Returns the first ResultSet[] that matches the specified SQL string.
public  ListgetReturnedResultSets()
     Returns the List of all returned ResultSet or ResultSet[] objects.
public  BooleangetReturnsResultSet(String sql)
     Returns if the specified SQL string is a select that returns a ResultSet.
public  SQLExceptiongetSQLException(String sql)
     Returns the SQLException the specified SQL string should throw.
public  booleangetThrowsSQLException(String sql)
     Returns if the specified SQL string should raise an exception.
public  IntegergetUpdateCount(String sql)
     Returns the first update count that matches the specified SQL string.
public  MapgetUpdateCountMap()
     Returns the Map of all update counts, that were added with AbstractResultSetHandler.prepareUpdateCount(String,int) .
public  Integer[]getUpdateCounts(String sql)
     Returns the first update count array that matches the specified SQL string.
protected  booleangetUseRegularExpressions()
    
public  booleanhasMultipleGlobalResultSets()
     Returns if multiple global result sets have been prepared, i.e.
public  booleanhasMultipleGlobalUpdateCounts()
     Returns if multiple global update counts have been prepared, i.e.
public  booleanhasMultipleResultSets(String sql)
     Returns the if the specified SQL string returns multiple result sets.
public  booleanhasMultipleUpdateCounts(String sql)
     Returns the if the specified SQL string returns multiple update counts.
public  voidprepareGeneratedKeys(String sql, MockResultSet generatedKeysResult)
     Prepare the generated keys ResultSet for a specified SQL string.
public  voidprepareGlobalGeneratedKeys(MockResultSet generatedKeysResult)
     Prepare the global generated keys ResultSet.
public  voidprepareGlobalResultSet(MockResultSet resultSet)
     Prepare the global ResultSet.
public  voidprepareGlobalResultSets(MockResultSet[] resultSets)
     Prepare an array of global ResultSet objects.
public  voidprepareGlobalUpdateCount(int updateCount)
     Prepare the global update count for executeUpdate calls.
public  voidprepareGlobalUpdateCounts(int[] updateCounts)
     Prepare an array of global update count values for executeUpdate calls.
public  voidprepareResultSet(String sql, MockResultSet resultSet)
     Prepare a ResultSet for a specified SQL string.
public  voidprepareResultSets(String sql, MockResultSet[] resultSets)
     Prepare an array of ResultSet objects for a specified SQL string.
public  voidprepareReturnsResultSet(String sql, boolean returnsResultSet)
     Prepare if the specified SQL string is a select that returns a ResultSet.
public  voidprepareThrowsSQLException(String sql)
     Prepare that the specified SQL string should raise an exception. This can be used to simulate database exceptions.
public  voidprepareThrowsSQLException(String sql, SQLException exc)
     Prepare that the specified SQL string should raise an exception. This can be used to simulate database exceptions.
public  voidprepareUpdateCount(String sql, int updateCount)
     Prepare the update count for executeUpdate calls for a specified SQL string.
public  voidprepareUpdateCounts(String sql, int[] updateCounts)
     Prepare an array update count values for executeUpdate calls for a specified SQL string.
public  voidsetCaseSensitive(boolean caseSensitive)
     Set if specified SQL strings should be handled case sensitive. Defaults to to false, i.e.
public  voidsetContinueProcessingOnBatchFailure(boolean continueProcessingOnBatchFailure)
     Set if batch processing should be continued if one of the commands in the batch fails.
public  voidsetExactMatch(boolean exactMatch)
     Set if specified SQL statements must match exactly. Defaults to false, i.e.
public  voidsetUseRegularExpressions(boolean useRegularExpressions)
     Set if regular expressions should be used when matching SQL statements.



Method Detail
addExecutedStatement
public void addExecutedStatement(String sql)(Code)
Collects all SQL strings that were executed.
Parameters:
  sql - the SQL string



addReturnedResultSet
public void addReturnedResultSet(MockResultSet resultSet)(Code)
Collects all ResultSet objects that were returned by a Statement, PreparedStatement or CallableStatement.
Parameters:
  resultSet - the ResultSet



addReturnedResultSets
public void addReturnedResultSets(MockResultSet[] resultSets)(Code)
Collects all ResultSet[] objects that were returned by a Statement, PreparedStatement or CallableStatement. Called if a statement returns multiple result sets.
Parameters:
  resultSets - the ResultSet[]



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



clearGlobalGeneratedKeys
public void clearGlobalGeneratedKeys()(Code)
Clears the prepared global generated keys ResultSet.



clearGlobalResultSet
public void clearGlobalResultSet()(Code)
Clears the prepared global ResultSet.



clearGlobalUpdateCount
public void clearGlobalUpdateCount()(Code)
Clears the prepared global update count.



clearResultSets
public void clearResultSets()(Code)
Clears all prepared ResultSet objects.



clearReturnsResultSet
public void clearReturnsResultSet()(Code)
Clears the definitions if statements return ResultSet objects or update counts.



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



clearUpdateCounts
public void clearUpdateCounts()(Code)
Clears all prepared update counts.



createResultSet
public MockResultSet createResultSet()(Code)
Creates a new ResultSet with a random id. the new ResultSet



createResultSet
public MockResultSet createResultSet(String id)(Code)
Creates a new ResultSet with the specified id.
Parameters:
  id - the id the new ResultSet



createResultSet
public MockResultSet createResultSet(ResultSetFactory factory)(Code)
Returns a new ResultSet created by the specified factory. Creates a random id.
Parameters:
  factory - the ResultSetFactory the new ResultSet



createResultSet
public MockResultSet createResultSet(String id, ResultSetFactory factory)(Code)
Returns a new ResultSet created by the specified factory.
Parameters:
  id - the id
Parameters:
  factory - the ResultSetFactory the new ResultSet



getCaseSensitive
protected boolean getCaseSensitive()(Code)
Returns if specified SQL strings should be handled case sensitive. is case sensitivity enabled or disabled



getContinueProcessingOnBatchFailure
public boolean getContinueProcessingOnBatchFailure()(Code)
Returns if batch processing should be continued if one of the commands in the batch fails. if batch processing should be continued



getExactMatch
protected boolean getExactMatch()(Code)
Returns if specified SQL statements must match exactly. is exact matching enabled or disabled



getExecutedStatements
public List getExecutedStatements()(Code)
Returns the List of all executed SQL strings. the List of executed SQL strings



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



getGeneratedKeysMap
public Map getGeneratedKeysMap()(Code)
Returns the Map of all generated keys ResultSet objects, that were added with AbstractResultSetHandler.prepareGeneratedKeys(String,MockResultSet) . The SQL strings map to the corresponding generated keys ResultSet. the Map of generated keys ResultSet objects



getGlobalGeneratedKeys
public MockResultSet getGlobalGeneratedKeys()(Code)
Returns the global generated keys ResultSet. the global generated keys MockResultSet



getGlobalResultSet
public MockResultSet getGlobalResultSet()(Code)
Returns the global ResultSet. If an array of global result sets was prepared, the first one will be returned. the global MockResultSet



getGlobalResultSets
public MockResultSet[] getGlobalResultSets()(Code)
Returns the global ResultSet[]. If one single ResultSet was prepared, this ResultSet will be wrapped in an array with one element. the global MockResultSet[]



getGlobalUpdateCount
public int getGlobalUpdateCount()(Code)
Returns the global update count for executeUpdate calls. If an array of global update counts was prepared, the first one will be returned. the global update count



getGlobalUpdateCounts
public int[] getGlobalUpdateCounts()(Code)
Returns the array of global update counts. If one single update count value was prepared, this value will be wrapped in an array with one element. the array of global update counts



getResultSet
public MockResultSet getResultSet(String sql)(Code)
Returns the first ResultSet that matches the specified SQL string. 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 AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string the corresponding MockResultSet



getResultSetMap
public Map getResultSetMap()(Code)
Returns the Map of all ResultSet objects, that were added with AbstractResultSetHandler.prepareResultSet(String,MockResultSet) . The SQL strings map to the corresponding ResultSet. the Map of ResultSet objects



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



getReturnedResultSets
public List getReturnedResultSets()(Code)
Returns the List of all returned ResultSet or ResultSet[] objects. The List contains arrays of result sets, if a query returned multiple result sets. If a query returned multiple result sets, the list will always contain the full array of ResultSet objects that were prepared, even if com.mockrunner.mock.jdbc.MockStatement.getMoreResults was not called for all the result sets. the List of returned ResultSet or ResultSet[] objects



getReturnsResultSet
public Boolean getReturnsResultSet(String sql)(Code)
Returns if the specified SQL string is a select that returns a ResultSet. Usually you do not have to specify this. It is assumed that an SQL string returns a ResultSet if it contains the string select (case insensitive). Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string true if the SQL string returns a ResultSet



getSQLException
public SQLException getSQLException(String sql)(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 AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string the SQLException or null



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



getUpdateCount
public Integer getUpdateCount(String sql)(Code)
Returns the first update count that matches the specified SQL string. 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 AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string the corresponding update count



getUpdateCountMap
public Map getUpdateCountMap()(Code)
Returns the Map of all update counts, that were added with AbstractResultSetHandler.prepareUpdateCount(String,int) . The SQL strings map to the corresponding update count as Integer object. the Map of ResultSet objects



getUpdateCounts
public Integer[] getUpdateCounts(String sql)(Code)
Returns the first update count array that matches the specified SQL string. 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 AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string the corresponding update count array



getUseRegularExpressions
protected boolean getUseRegularExpressions()(Code)
Returns if regular expression matching is enabled if regular expression matching is enabled



hasMultipleGlobalResultSets
public boolean hasMultipleGlobalResultSets()(Code)
Returns if multiple global result sets have been prepared, i.e. if an array of global result sets was prepared. true if an array of global result sets was prepared,false otherwise



hasMultipleGlobalUpdateCounts
public boolean hasMultipleGlobalUpdateCounts()(Code)
Returns if multiple global update counts have been prepared, i.e. if an array of global update counts was prepared. true if an array of global update counts was prepared,false otherwise



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



hasMultipleUpdateCounts
public boolean hasMultipleUpdateCounts(String sql)(Code)
Returns the if the specified SQL string returns multiple update counts. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.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)(Code)
Prepare the generated keys ResultSet for a specified SQL string. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  generatedKeysResult - the generated keys MockResultSet



prepareGlobalGeneratedKeys
public void prepareGlobalGeneratedKeys(MockResultSet generatedKeysResult)(Code)
Prepare the global generated keys ResultSet.
Parameters:
  generatedKeysResult - the generated keys MockResultSet



prepareGlobalResultSet
public void prepareGlobalResultSet(MockResultSet resultSet)(Code)
Prepare the global ResultSet.
Parameters:
  resultSet - the MockResultSet



prepareGlobalResultSets
public void prepareGlobalResultSets(MockResultSet[] resultSets)(Code)
Prepare an array of global ResultSet objects.
Parameters:
  resultSets - the corresponding MockResultSet[]



prepareGlobalUpdateCount
public void prepareGlobalUpdateCount(int updateCount)(Code)
Prepare the global update count for executeUpdate calls.
Parameters:
  updateCount - the update count



prepareGlobalUpdateCounts
public void prepareGlobalUpdateCounts(int[] updateCounts)(Code)
Prepare an array of global update count values for executeUpdate calls.
Parameters:
  updateCounts - the update count array



prepareResultSet
public void prepareResultSet(String sql, MockResultSet resultSet)(Code)
Prepare a ResultSet for a specified SQL string. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  resultSet - the corresponding MockResultSet



prepareResultSets
public void prepareResultSets(String sql, MockResultSet[] resultSets)(Code)
Prepare an array of ResultSet objects for a specified SQL string. This method can be used for queries that return multiple result sets. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  resultSets - the corresponding MockResultSet[]



prepareReturnsResultSet
public void prepareReturnsResultSet(String sql, boolean returnsResultSet)(Code)
Prepare if the specified SQL string is a select that returns a ResultSet. Usually you do not have to specify this. It is assumed that an SQL string returns a ResultSet if it contains the string select (case insensitive). Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  returnsResultSet - specify if the SQL string returns a ResultSet



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql)(Code)
Prepare that the specified SQL string should raise an exception. This can be used to simulate database exceptions. This method creates an SQLException and will throw this exception. With AbstractResultSetHandler.prepareThrowsSQLException(String,SQLException) you can specify the exception. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string



prepareThrowsSQLException
public void prepareThrowsSQLException(String sql, SQLException exc)(Code)
Prepare that the specified SQL string should raise an exception. This can be used to simulate database exceptions. This method takes an exception object that will be thrown. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  exc - the SQLException that should be thrown



prepareUpdateCount
public void prepareUpdateCount(String sql, int updateCount)(Code)
Prepare the update count for executeUpdate calls for a specified SQL string. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  updateCount - the update count



prepareUpdateCounts
public void prepareUpdateCounts(String sql, int[] updateCounts)(Code)
Prepare an array update count values for executeUpdate calls for a specified SQL string. This method can be used if multiple update counts are returned. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive , AbstractResultSetHandler.setExactMatch and AbstractResultSetHandler.setUseRegularExpressions .
Parameters:
  sql - the SQL string
Parameters:
  updateCounts - the update count array



setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)(Code)
Set if specified SQL strings should be handled case sensitive. Defaults to to false, i.e. INSERT is the same as insert. Please note that this method controls SQL statement matching for prepared results and update counts, i.e. what statements the tested application has to execute to receive a specified result. Unlike JDBCTestModule.setCaseSensitive(boolean) it does not control the statement matching of JDBCTestModule methods.
Parameters:
  caseSensitive - enable or disable case sensitivity



setContinueProcessingOnBatchFailure
public void setContinueProcessingOnBatchFailure(boolean continueProcessingOnBatchFailure)(Code)
Set if batch processing should be continued if one of the commands in the batch fails. This behaviour is driver dependend. The default is false, i.e. if a command fails with an exception, batch processing will not continue and the remaining commands will not be executed.
Parameters:
  continueProcessingOnBatchFailure - should batch processing be continued



setExactMatch
public void setExactMatch(boolean exactMatch)(Code)
Set if specified SQL statements must match exactly. Defaults to false, i.e. the SQL string does not need to match exactly. If the original statement is insert into mytable values(?, ?, ?) the string insert into mytable will match this statement. Usually false is the best choice, so prepared ResultSet objects do not have to match exactly the current statements SQL string. The current SQL string just has to contain the SQL string for the prepared prepared ResultSet. Please note that this method controls SQL statement matching for prepared results and update counts, i.e. what statements the tested application has to execute to receive a specified result. Unlike JDBCTestModule.setExactMatch(boolean) it does not control the statement matching of JDBCTestModule methods.
Parameters:
  exactMatch - enable or disable exact matching



setUseRegularExpressions
public void setUseRegularExpressions(boolean useRegularExpressions)(Code)
Set if regular expressions should be used when matching SQL statements. Irrelevant if exactMatch is true. Default is false, i.e. you cannot use regular expressions and matching is based on string comparison. Please note that this method controls SQL statement matching for prepared results and update counts, i.e. what statements the tested application has to execute to receive a specified result. Unlike JDBCTestModule.setUseRegularExpressions(boolean) it does not control the statement matching of JDBCTestModule methods.
Parameters:
  useRegularExpressions - should regular expressions be used



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.