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


java.lang.Object
   org.apache.derbyTesting.functionTests.tests.lang.casting

casting
public class casting (Code)


Field Summary
public static  intBIGINT_OFFSET
    
public static  intBLOB_OFFSET
    
public static  intCHAR_FOR_BIT_OFFSET
    
public static  intCHAR_OFFSET
    
public static  intCLOB_OFFSET
    
public static  intDATE_OFFSET
    
public static  intDECIMAL_OFFSET
    
public static  intDOUBLE_OFFSET
    
public static  StringILLEGAL_CAST_EXCEPTION_SQLSTATE
    
public static  intINTEGER_OFFSET
    
public static  StringLANG_FORMAT_EXCEPTION_SQLSTATE
    
public static  StringLANG_NOT_COMPARABLE_SQLSTATE
    
public static  StringLANG_NOT_STORABLE_SQLSTATE
    
public static  intLONGVARCHAR_FOR_BIT_OFFSET
    
public static  intLONGVARCHAR_OFFSET
    
public static  StringMETHOD_NOT_FOUND_SQLSTATE
    
public static  intNULL_DATA_OFFSET
    
public static  StringNULL_VALUE
    
public static  intREAL_OFFSET
    
public static  intSMALLINT_OFFSET
    
public static  String[][]SQLData
    
public static  intSQLTYPE_ARRAY_SIZE
    
public static  String[]SQLTypes
    
public static  intTIMESTAMP_OFFSET
    
public static  intTIME_OFFSET
    
final public static  boolean[][]T_146
    
final public static  boolean[][]T_147a
     DB2 uses Table 147 to describe Data Type Compatibility for Assignments The table 147a covers the assignments as they do differ somewhat from comparisons which can be found in 147b This table has DATA TYPES for operands rather than lumping types together.
final public static  boolean[][]T_147b
    
public static  intVALID_DATA_OFFSET
    
public static  StringVALID_DATE_STRING
    
public static  StringVALID_TIMESTAMP_STRING
    
public static  StringVALID_TIME_STRING
    
public static  intVARCHAR_FOR_BIT_OFFSET
    
public static  intVARCHAR_OFFSET
    
final public static  booleanX
    
final public static  boolean_
    
public static  booleanisDB2
    
public static  booleanisDerbyNet
    
public static  inttestNum
    


Method Summary
public static  voidcheckSupportedAssignment(int sourceType, int targetType)
    
public static  voidcheckSupportedCast(int sourceType, int targetType)
    
public static  voidcheckSupportedComparison(int sourceType, int targetType)
    
public static  voidcreateTables(Connection conn)
    
public static  voidexecuteQueryAndDisplay(Connection conn, String query)
     Display Query , execute and display results.
public static  voidexpectedException(SQLException sqle)
    
public static  StringformatString(String str)
    
public static  StringgetCompatibleString(int sourceType, int targetType, int dataOffset)
    
public static  StringgetShortTypeName(int type)
    
public static  StringgetTableName(int type)
    
public static  voidgotWrongException(SQLException sqle)
     We got an exception when one was expected, but it was the wrong one.
public static  booleanisBinaryType(int typeOffset)
    
public static  booleanisCastException(SQLException se)
    
public static  booleanisCharacterType(int typeOffset)
    
public static  booleanisClob(int typeOffset)
    
public static  booleanisDateTimeTimestamp(int typeOffset)
    
public static  booleanisLob(int typeOffset)
    
public static  booleanisLongType(int typeOffset)
    
public static  booleanisMethodNotFoundException(SQLException se)
    
public static  booleanisNotComparableException(SQLException se)
    
public static  booleanisNotStorableException(SQLException se)
    
public static  booleanisSupportedAssignment(int sourceType, int targetType)
    
public static  booleanisSupportedCast(int sourceType, int targetType)
    
public static  booleanisSupportedComparison(int sourceType, int targetType)
    
public static  voidmain(String[] args)
    
public static  voidprintHTMLTables()
    
public static  voidprintShouldNotSucceedMessage(String description)
    
public static  booleansetValidValue(PreparedStatement ps, int param, int jdbcType)
    
public static  voidshowException(SQLException sqle)
    
public static  booleansqlStateMatches(SQLException se, String expectedValue)
    
public static  voidtestAssignments(Connection conn)
    
public static  voidtestComparisons(Connection conn)
    
public static  voidtestExplicitCasts(Connection conn)
    
public static  voidunexpectedException(SQLException sqle)
    

Field Detail
BIGINT_OFFSET
public static int BIGINT_OFFSET(Code)



BLOB_OFFSET
public static int BLOB_OFFSET(Code)



CHAR_FOR_BIT_OFFSET
public static int CHAR_FOR_BIT_OFFSET(Code)



CHAR_OFFSET
public static int CHAR_OFFSET(Code)



CLOB_OFFSET
public static int CLOB_OFFSET(Code)



DATE_OFFSET
public static int DATE_OFFSET(Code)



DECIMAL_OFFSET
public static int DECIMAL_OFFSET(Code)



DOUBLE_OFFSET
public static int DOUBLE_OFFSET(Code)



ILLEGAL_CAST_EXCEPTION_SQLSTATE
public static String ILLEGAL_CAST_EXCEPTION_SQLSTATE(Code)



INTEGER_OFFSET
public static int INTEGER_OFFSET(Code)



LANG_FORMAT_EXCEPTION_SQLSTATE
public static String LANG_FORMAT_EXCEPTION_SQLSTATE(Code)



LANG_NOT_COMPARABLE_SQLSTATE
public static String LANG_NOT_COMPARABLE_SQLSTATE(Code)



LANG_NOT_STORABLE_SQLSTATE
public static String LANG_NOT_STORABLE_SQLSTATE(Code)



LONGVARCHAR_FOR_BIT_OFFSET
public static int LONGVARCHAR_FOR_BIT_OFFSET(Code)



LONGVARCHAR_OFFSET
public static int LONGVARCHAR_OFFSET(Code)



METHOD_NOT_FOUND_SQLSTATE
public static String METHOD_NOT_FOUND_SQLSTATE(Code)



NULL_DATA_OFFSET
public static int NULL_DATA_OFFSET(Code)



NULL_VALUE
public static String NULL_VALUE(Code)



REAL_OFFSET
public static int REAL_OFFSET(Code)



SMALLINT_OFFSET
public static int SMALLINT_OFFSET(Code)



SQLData
public static String[][] SQLData(Code)



SQLTYPE_ARRAY_SIZE
public static int SQLTYPE_ARRAY_SIZE(Code)



SQLTypes
public static String[] SQLTypes(Code)



TIMESTAMP_OFFSET
public static int TIMESTAMP_OFFSET(Code)



TIME_OFFSET
public static int TIME_OFFSET(Code)



T_146
final public static boolean[][] T_146(Code)
DB2 Table 146 - Supported explicit casts between Built-in DataTypes This table has THE FOR BIT DATA TYPES broken out into separate columns for clarity and testing



T_147a
final public static boolean[][] T_147a(Code)
DB2 uses Table 147 to describe Data Type Compatibility for Assignments The table 147a covers the assignments as they do differ somewhat from comparisons which can be found in 147b This table has DATA TYPES for operands rather than lumping types together. Here is the mapping from DB2 Table 147 to this table. Binary Integer = SMALLINT, INTEGER, BIGINT Decimal Number = DECIMAL/(NUMERIC) Floating Point = REAL, DOUBLE/(FLOAT) Character String = CHAR, VARCHAR, LONGVARCHAR Binary String = CHAR FOR BIT DATA, VARCHAR FOR BIT DATA, LONG VARCHAR FOR BIT DATA Graphic String = not suppported Date = DATE Time = TIME TimeStamp = TIMESTAMP Binary String = literal hexadecimal, CHAR FOR BIT DATA, VARCHAR FOR BIT DATA, LONG VARCHAR FOR BIT CLOB and BLOB are not covered in Table 147 but are included here for clarity and testing



T_147b
final public static boolean[][] T_147b(Code)



VALID_DATA_OFFSET
public static int VALID_DATA_OFFSET(Code)



VALID_DATE_STRING
public static String VALID_DATE_STRING(Code)



VALID_TIMESTAMP_STRING
public static String VALID_TIMESTAMP_STRING(Code)



VALID_TIME_STRING
public static String VALID_TIME_STRING(Code)



VARCHAR_FOR_BIT_OFFSET
public static int VARCHAR_FOR_BIT_OFFSET(Code)



VARCHAR_OFFSET
public static int VARCHAR_OFFSET(Code)



X
final public static boolean X(Code)



_
final public static boolean _(Code)



isDB2
public static boolean isDB2(Code)



isDerbyNet
public static boolean isDerbyNet(Code)



testNum
public static int testNum(Code)





Method Detail
checkSupportedAssignment
public static void checkSupportedAssignment(int sourceType, int targetType)(Code)



checkSupportedCast
public static void checkSupportedCast(int sourceType, int targetType)(Code)



checkSupportedComparison
public static void checkSupportedComparison(int sourceType, int targetType)(Code)



createTables
public static void createTables(Connection conn) throws SQLException, Throwable(Code)



executeQueryAndDisplay
public static void executeQueryAndDisplay(Connection conn, String query) throws SQLException(Code)
Display Query , execute and display results.
Parameters:
  conn - Connection to use
Parameters:
  query - to execute



expectedException
public static void expectedException(SQLException sqle)(Code)
Show an expected exception
Parameters:
  sqle - SQL Exception



formatString
public static String formatString(String str)(Code)



getCompatibleString
public static String getCompatibleString(int sourceType, int targetType, int dataOffset)(Code)



getShortTypeName
public static String getShortTypeName(int type)(Code)
Truncates (*) from typename
Parameters:
  type - - Type offset



getTableName
public static String getTableName(int type)(Code)
Build a unique table name from the type - table offset



gotWrongException
public static void gotWrongException(SQLException sqle)(Code)
We got an exception when one was expected, but it was the wrong one. For DB2 we will just print a warning.
Parameters:
  sqle -



isBinaryType
public static boolean isBinaryType(int typeOffset)(Code)



isCastException
public static boolean isCastException(SQLException se)(Code)



isCharacterType
public static boolean isCharacterType(int typeOffset)(Code)



isClob
public static boolean isClob(int typeOffset)(Code)



isDateTimeTimestamp
public static boolean isDateTimeTimestamp(int typeOffset)(Code)



isLob
public static boolean isLob(int typeOffset)(Code)



isLongType
public static boolean isLongType(int typeOffset)(Code)



isMethodNotFoundException
public static boolean isMethodNotFoundException(SQLException se)(Code)



isNotComparableException
public static boolean isNotComparableException(SQLException se)(Code)



isNotStorableException
public static boolean isNotStorableException(SQLException se)(Code)



isSupportedAssignment
public static boolean isSupportedAssignment(int sourceType, int targetType)(Code)



isSupportedCast
public static boolean isSupportedCast(int sourceType, int targetType)(Code)



isSupportedComparison
public static boolean isSupportedComparison(int sourceType, int targetType)(Code)



main
public static void main(String[] args) throws Exception(Code)



printHTMLTables
public static void printHTMLTables()(Code)



printShouldNotSucceedMessage
public static void printShouldNotSucceedMessage(String description)(Code)



setValidValue
public static boolean setValidValue(PreparedStatement ps, int param, int jdbcType) throws SQLException(Code)



showException
public static void showException(SQLException sqle)(Code)



sqlStateMatches
public static boolean sqlStateMatches(SQLException se, String expectedValue)(Code)



testAssignments
public static void testAssignments(Connection conn) throws SQLException, Throwable(Code)



testComparisons
public static void testComparisons(Connection conn) throws SQLException, Throwable(Code)



testExplicitCasts
public static void testExplicitCasts(Connection conn) throws SQLException, Throwable(Code)



unexpectedException
public static void unexpectedException(SQLException sqle)(Code)



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.