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


org.apache.derbyTesting.junit.BaseJDBCTestSetup
   org.apache.derbyTesting.functionTests.tests.jdbc4.CallableStatementTestSetup

CallableStatementTestSetup
public class CallableStatementTestSetup extends BaseJDBCTestSetup (Code)
Create the necessary tables, function and procedures for running the CallableStatement tests under JDK 1.6. Java methods used as functions and procedures are also implemented here, along with helper methods that returns CallableStatements for the various functions and procedures.


Field Summary
final public static  intSQL_NULL_ID
     Id for row with SQL NULL values.
final public static  StringSTRING_BYTES
     String converted to bytes in UTF-16BE representation.
final public static  intSTRING_BYTES_ID
     Id for row with byte representation of a string.

Constructor Summary
public  CallableStatementTestSetup(Test test)
     Create a new test setup for the CallableStatementTest.

Method Summary
public static  voidgetBinaryDirect(String inputString, byte[][] outputByte)
     Procedure creating a byte representation of a string.
public static  CallableStatementgetBinaryDirectProcedure(Connection con)
     Return statement for calling procedure that converts a string to a byte array (UTF-16BE charset).
public static  byte[]getBinaryFromDb(int id)
     Function fetching binary data from the database.
Parameters:
  id - id of row to fetch.
public static  CallableStatementgetBinaryFromDbFunction(Connection con)
     Return statement for calling getBinaryFromDb function. Parameter 1: return/output - byte[]/VARCHAR FOR BINARY - data from db Parameter 2: input - int/INT - id for row to fetch
Parameters:
  con - database connection.
public static  CallableStatementgetIntToStringFunction(Connection con)
     Return function converting an integer to a string.
public static  StringgetVarcharFromDb(int id)
     Function fetching character data from the database.
Parameters:
  id - id of row to fetch.
public static  CallableStatementgetVarcharFromDbFunction(Connection con)
     Return statement for calling getVarcharFromDb function. Parameter 1: return/output - String/VARCHAR - data from db Parameter 2: input - int/INT - id for row to fetch
Parameters:
  con - database connection.
protected  voidsetUp()
    
protected  voidtearDown()
    

Field Detail
SQL_NULL_ID
final public static int SQL_NULL_ID(Code)
Id for row with SQL NULL values.



STRING_BYTES
final public static String STRING_BYTES(Code)
String converted to bytes in UTF-16BE representation. Note that the charset used matters, and for Derby it must be UTF-16BE.



STRING_BYTES_ID
final public static int STRING_BYTES_ID(Code)
Id for row with byte representation of a string.




Constructor Detail
CallableStatementTestSetup
public CallableStatementTestSetup(Test test)(Code)
Create a new test setup for the CallableStatementTest.
Parameters:
  test - the test/suite to provide setup for.




Method Detail
getBinaryDirect
public static void getBinaryDirect(String inputString, byte[][] outputByte)(Code)
Procedure creating a byte representation of a string.
Parameters:
  inputString - a string.
Parameters:
  outputByte - string returned as UTF-16BE byte representation.



getBinaryDirectProcedure
public static CallableStatement getBinaryDirectProcedure(Connection con) throws SQLException(Code)
Return statement for calling procedure that converts a string to a byte array (UTF-16BE charset). Parameter 1: input - String/VARCHAR(40) Parameter 2: output - byte[]/VARCHAR(160) FOR BIT DATA



getBinaryFromDb
public static byte[] getBinaryFromDb(int id) throws Exception(Code)
Function fetching binary data from the database.
Parameters:
  id - id of row to fetch. a byte array.



getBinaryFromDbFunction
public static CallableStatement getBinaryFromDbFunction(Connection con) throws SQLException(Code)
Return statement for calling getBinaryFromDb function. Parameter 1: return/output - byte[]/VARCHAR FOR BINARY - data from db Parameter 2: input - int/INT - id for row to fetch
Parameters:
  con - database connection. statement for executing getBinaryFromDb function.



getIntToStringFunction
public static CallableStatement getIntToStringFunction(Connection con) throws SQLException(Code)
Return function converting an integer to a string. Parameter 1: output - String/VARCHAR Parameter 2: input - int/INT



getVarcharFromDb
public static String getVarcharFromDb(int id) throws Exception(Code)
Function fetching character data from the database.
Parameters:
  id - id of row to fetch. a string.



getVarcharFromDbFunction
public static CallableStatement getVarcharFromDbFunction(Connection con) throws SQLException(Code)
Return statement for calling getVarcharFromDb function. Parameter 1: return/output - String/VARCHAR - data from db Parameter 2: input - int/INT - id for row to fetch
Parameters:
  con - database connection. statement for executing getVarcharFromDb function.



setUp
protected void setUp() throws SQLException(Code)



tearDown
protected void tearDown() throws Exception(Code)



Methods inherited from org.apache.derbyTesting.junit.BaseJDBCTestSetup
final public Connection getConnection() throws SQLException(Code)(Java Doc)
final public TestConfiguration getTestConfiguration()(Code)(Java Doc)
public void println(String text)(Code)(Java Doc)
protected void tearDown() throws java.lang.Exception(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.