Source Code Cross Referenced for TKSybaseSQLTypeConverter.java in  » Content-Management-System » webman » com » teamkonzept » db » 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 » Content Management System » webman » com.teamkonzept.db 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.teamkonzept.db;
002:
003:        import java.sql.*;
004:
005:        /**
006:         *	Spezifische typeconverter-Klasse fuer Sybase (und auch postgres) SQL-Datenbankserver
007:         * @author
008:         * @version
009:         */
010:
011:        public class TKSybaseSQLTypeConverter extends TKSQLTypeConverter {
012:
013:            /* datenbankspez. type-constanten */
014:            private final static int VARCHAR_PRECISION = 255;
015:            private final static int VARCHAR_MINIMUM_SCALE = 0;
016:            private final static int VARCHAR_MAXIMUM_SCALE = 0;
017:            private final static boolean VARCHAR_UNSIGNED_ATTRIBUTE = false;
018:            private final static int VARCHAR_UNSIGNED_NUM_PREC_RADIX = 0;
019:
020:            private final static int LONGVARCHAR_PRECISION = 2147483647;
021:            private final static int LONGVARCHAR_MINIMUM_SCALE = 0;
022:            private final static int LONGVARCHAR_MAXIMUM_SCALE = 0;
023:            private final static boolean LONGVARCHAR_UNSIGNED_ATTRIBUTE = false;
024:            private final static int LONGVARCHAR_UNSIGNED_NUM_PREC_RADIX = 0;
025:
026:            private final static int BINARY_PRECISION = 255;
027:            private final static int BINARY_MINIMUM_SCALE = 0;
028:            private final static int BINARY_MAXIMUM_SCALE = 0;
029:            private final static boolean BINARY_UNSIGNED_ATTRIBUTE = false;
030:            private final static int BINARY_UNSIGNED_NUM_PREC_RADIX = 0;
031:
032:            private final static int VARBINARY_PRECISION = 255;
033:            private final static int VARBINARY_MINIMUM_SCALE = 0;
034:            private final static int VARBINARY_MAXIMUM_SCALE = 0;
035:            private final static boolean VARBINARY_UNSIGNED_ATTRIBUTE = false;
036:            private final static int VARBINARY_UNSIGNED_NUM_PREC_RADIX = 0;
037:
038:            private final static int REAL_PRECISION = 7;
039:            private final static int REAL_MINIMUM_SCALE = 0;
040:            private final static int REAL_MAXIMUM_SCALE = 0;
041:            private final static boolean REAL_UNSIGNED_ATTRIBUTE = false;
042:            private final static int REAL_UNSIGNED_NUM_PREC_RADIX = 10;
043:
044:            private final static int LONGVARBINARY_PRECISION = 2147483647;
045:            private final static int LONGVARBINARY_MINIMUM_SCALE = 0;
046:            private final static int LONGVARBINARY_MAXIMUM_SCALE = 0;
047:            private final static boolean LONGVARBINARY_UNSIGNED_ATTRIBUTE = false;
048:            private final static int LONGVARBINARY_UNSIGNED_NUM_PREC_RADIX = 0;
049:
050:            private final static int FLOAT_PRECISION = 15;
051:            private final static int FLOAT_MINIMUM_SCALE = 0;
052:            private final static int FLOAT_MAXIMUM_SCALE = 0;
053:            private final static boolean FLOAT_UNSIGNED_ATTRIBUTE = false;
054:            private final static int FLOAT_UNSIGNED_NUM_PREC_RADIX = 10;
055:
056:            private final static int SMALLINT_PRECISION = 5;
057:            private final static int SMALLINT_MINIMUM_SCALE = 0;
058:            private final static int SMALLINT_MAXIMUM_SCALE = 0;
059:            private final static boolean SMALLINT_UNSIGNED_ATTRIBUTE = false;
060:            private final static int SMALLINT_UNSIGNED_NUM_PREC_RADIX = 10;
061:
062:            private final static int TINYINT_PRECISION = 3;
063:            private final static int TINYINT_MINIMUM_SCALE = 0;
064:            private final static int TINYINT_MAXIMUM_SCALE = 0;
065:            private final static boolean TINYINT_UNSIGNED_ATTRIBUTE = false;
066:            private final static int TINYINT_UNSIGNED_NUM_PREC_RADIX = 10;
067:
068:            private final static int INTEGER_PRECISION = 10;
069:            private final static int INTEGER_MINIMUM_SCALE = 0;
070:            private final static int INTEGER_MAXIMUM_SCALE = 0;
071:            private final static boolean INTEGER_UNSIGNED_ATTRIBUTE = false;
072:            private final static int INTEGER_UNSIGNED_NUM_PREC_RADIX = 10;
073:
074:            private final static int BIT_PRECISION = 1;
075:            private final static int BIT_MINIMUM_SCALE = 0;
076:            private final static int BIT_MAXIMUM_SCALE = 0;
077:            private final static boolean BIT_UNSIGNED_ATTRIBUTE = false;
078:            private final static int BIT_UNSIGNED_NUM_PREC_RADIX = 2;
079:
080:            private final static int DECIMAL_PRECISION = 28;
081:            private final static int DECIMAL_MINIMUM_SCALE = 0;
082:            private final static int DECIMAL_MAXIMUM_SCALE = 28;
083:            private final static boolean DECIMAL_UNSIGNED_ATTRIBUTE = false;
084:            private final static int DECIMAL_UNSIGNED_NUM_PREC_RADIX = 10;
085:
086:            private final static int NUMERIC_PRECISION = 28;
087:            private final static int NUMERIC_MINIMUM_SCALE = 0;
088:            private final static int NUMERIC_MAXIMUM_SCALE = 28;
089:            private final static boolean NUMERIC_UNSIGNED_ATTRIBUTE = false;
090:            private final static int NUMERIC_UNSIGNED_NUM_PREC_RADIX = 10;
091:
092:            private final static int CHAR_PRECISION = 255;
093:            private final static int CHAR_MINIMUM_SCALE = 0;
094:            private final static int CHAR_MAXIMUM_SCALE = 0;
095:            private final static boolean CHAR_UNSIGNED_ATTRIBUTE = false;
096:            private final static int CHAR_UNSIGNED_NUM_PREC_RADIX = 0;
097:
098:            static TypeInfo[] meta_data = {
099:                    new TypeInfo(Types.VARCHAR, "'", "'", VARCHAR_PRECISION,
100:                            VARCHAR_MINIMUM_SCALE, VARCHAR_MAXIMUM_SCALE,
101:                            VARCHAR_UNSIGNED_ATTRIBUTE,
102:                            VARCHAR_UNSIGNED_NUM_PREC_RADIX),
103:                    new TypeInfo(Types.LONGVARCHAR, "'", "'",
104:                            LONGVARCHAR_PRECISION, LONGVARCHAR_MINIMUM_SCALE,
105:                            LONGVARCHAR_MAXIMUM_SCALE,
106:                            LONGVARCHAR_UNSIGNED_ATTRIBUTE,
107:                            LONGVARCHAR_UNSIGNED_NUM_PREC_RADIX),
108:                    new TypeInfo(Types.BINARY, null, null, BINARY_PRECISION,
109:                            BINARY_MINIMUM_SCALE, BINARY_MAXIMUM_SCALE,
110:                            BINARY_UNSIGNED_ATTRIBUTE,
111:                            BINARY_UNSIGNED_NUM_PREC_RADIX),
112:                    new TypeInfo(Types.VARBINARY, null, null,
113:                            VARBINARY_PRECISION, VARBINARY_MINIMUM_SCALE,
114:                            VARBINARY_MAXIMUM_SCALE,
115:                            VARBINARY_UNSIGNED_ATTRIBUTE,
116:                            VARBINARY_UNSIGNED_NUM_PREC_RADIX),
117:                    new TypeInfo(Types.REAL, null, null, REAL_PRECISION,
118:                            REAL_MINIMUM_SCALE, REAL_MAXIMUM_SCALE,
119:                            REAL_UNSIGNED_ATTRIBUTE,
120:                            REAL_UNSIGNED_NUM_PREC_RADIX),
121:                    new TypeInfo(Types.LONGVARBINARY, null, null,
122:                            LONGVARBINARY_PRECISION,
123:                            LONGVARBINARY_MINIMUM_SCALE,
124:                            LONGVARBINARY_MAXIMUM_SCALE,
125:                            LONGVARBINARY_UNSIGNED_ATTRIBUTE,
126:                            LONGVARBINARY_UNSIGNED_NUM_PREC_RADIX),
127:                    new TypeInfo(Types.FLOAT, null, null, FLOAT_PRECISION,
128:                            FLOAT_MINIMUM_SCALE, FLOAT_MAXIMUM_SCALE,
129:                            FLOAT_UNSIGNED_ATTRIBUTE,
130:                            FLOAT_UNSIGNED_NUM_PREC_RADIX),
131:                    new TypeInfo(Types.SMALLINT, null, null,
132:                            SMALLINT_PRECISION, SMALLINT_MINIMUM_SCALE,
133:                            SMALLINT_MAXIMUM_SCALE,
134:                            SMALLINT_UNSIGNED_ATTRIBUTE,
135:                            SMALLINT_UNSIGNED_NUM_PREC_RADIX),
136:                    new TypeInfo(Types.TINYINT, null, null, TINYINT_PRECISION,
137:                            TINYINT_MINIMUM_SCALE, TINYINT_MAXIMUM_SCALE,
138:                            TINYINT_UNSIGNED_ATTRIBUTE,
139:                            TINYINT_UNSIGNED_NUM_PREC_RADIX),
140:                    new TypeInfo(Types.INTEGER, null, null, INTEGER_PRECISION,
141:                            INTEGER_MINIMUM_SCALE, INTEGER_MAXIMUM_SCALE,
142:                            INTEGER_UNSIGNED_ATTRIBUTE,
143:                            INTEGER_UNSIGNED_NUM_PREC_RADIX),
144:                    new TypeInfo(Types.BIT, null, null, BIT_PRECISION,
145:                            BIT_MINIMUM_SCALE, BIT_MAXIMUM_SCALE,
146:                            BIT_UNSIGNED_ATTRIBUTE, BIT_UNSIGNED_NUM_PREC_RADIX),
147:                    new TypeInfo(Types.DECIMAL, null, null, DECIMAL_PRECISION,
148:                            DECIMAL_MINIMUM_SCALE, DECIMAL_MAXIMUM_SCALE,
149:                            DECIMAL_UNSIGNED_ATTRIBUTE,
150:                            DECIMAL_UNSIGNED_NUM_PREC_RADIX),
151:                    new TypeInfo(Types.NUMERIC, null, null, NUMERIC_PRECISION,
152:                            NUMERIC_MINIMUM_SCALE, NUMERIC_MAXIMUM_SCALE,
153:                            NUMERIC_UNSIGNED_ATTRIBUTE,
154:                            NUMERIC_UNSIGNED_NUM_PREC_RADIX),
155:                    new TypeInfo(Types.CHAR, "'", "'", CHAR_PRECISION,
156:                            CHAR_MINIMUM_SCALE, CHAR_MAXIMUM_SCALE,
157:                            CHAR_UNSIGNED_ATTRIBUTE,
158:                            CHAR_UNSIGNED_NUM_PREC_RADIX) };
159:
160:            public TKSybaseSQLTypeConverter(final Connection conn) {
161:                this ();
162:            }
163:
164:            public TKSybaseSQLTypeConverter() {
165:                super (meta_data);
166:            }
167:
168:            public boolean supportsConvert(final int from_type,
169:                    final int to_type) {
170:                return false;
171:            }
172:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.