Source Code Cross Referenced for DatabaseMetaDataImpl.java in  » Rule-Engine » Mandarax » org » mandarax » jdbc » client » 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 » Rule Engine » Mandarax » org.mandarax.jdbc.client 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.mandarax.jdbc.client;
002:
003:        /*
004:         * Copyright (C) 1999-2004 <a href="mailto:mandarax@jbdietrich.com">Jens Dietrich</a>
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2 of the License, or (at your option) any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         */
020:
021:        import java.sql.*;
022:
023:        import org.mandarax.jdbc.*;
024:        import org.mandarax.jdbc.rpc.*;
025:
026:        /**
027:         * Meta data implementation.
028:         * @author <A HREF="mailto:mandarax@jbdietrich.com">Jens Dietrich</A>
029:         * @version 3.3.2 <29 December 2004>
030:         * @since 3.0
031:         */
032:
033:        public class DatabaseMetaDataImpl extends AbstractDatabaseMetaDataImpl {
034:            private Transport transport = null;
035:
036:            /**
037:             * Constructor.
038:             * @param url the database url
039:             * @param connection the connection used to produce this object
040:             * @param kb the knowledge base
041:             */
042:            DatabaseMetaDataImpl(String url, ConnectionImpl connection,
043:                    Transport transport) {
044:                super (url, connection);
045:                this .transport = transport;
046:            }
047:
048:            /**
049:             * Retrieves the user name as known to this database.
050:             * @return java.lang.String
051:             * @throws java.sql.SQLException
052:             */
053:            public String getUserName() throws SQLException {
054:                return System.getProperty("user.name");
055:            }
056:
057:            /**
058:             * Retrieves the name of this JDBC driver.
059:             * @return JDBC driver name
060:             * @throws java.sql.SQLException
061:             */
062:            public String getDriverName() throws SQLException {
063:                return "mandarax jdbc net driver";
064:            }
065:
066:            /**
067:             * Retrieves this JDBC driver's major version number.
068:             * @return JDBC driver major version number
069:             */
070:            public int getDriverMajorVersion() {
071:                return 1;
072:
073:            }
074:
075:            /**
076:             * Retrieves this JDBC driver's minor version number.
077:             * @return JDBC driver minor version number
078:             */
079:            public int getDriverMinorVersion() {
080:                return 0;
081:            }
082:
083:            /**
084:             * Retrieves whether this database stores tables in a local file.
085:             * @return boolean
086:             * @throws java.sql.SQLException
087:             */
088:            public boolean usesLocalFiles() throws SQLException {
089:                return false;
090:            }
091:
092:            /**
093:             * Get the id of the associated connection.
094:             * @return an id
095:             */
096:            private String getConnectionId() throws SQLException {
097:                Connection con = this .getConnection();
098:                return ((ClientObject) con).getId();
099:            }
100:
101:            /**
102:             * Retrieves a description of table columns available in the specified catalog.
103:             * @param catalog
104:             * @param schemaPattern
105:             * @param tableNamePattern
106:             * @param columnNamePattern
107:             * @return java.sql.ResultSet
108:             * @throws java.sql.SQLException
109:             */
110:            public ResultSet getColumns(String catalog, String schemaPattern,
111:                    String tableNamePattern, String columnNamePattern)
112:                    throws SQLException {
113:                Call call = new Call(getConnectionId(),
114:                        "Connection_getMetaData_getColumns", new Object[] {
115:                                catalog, schemaPattern, tableNamePattern,
116:                                columnNamePattern });
117:                return QueryHelper.executeQuery(transport, call, 10, this );
118:            }
119:
120:            /**
121:             * Retrieves a description of the tables available in the given catalog. 
122:             * @param catalog
123:             * @param schemaPattern
124:             * @param tableNamePattern
125:             * @param types
126:             * @return java.sql.ResultSet
127:             * @throws java.sql.SQLException
128:             */
129:            public ResultSet getTables(String catalog, String schemaPattern,
130:                    String tableNamePattern, String[] types)
131:                    throws SQLException {
132:                Call call = new Call(getConnectionId(),
133:                        "Connection_getMetaData_getTables",
134:                        new Object[] { catalog, schemaPattern,
135:                                tableNamePattern, types });
136:                return QueryHelper.executeQuery(transport, call, 10, this);
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.