Source Code Cross Referenced for FirebirdDatabase.java in  » Database-Client » LiquiBase » liquibase » database » 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 Client » LiquiBase » liquibase.database 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package liquibase.database;
002:
003:        import liquibase.database.sql.RawSqlStatement;
004:        import liquibase.database.sql.SqlStatement;
005:        import liquibase.exception.JDBCException;
006:
007:        import java.sql.Connection;
008:
009:        /**
010:         * Firebird database implementation.
011:         * SQL Syntax ref: http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_60_sqlref
012:         */
013:        public class FirebirdDatabase extends AbstractDatabase {
014:
015:            public boolean isCorrectDatabaseImplementation(Connection conn)
016:                    throws JDBCException {
017:                return getDatabaseProductName(conn).startsWith("Firebird");
018:            }
019:
020:            public String getDefaultDriver(String url) {
021:                if (url.startsWith("jdbc:firebirdsql")) {
022:                    return "org.firebirdsql.jdbc.FBDriver";
023:                }
024:                return null;
025:            }
026:
027:            public String getProductName() {
028:                return "Firebird";
029:            }
030:
031:            public String getTypeName() {
032:                return "firebird";
033:            }
034:
035:            public boolean supportsSequences() {
036:                return true;
037:            }
038:
039:            public String getBooleanType() {
040:                return "SMALLINT";
041:            }
042:
043:            public String getCurrencyType() {
044:                return "DECIMAL(18, 4)";
045:            }
046:
047:            public String getUUIDType() {
048:                return "CHAR(36)";
049:            }
050:
051:            public String getClobType() {
052:                return "BLOB SUB_TYPE TEXT";
053:            }
054:
055:            public String getBlobType() {
056:                return "BLOB";
057:            }
058:
059:            public String getDateTimeType() {
060:                return "TIMESTAMP";
061:            }
062:
063:            public boolean supportsInitiallyDeferrableColumns() {
064:                return false;
065:            }
066:
067:            public String getCurrentDateTimeFunction() {
068:                return "CURRENT_TIMESTAMP";
069:            }
070:
071:            public boolean supportsTablespaces() {
072:                return false;
073:            }
074:
075:            public SqlStatement createFindSequencesSQL(String schema)
076:                    throws JDBCException {
077:                return new RawSqlStatement(
078:                        "SELECT RDB$GENERATOR_NAME FROM RDB$GENERATORS WHERE RDB$SYSTEM_FLAG IS NULL OR RDB$SYSTEM_FLAG = 0");
079:            }
080:
081:            public SqlStatement getViewDefinitionSql(String schemaName,
082:                    String viewName) throws JDBCException {
083:                String sql = "select rdb$view_source from rdb$relations where upper(rdb$relation_name)='"
084:                        + viewName + "'";
085:                //        if (schemaName != null) {
086:                //            sql += " and rdb$owner_name='" + schemaName.toUpperCase() + "'";
087:                //        }
088:                //        if (getDefaultCatalogName() != null) {
089:                //            sql += " and table_catalog='" + getDefaultCatalogName() + "'";
090:                //
091:                //        }
092:                return new RawSqlStatement(sql);
093:            }
094:
095:            public boolean supportsDDLInTransaction() {
096:                return false;
097:            }
098:
099:            public String getTrueBooleanValue() {
100:                return "1";
101:            }
102:
103:            public String getFalseBooleanValue() {
104:                return "0";
105:            }
106:
107:            public boolean isSystemTable(String catalogName, String schemaName,
108:                    String tableName) {
109:                return tableName.startsWith("RDB$")
110:                        || super .isSystemTable(catalogName, schemaName,
111:                                tableName);
112:            }
113:
114:            public boolean supportsAutoIncrement() {
115:                return false;
116:            }
117:
118:            public boolean supportsSchemas() {
119:                return false;
120:            }
121:
122:            public String convertRequestedSchemaToSchema(String requestedSchema)
123:                    throws JDBCException {
124:                if (requestedSchema == null) {
125:                    return getDefaultDatabaseSchemaName();
126:                } else {
127:                    return requestedSchema.toUpperCase();
128:                }
129:            }
130:
131:            public String getColumnType(String columnType, Boolean autoIncrement) {
132:                String type = super .getColumnType(columnType, autoIncrement);
133:                if (type.startsWith("BLOB SUB_TYPE <0")) {
134:                    return getBlobType();
135:                } else {
136:                    return type;
137:                }
138:            }
139:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.