Java Doc for ProcedureTest.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » functionTests » tests » jdbcapi » 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 » Database DBMS » db derby 10.2 » org.apache.derbyTesting.functionTests.tests.jdbcapi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derbyTesting.junit.BaseJDBCTestCase
   org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest

ProcedureTest
public class ProcedureTest extends BaseJDBCTestCase (Code)
Tests of stored procedures.



Constructor Summary
public  ProcedureTest(String name)
     Creates a new ProcedureTest instance.

Method Summary
public static  voidprocWithSideEffects(int returnResults, ResultSet[] rs1, ResultSet[] rs2)
     Stored procedure which inserts a row into SIMPLE_TABLE and optionally returns result sets.
public static  voidretrieveClosedResult(ResultSet[] closed)
     Stored procedure which produces a closed result set.
public static  voidretrieveDynamicResults(int number, ResultSet[] rs1, ResultSet[] rs2, ResultSet[] rs3, ResultSet[] rs4)
     Stored procedure which returns 0, 1, 2, 3 or 4 ResultSets.
public static  voidretrieveExternalResult(String dbName, String user, String password, ResultSet[] external)
     Stored procedure which produces a result set in another connection.
public  voidsetUp()
     Sets up the connection for a test case and clears all tables used in the test cases.
public static  Testsuite()
     Creates the test suite and wraps it in a TestSetup instance which sets up and tears down the test environment.
public  voidtestClosedDynamicResultSetsFromExecuteQuery()
     Tests that closed result sets are not returned when calling executeQuery().
public  voidtestClosedDynamicResultSetsFromExecuteUpdate()
     Tests that closed result sets are ignored when calling executeUpdate().
public  voidtestDynamicResultSetsFromOtherConnectionWithExecuteQuery()
     Tests that dynamic result sets from other connections are ignored when calling executeQuery.
public  voidtestDynamicResultSetsFromOtherConnectionWithExecuteUpdate()
     Tests that dynamic result sets from other connections are ignored when calling executeUpdate.
public  voidtestExecuteQueryWithMoreThanOneDynamicResultSet()
     Tests that Statement.executeQuery() fails when multiple result sets are returned.
public  voidtestExecuteQueryWithMoreThanOneDynamicResultSet_callable()
     Tests that CallableStatement.executeQuery() fails when multiple result sets are returned.
public  voidtestExecuteQueryWithMoreThanOneDynamicResultSet_prepared()
     Tests that PreparedStatement.executeQuery() fails when multiple result sets are returned.
public  voidtestExecuteQueryWithNoDynamicResultSets()
     Tests that Statement.executeQuery() fails when no result sets are returned.
public  voidtestExecuteQueryWithNoDynamicResultSets_callable()
     Tests that CallableStatement.executeQuery() fails when no result sets are returned.
public  voidtestExecuteQueryWithNoDynamicResultSets_prepared()
     Tests that PreparedStatement.executeQuery() fails when no result sets are returned.
public  voidtestExecuteQueryWithOneDynamicResultSet()
     Tests that Statement.executeQuery() succeeds when one result set is returned from a stored procedure.
public  voidtestExecuteQueryWithOneDynamicResultSet_callable()
     Tests that CallableStatement.executeQuery() succeeds when one result set is returned from a stored procedure.
public  voidtestExecuteQueryWithOneDynamicResultSet_prepared()
     Tests that PreparedStatement.executeQuery() succeeds when one result set is returned from a stored procedure.
public  voidtestExecuteUpdateWithOneDynamicResultSet()
     Tests that Statement.executeUpdate() fails when a result set is returned from a stored procedure.
public  voidtestExecuteUpdateWithOneDynamicResultSet_callable()
     Tests that CallableStatement.executeUpdate() fails when a result set is returned from a stored procedure.
public  voidtestRollbackStoredProcWithExecuteQuery()
     Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when Connection.rollback() is called.
public  voidtestRollbackStoredProcWithExecuteUpdate()
     Tests that the effects of executing a stored procedure with executeUpdate() are correctly rolled back when Connection.rollback() is called.
public  voidxtestExecuteUpdateWithNoDynamicResultSets()
     Tests that Statement.executeUpdate() succeeds when no result sets are returned.
public  voidxtestExecuteUpdateWithNoDynamicResultSets_callable()
     Tests that CallableStatement.executeUpdate() succeeds when no result sets are returned.
public  voidxtestExecuteUpdateWithNoDynamicResultSets_prepared()
     Tests that PreparedStatement.executeUpdate() succeeds when no result sets are returned.
public  voidxtestExecuteUpdateWithOneDynamicResultSet_prepared()
     Tests that PreparedStatement.executeUpdate() fails when a result set is returned from a stored procedure.

Currently, this test fails with JCC.

public  voidxtestRollbackStoredProcWhenExecuteQueryReturnsNothing()
     Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is zero.
public  voidxtestRollbackStoredProcWhenExecuteQueryReturnsNothing_prepared()
     Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is zero.
public  voidxtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch()
     Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is more than one.
public  voidxtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch_prepared()
     Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is more than one.
public  voidxtestRollbackStoredProcWhenExecuteUpdateReturnsResults()
     Tests that the effects of executing a stored procedure with executeUpdate() are correctly rolled back when the query fails because the stored procedure returned a result set.
public  voidxtestRollbackStoredProcWhenExecuteUpdateReturnsResults_prepared()
     Tests that the effects of executing a stored procedure with executeUpdate() are correctly rolled back when the query fails because the stored procedure returned a result set.


Constructor Detail
ProcedureTest
public ProcedureTest(String name)(Code)
Creates a new ProcedureTest instance.
Parameters:
  name - name of the test




Method Detail
procWithSideEffects
public static void procWithSideEffects(int returnResults, ResultSet[] rs1, ResultSet[] rs2) throws SQLException(Code)
Stored procedure which inserts a row into SIMPLE_TABLE and optionally returns result sets.
Parameters:
  returnResults - if one, return one result set; if greaterthan one, return two result sets; otherwise, return no resultset
Parameters:
  rs1 - first result set to return
Parameters:
  rs2 - second result set to return
exception:
  SQLException - if a database error occurs



retrieveClosedResult
public static void retrieveClosedResult(ResultSet[] closed) throws SQLException(Code)
Stored procedure which produces a closed result set.
Parameters:
  closed - holder for the closed result set
exception:
  SQLException - if a database error occurs



retrieveDynamicResults
public static void retrieveDynamicResults(int number, ResultSet[] rs1, ResultSet[] rs2, ResultSet[] rs3, ResultSet[] rs4) throws SQLException(Code)
Stored procedure which returns 0, 1, 2, 3 or 4 ResultSets.
Parameters:
  number - the number of ResultSets to return
Parameters:
  rs1 - first ResultSet
Parameters:
  rs2 - second ResultSet
Parameters:
  rs3 - third ResultSet
Parameters:
  rs4 - fourth ResultSet
exception:
  SQLException - if a database error occurs



retrieveExternalResult
public static void retrieveExternalResult(String dbName, String user, String password, ResultSet[] external) throws SQLException(Code)
Stored procedure which produces a result set in another connection.
Parameters:
  external - result set from another connection
exception:
  SQLException - if a database error occurs



setUp
public void setUp() throws SQLException(Code)
Sets up the connection for a test case and clears all tables used in the test cases.
exception:
  SQLException - if a database error occurs



suite
public static Test suite()(Code)
Creates the test suite and wraps it in a TestSetup instance which sets up and tears down the test environment. test suite



testClosedDynamicResultSetsFromExecuteQuery
public void testClosedDynamicResultSetsFromExecuteQuery() throws SQLException(Code)
Tests that closed result sets are not returned when calling executeQuery().
exception:
  SQLException - if a database error occurs



testClosedDynamicResultSetsFromExecuteUpdate
public void testClosedDynamicResultSetsFromExecuteUpdate() throws SQLException(Code)
Tests that closed result sets are ignored when calling executeUpdate().
exception:
  SQLException - if a database error occurs



testDynamicResultSetsFromOtherConnectionWithExecuteQuery
public void testDynamicResultSetsFromOtherConnectionWithExecuteQuery() throws SQLException(Code)
Tests that dynamic result sets from other connections are ignored when calling executeQuery.
exception:
  SQLException - if a database error occurs



testDynamicResultSetsFromOtherConnectionWithExecuteUpdate
public void testDynamicResultSetsFromOtherConnectionWithExecuteUpdate() throws SQLException(Code)
Tests that dynamic result sets from other connections are ignored when calling executeUpdate.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithMoreThanOneDynamicResultSet
public void testExecuteQueryWithMoreThanOneDynamicResultSet() throws SQLException(Code)
Tests that Statement.executeQuery() fails when multiple result sets are returned.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithMoreThanOneDynamicResultSet_callable
public void testExecuteQueryWithMoreThanOneDynamicResultSet_callable() throws SQLException(Code)
Tests that CallableStatement.executeQuery() fails when multiple result sets are returned.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithMoreThanOneDynamicResultSet_prepared
public void testExecuteQueryWithMoreThanOneDynamicResultSet_prepared() throws SQLException(Code)
Tests that PreparedStatement.executeQuery() fails when multiple result sets are returned.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithNoDynamicResultSets
public void testExecuteQueryWithNoDynamicResultSets() throws SQLException(Code)
Tests that Statement.executeQuery() fails when no result sets are returned.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithNoDynamicResultSets_callable
public void testExecuteQueryWithNoDynamicResultSets_callable() throws SQLException(Code)
Tests that CallableStatement.executeQuery() fails when no result sets are returned.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithNoDynamicResultSets_prepared
public void testExecuteQueryWithNoDynamicResultSets_prepared() throws SQLException(Code)
Tests that PreparedStatement.executeQuery() fails when no result sets are returned.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithOneDynamicResultSet
public void testExecuteQueryWithOneDynamicResultSet() throws SQLException(Code)
Tests that Statement.executeQuery() succeeds when one result set is returned from a stored procedure.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithOneDynamicResultSet_callable
public void testExecuteQueryWithOneDynamicResultSet_callable() throws SQLException(Code)
Tests that CallableStatement.executeQuery() succeeds when one result set is returned from a stored procedure.
exception:
  SQLException - if a database error occurs



testExecuteQueryWithOneDynamicResultSet_prepared
public void testExecuteQueryWithOneDynamicResultSet_prepared() throws SQLException(Code)
Tests that PreparedStatement.executeQuery() succeeds when one result set is returned from a stored procedure.
exception:
  SQLException - if a database error occurs



testExecuteUpdateWithOneDynamicResultSet
public void testExecuteUpdateWithOneDynamicResultSet() throws SQLException(Code)
Tests that Statement.executeUpdate() fails when a result set is returned from a stored procedure.
exception:
  SQLException - if a database error occurs



testExecuteUpdateWithOneDynamicResultSet_callable
public void testExecuteUpdateWithOneDynamicResultSet_callable() throws SQLException(Code)
Tests that CallableStatement.executeUpdate() fails when a result set is returned from a stored procedure.
exception:
  SQLException - if a database error occurs



testRollbackStoredProcWithExecuteQuery
public void testRollbackStoredProcWithExecuteQuery() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when Connection.rollback() is called.
exception:
  SQLException - if a database error occurs



testRollbackStoredProcWithExecuteUpdate
public void testRollbackStoredProcWithExecuteUpdate() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeUpdate() are correctly rolled back when Connection.rollback() is called.
exception:
  SQLException - if a database error occurs



xtestExecuteUpdateWithNoDynamicResultSets
public void xtestExecuteUpdateWithNoDynamicResultSets() throws SQLException(Code)
Tests that Statement.executeUpdate() succeeds when no result sets are returned.

Currently, this test fails with JCC.
exception:
  SQLException - if a database error occurs




xtestExecuteUpdateWithNoDynamicResultSets_callable
public void xtestExecuteUpdateWithNoDynamicResultSets_callable() throws SQLException(Code)
Tests that CallableStatement.executeUpdate() succeeds when no result sets are returned.

Currently, this test fails with JCC.
exception:
  SQLException - if a database error occurs




xtestExecuteUpdateWithNoDynamicResultSets_prepared
public void xtestExecuteUpdateWithNoDynamicResultSets_prepared() throws SQLException(Code)
Tests that PreparedStatement.executeUpdate() succeeds when no result sets are returned.

Currently, this test fails with JCC.
exception:
  SQLException - if a database error occurs




xtestExecuteUpdateWithOneDynamicResultSet_prepared
public void xtestExecuteUpdateWithOneDynamicResultSet_prepared() throws SQLException(Code)
Tests that PreparedStatement.executeUpdate() fails when a result set is returned from a stored procedure.

Currently, this test fails with JCC. However, the corresponding tests for Statement and CallableStatement succeed. Strange...
exception:
  SQLException - if a database error occurs




xtestRollbackStoredProcWhenExecuteQueryReturnsNothing
public void xtestRollbackStoredProcWhenExecuteQueryReturnsNothing() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is zero.

This test case fails with JCC.
exception:
  SQLException - if a database error occurs




xtestRollbackStoredProcWhenExecuteQueryReturnsNothing_prepared
public void xtestRollbackStoredProcWhenExecuteQueryReturnsNothing_prepared() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is zero.

This test case fails with JCC.
exception:
  SQLException - if a database error occurs




xtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch
public void xtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is more than one.

This test case fails with JCC.
exception:
  SQLException - if a database error occurs




xtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch_prepared
public void xtestRollbackStoredProcWhenExecuteQueryReturnsTooMuch_prepared() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeQuery() are correctly rolled back when the query fails because the number of returned result sets is more than one.

This test case fails with JCC.
exception:
  SQLException - if a database error occurs




xtestRollbackStoredProcWhenExecuteUpdateReturnsResults
public void xtestRollbackStoredProcWhenExecuteUpdateReturnsResults() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeUpdate() are correctly rolled back when the query fails because the stored procedure returned a result set.

This test case fails with JCC.
exception:
  SQLException - if a database error occurs




xtestRollbackStoredProcWhenExecuteUpdateReturnsResults_prepared
public void xtestRollbackStoredProcWhenExecuteUpdateReturnsResults_prepared() throws SQLException(Code)
Tests that the effects of executing a stored procedure with executeUpdate() are correctly rolled back when the query fails because the stored procedure returned a result set.

This test case fails with JCC.
exception:
  SQLException - if a database error occurs




Methods inherited from org.apache.derbyTesting.junit.BaseJDBCTestCase
public void assertCompileError(String sqlState, String query)(Code)(Java Doc)
public static void assertEquals(Blob b1, Blob b2) throws IOException, SQLException(Code)(Java Doc)
public static void assertEquals(Clob c1, Clob c2) throws IOException, SQLException(Code)(Java Doc)
public static void assertSQLState(String message, String expected, SQLException exception)(Code)(Java Doc)
public static void assertSQLState(String expected, SQLException exception)(Code)(Java Doc)
public void commit() throws SQLException(Code)(Java Doc)
public Statement createStatement() throws SQLException(Code)(Java Doc)
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc)
public Connection getConnection() throws SQLException(Code)(Java Doc)
public Connection getConnection(String databaseName, String connAttrs) throws SQLException(Code)(Java Doc)
public Connection getDefaultConnection(String connAttrs) throws SQLException(Code)(Java Doc)
protected void initializeConnection(Connection conn) throws SQLException(Code)(Java Doc)
public Connection openConnection(String databaseName) throws SQLException(Code)(Java Doc)
public Connection openDefaultConnection() throws SQLException(Code)(Java Doc)
public CallableStatement prepareCall(String sql) throws SQLException(Code)(Java Doc)
public PreparedStatement prepareStatement(String sql) throws SQLException(Code)(Java Doc)
public void rollback() throws SQLException(Code)(Java Doc)
public int runSQLCommands(String sqlCommands) throws UnsupportedEncodingException, SQLException(Code)(Java Doc)
public int runScript(InputStream script, String encoding) throws UnsupportedEncodingException, SQLException(Code)(Java Doc)
protected void tearDown() throws java.lang.Exception(Code)(Java Doc)
public static boolean usingDerbyNet()(Code)(Java Doc)
public static boolean usingDerbyNetClient()(Code)(Java Doc)
public static boolean usingEmbedded()(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.