Java Doc for SURTest.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.functionTests.tests.jdbcapi.SURBaseTest
   org.apache.derbyTesting.functionTests.tests.jdbcapi.SURTest

SURTest
public class SURTest extends SURBaseTest (Code)
Tests for variants of scrollable updatable resultsets.
author:
   Andreas Korneliussen



Constructor Summary
public  SURTest(String name)
    

Method Summary
public static  Testsuite()
    
protected  voidtearDown()
    
public  voidtestConcurrencyModeWarning1()
     Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE.
public  voidtestConcurrencyModeWarning2()
     Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE.
public  voidtestCursorOperationConflictWarning1()
     Test that you get cursor operation conflict warning if updating a row which has been deleted from the table.
public  voidtestCursorOperationConflictWarning2()
     Test that you get cursor operation conflict warning if updating a row which has been deleted from the table, now using positioned updates / deletes.
public  voidtestCursorStateAfterCommit1()
     Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
public  voidtestCursorStateAfterCommit2()
     Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
public  voidtestCursorStateAfterCommit3()
     Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
public  voidtestCursorStateAfterCommit4()
     Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
public  voidtestDetectabilityExceptions()
     Test that the JDBC detectability calls throw correct exceptions when called in in wrong row states.
public  voidtestDowngradeToScrollReadOnly()
     DERBY-1481 - ResultSet.beforeFirst() gives protocol error on scrollable, updatable result sets that are downgraded to read-only Check that no exception is thrown when calling positioning methods on a result set that has been downgraded to read-only.
public  voidtestFailOnUpdateOfReadOnlyResultSet1()
     Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.
public  voidtestFailOnUpdateOfReadOnlyResultSet2()
     Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.
public  voidtestFailOnUpdateOfReadOnlyResultSet3()
     Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.
public  voidtestFailOnUpdateOfReadOnlyResultSet4()
     Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.
public  voidtestFailOnUpdateOfReadOnlyResultSet5()
     Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.
public  voidtestForUpdateException1()
     Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable.
public  voidtestForUpdateException2()
     Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable.
public  voidtestForwardOnlyConcurUpdatableWithForUpdate1()
    
public  voidtestForwardOnlyConcurUpdatableWithoutForUpdate1()
    
public  voidtestForwardOnlyReadOnly1()
    
public  voidtestIndexedScrollInsensitiveUpdateCursorWithForUpdate1()
     Test that you can scroll forward and update indexed records in the scrollable ResultSet (using FOR UPDATE).
public  voidtestIndexedScrollInsensitiveUpdateCursorWithoutForUpdate1()
     Test that you can scroll forward and update indexed records in the scrollable ResultSet (not using FOR UPDATE).
public  voidtestIndexedUpdateCursor1()
    
public  voidtestIndexedUpdateCursor2()
     Test that you can scroll forward and update indexed records in the ResultSet (using FOR UPDATE).
public  voidtestInsertRowWithScrollCursor()
     Tests that it is possible to move using positioning methods after moveToInsertRow and that it is possible to delete a row after positioning back from insertRow.
public  voidtestMultiUpdateRow1()
     Test that you can correctly run multiple updateXXX() + updateRow() combined with cancelRowUpdates().
public  voidtestMultiUpdateRow2()
     Test that you can correctly run multiple updateNull() + updateRow() combined with cancelRowUpdates().
public  voidtestMultipleKeyUpdates()
    
public  voidtestOtherAndOwnPrimaryKeyUpdate1()
     Test update of a keyed record using other both the scrollable updatable resultset and using another statement object.
public  voidtestOtherPrimaryKeyUpdate1()
     Test update of a keyed record using other statement object.
public  voidtestOtherSecondaryKeyUpdate1()
     Test update indexed records using other statement object and using resultset.
public  voidtestPositionedUpdateWithForUpdate1()
    
public  voidtestPositionedUpdateWithoutForUpdate1()
    
public  voidtestPrimaryKeyUpdate1()
     Test update of a keyed record using scrollable updatable resultset.
public  voidtestRowUpdatedAndRowDeleted()
     Test that rowUpdated() and rowDeleted() methods both return true when the row has first been updated and then deleted using the updateRow() and deleteRow() methods.
public  voidtestScrollInsensitiveConcurUpdatableWithForUpdate1()
    
public  voidtestScrollInsensitiveConcurUpdatableWithForUpdate2()
     Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward.
public  voidtestScrollInsensitiveConcurUpdatableWithForUpdate3()
     Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward.
public  voidtestScrollInsensitiveConcurUpdatableWithoutForUpdate1()
    
public  voidtestScrollInsensitiveConcurUpdatableWithoutForUpdate2()
     Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward.
public  voidtestScrollInsensitiveConcurUpdatableWithoutForUpdate3()
     Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward.
public  voidtestScrollInsensitiveReadOnly1()
    
public  voidtestScrollablePositionedUpdateWithForUpdate1()
    
public  voidtestSecondaryIndexKeyUpdate1()
    


Constructor Detail
SURTest
public SURTest(String name)(Code)
Creates a new instance of SURTest




Method Detail
suite
public static Test suite()(Code)
The suite contains all testcases in this class running on different data models



tearDown
protected void tearDown() throws Exception(Code)



testConcurrencyModeWarning1
public void testConcurrencyModeWarning1() throws SQLException(Code)
Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE. In this case, the query contains an "order by"



testConcurrencyModeWarning2
public void testConcurrencyModeWarning2() throws SQLException(Code)
Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE. In this case, the query contains a join.



testCursorOperationConflictWarning1
public void testCursorOperationConflictWarning1() throws SQLException(Code)
Test that you get cursor operation conflict warning if updating a row which has been deleted from the table.



testCursorOperationConflictWarning2
public void testCursorOperationConflictWarning2() throws SQLException(Code)
Test that you get cursor operation conflict warning if updating a row which has been deleted from the table, now using positioned updates / deletes.



testCursorStateAfterCommit1
public void testCursorStateAfterCommit1() throws SQLException(Code)
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a FORWARD_ONLY resultset and ResultSet update methods when doing the update.



testCursorStateAfterCommit2
public void testCursorStateAfterCommit2() throws SQLException(Code)
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a SCROLL_INSENSITIVE resultset and ResultSet update methods when doing the update.



testCursorStateAfterCommit3
public void testCursorStateAfterCommit3() throws SQLException(Code)
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a FORWARD_ONLY resultset and positioned updates.



testCursorStateAfterCommit4
public void testCursorStateAfterCommit4() throws SQLException(Code)
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a SCROLL_INSENSITIVE resultset and positioned updates.



testDetectabilityExceptions
public void testDetectabilityExceptions() throws SQLException(Code)
Test that the JDBC detectability calls throw correct exceptions when called in in wrong row states. This is done for both supported updatable result set types.



testDowngradeToScrollReadOnly
public void testDowngradeToScrollReadOnly() throws SQLException(Code)
DERBY-1481 - ResultSet.beforeFirst() gives protocol error on scrollable, updatable result sets that are downgraded to read-only Check that no exception is thrown when calling positioning methods on a result set that has been downgraded to read-only.



testFailOnUpdateOfReadOnlyResultSet1
public void testFailOnUpdateOfReadOnlyResultSet1() throws SQLException(Code)
Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.



testFailOnUpdateOfReadOnlyResultSet2
public void testFailOnUpdateOfReadOnlyResultSet2() throws SQLException(Code)
Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.



testFailOnUpdateOfReadOnlyResultSet3
public void testFailOnUpdateOfReadOnlyResultSet3() throws SQLException(Code)
Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.



testFailOnUpdateOfReadOnlyResultSet4
public void testFailOnUpdateOfReadOnlyResultSet4() throws SQLException(Code)
Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.



testFailOnUpdateOfReadOnlyResultSet5
public void testFailOnUpdateOfReadOnlyResultSet5() throws SQLException(Code)
Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.



testForUpdateException1
public void testForUpdateException1() throws SQLException(Code)
Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable. In this case, the query contains and order by.



testForUpdateException2
public void testForUpdateException2() throws SQLException(Code)
Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable. In this case, the query contains a join



testForwardOnlyConcurUpdatableWithForUpdate1
public void testForwardOnlyConcurUpdatableWithForUpdate1() throws SQLException(Code)
Test updating a forward only resultset (with FOR UPDATE)



testForwardOnlyConcurUpdatableWithoutForUpdate1
public void testForwardOnlyConcurUpdatableWithoutForUpdate1() throws SQLException(Code)
Test updating a forward only resultset (without FOR UPDATE)



testForwardOnlyReadOnly1
public void testForwardOnlyReadOnly1() throws SQLException(Code)
Test that you can scroll forward and read all records in the ResultSet



testIndexedScrollInsensitiveUpdateCursorWithForUpdate1
public void testIndexedScrollInsensitiveUpdateCursorWithForUpdate1() throws SQLException(Code)
Test that you can scroll forward and update indexed records in the scrollable ResultSet (using FOR UPDATE).



testIndexedScrollInsensitiveUpdateCursorWithoutForUpdate1
public void testIndexedScrollInsensitiveUpdateCursorWithoutForUpdate1() throws SQLException(Code)
Test that you can scroll forward and update indexed records in the scrollable ResultSet (not using FOR UPDATE).



testIndexedUpdateCursor1
public void testIndexedUpdateCursor1() throws SQLException(Code)
Test that you can scroll forward and update indexed records in the ResultSet (not using FOR UPDATE)



testIndexedUpdateCursor2
public void testIndexedUpdateCursor2() throws SQLException(Code)
Test that you can scroll forward and update indexed records in the ResultSet (using FOR UPDATE).



testInsertRowWithScrollCursor
public void testInsertRowWithScrollCursor() throws SQLException(Code)
Tests that it is possible to move using positioning methods after moveToInsertRow and that it is possible to delete a row after positioning back from insertRow. Also tests that it is possible to insert a row when positioned on insert row, that it is not possible to update or delete a row from insertRow and that it also is not possible to insert a row without being on insert row.



testMultiUpdateRow1
public void testMultiUpdateRow1() throws SQLException(Code)
Test that you can correctly run multiple updateXXX() + updateRow() combined with cancelRowUpdates().



testMultiUpdateRow2
public void testMultiUpdateRow2() throws SQLException(Code)
Test that you can correctly run multiple updateNull() + updateRow() combined with cancelRowUpdates().



testMultipleKeyUpdates
public void testMultipleKeyUpdates() throws SQLException(Code)
Update multiple keyed records using scrollable updatable resultset



testOtherAndOwnPrimaryKeyUpdate1
public void testOtherAndOwnPrimaryKeyUpdate1() throws SQLException(Code)
Test update of a keyed record using other both the scrollable updatable resultset and using another statement object.



testOtherPrimaryKeyUpdate1
public void testOtherPrimaryKeyUpdate1() throws SQLException(Code)
Test update of a keyed record using other statement object.



testOtherSecondaryKeyUpdate1
public void testOtherSecondaryKeyUpdate1() throws SQLException(Code)
Test update indexed records using other statement object and using resultset.



testPositionedUpdateWithForUpdate1
public void testPositionedUpdateWithForUpdate1() throws SQLException(Code)
Test updating a forward only resultset (with FOR UPDATE) and using positioned update



testPositionedUpdateWithoutForUpdate1
public void testPositionedUpdateWithoutForUpdate1() throws SQLException(Code)
Test updating a forward only resultset (without FOR UPDATE) and using positioned update



testPrimaryKeyUpdate1
public void testPrimaryKeyUpdate1() throws SQLException(Code)
Test update of a keyed record using scrollable updatable resultset.



testRowUpdatedAndRowDeleted
public void testRowUpdatedAndRowDeleted() throws SQLException(Code)
Test that rowUpdated() and rowDeleted() methods both return true when the row has first been updated and then deleted using the updateRow() and deleteRow() methods.



testScrollInsensitiveConcurUpdatableWithForUpdate1
public void testScrollInsensitiveConcurUpdatableWithForUpdate1() throws SQLException(Code)
Test update of a scrollable resultset (with FOR UPDATE) Only scrolling forward



testScrollInsensitiveConcurUpdatableWithForUpdate2
public void testScrollInsensitiveConcurUpdatableWithForUpdate2() throws SQLException(Code)
Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward.



testScrollInsensitiveConcurUpdatableWithForUpdate3
public void testScrollInsensitiveConcurUpdatableWithForUpdate3() throws SQLException(Code)
Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward. Then open another resultset and verify the data.



testScrollInsensitiveConcurUpdatableWithoutForUpdate1
public void testScrollInsensitiveConcurUpdatableWithoutForUpdate1() throws SQLException(Code)
Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward only



testScrollInsensitiveConcurUpdatableWithoutForUpdate2
public void testScrollInsensitiveConcurUpdatableWithoutForUpdate2() throws SQLException(Code)
Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward.



testScrollInsensitiveConcurUpdatableWithoutForUpdate3
public void testScrollInsensitiveConcurUpdatableWithoutForUpdate3() throws SQLException(Code)
Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward. Then open another resultset and verify the data.



testScrollInsensitiveReadOnly1
public void testScrollInsensitiveReadOnly1() throws SQLException(Code)
Test scrolling in a read only resultset



testScrollablePositionedUpdateWithForUpdate1
public void testScrollablePositionedUpdateWithForUpdate1() throws SQLException(Code)
Test positioned update of a scrollable resultset (with FOR UPDATE)



testSecondaryIndexKeyUpdate1
public void testSecondaryIndexKeyUpdate1() throws SQLException(Code)
Test update indexed records using scrollable updatable resultset



Fields inherited from org.apache.derbyTesting.functionTests.tests.jdbcapi.SURBaseTest
final static String CURSOR_NOT_POSITIONED_ON_INSERT_ROW(Code)(Java Doc)
final static String CURSOR_NOT_UPDATABLE_SQL_STATE(Code)(Java Doc)
final static String CURSOR_OPERATION_CONFLICT(Code)(Java Doc)
final static String FOR_UPDATE_NOT_PERMITTED_SQL_STATE(Code)(Java Doc)
final static String INVALID_CURSOR_STATE_NO_CURRENT_ROW(Code)(Java Doc)
final static String LOCK_TIMEOUT_EXPRESSION_SQL_STATE(Code)(Java Doc)
final static String LOCK_TIMEOUT_SQL_STATE(Code)(Java Doc)
final static String QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET(Code)(Java Doc)
final static String RESULTSET_NOT_UPDATABLE_SQL_STATE(Code)(Java Doc)
protected Connection con(Code)(Java Doc)
final int recordCount(Code)(Java Doc)

Methods inherited from org.apache.derbyTesting.functionTests.tests.jdbcapi.SURBaseTest
protected void assertFailOnUpdate(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void assertWarning(SQLWarning warn, String sqlState) throws SQLException(Code)(Java Doc)
protected void initializeConnection(Connection conn) throws SQLException(Code)(Java Doc)
protected void scrollBackward(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void scrollBackwardAndUpdate(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void scrollBackwardAndUpdatePositioned(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void scrollForward(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void scrollForwardAndUpdate(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void scrollForwardAndUpdatePositioned(ResultSet rs) throws SQLException(Code)(Java Doc)
public void setUp() throws Exception(Code)(Java Doc)
protected void updateTuple(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void updateTuplePositioned(ResultSet rs) throws SQLException(Code)(Java Doc)
protected void verifyTuple(ResultSet rs) throws SQLException(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.