Source Code Cross Referenced for GenericLanguageFactory.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » 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.derby.impl.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.impl.sql.GenericLanguageFactory
004:
005:           Licensed to the Apache Software Foundation (ASF) under one or more
006:           contributor license agreements.  See the NOTICE file distributed with
007:           this work for additional information regarding copyright ownership.
008:           The ASF licenses this file to you under the Apache License, Version 2.0
009:           (the "License"); you may not use this file except in compliance with
010:           the License.  You may obtain a copy of the License at
011:
012:              http://www.apache.org/licenses/LICENSE-2.0
013:
014:           Unless required by applicable law or agreed to in writing, software
015:           distributed under the License is distributed on an "AS IS" BASIS,
016:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:           See the License for the specific language governing permissions and
018:           limitations under the License.
019:
020:         */
021:
022:        package org.apache.derby.impl.sql;
023:
024:        import org.apache.derby.iapi.services.property.PropertyFactory;
025:        import org.apache.derby.iapi.store.access.AccessFactory;
026:        import org.apache.derby.iapi.store.access.TransactionController;
027:        import org.apache.derby.iapi.sql.LanguageFactory;
028:        import org.apache.derby.iapi.sql.ParameterValueSet;
029:        import org.apache.derby.iapi.sql.ResultDescription;
030:        import org.apache.derby.iapi.sql.ResultColumnDescriptor;
031:        import org.apache.derby.iapi.sql.Row;
032:
033:        import org.apache.derby.iapi.services.monitor.Monitor;
034:        import org.apache.derby.iapi.services.monitor.ModuleControl;
035:        import org.apache.derby.iapi.error.StandardException;
036:
037:        import org.apache.derby.iapi.sql.conn.LanguageConnectionFactory;
038:        import org.apache.derby.iapi.services.loader.ClassInspector;
039:
040:        import org.apache.derby.iapi.services.io.FormatIdUtil;
041:
042:        import java.util.Properties;
043:
044:        /**
045:         The LanguageFactory provides system-wide services that
046:         are available on the Database API.
047:
048:         @author ames
049:         */
050:        public class GenericLanguageFactory implements  LanguageFactory,
051:                ModuleControl {
052:
053:            private GenericParameterValueSet emptySet;
054:
055:            public GenericLanguageFactory() {
056:            }
057:
058:            /*
059:            	ModuleControl interface
060:             */
061:
062:            /**
063:             * Start-up method for this instance of the language factory.
064:             * This service is expected to be started and accessed relative 
065:             * to a database.
066:             *
067:             * @param startParams	The start-up parameters (ignored in this case)
068:
069:               @exception StandardException Thrown if module cannot be booted.
070:             *
071:             */
072:            public void boot(boolean create, Properties startParams)
073:                    throws StandardException {
074:                LanguageConnectionFactory lcf = (LanguageConnectionFactory) Monitor
075:                        .findServiceModule(this ,
076:                                LanguageConnectionFactory.MODULE);
077:                PropertyFactory pf = lcf.getPropertyFactory();
078:                if (pf != null)
079:                    pf
080:                            .addPropertySetNotification(new LanguageDbPropertySetter());
081:
082:                emptySet = new GenericParameterValueSet(null, 0, false);
083:            }
084:
085:            /**
086:             * Stop this module.  In this case, nothing needs to be done.
087:             */
088:
089:            public void stop() {
090:            }
091:
092:            /* LanguageFactory methods */
093:
094:            /**
095:             * Factory method for getting a ParameterValueSet
096:             *
097:             * @see LanguageFactory#newParameterValueSet
098:             */
099:            public ParameterValueSet newParameterValueSet(ClassInspector ci,
100:                    int numParms, boolean hasReturnParam) {
101:                if (numParms == 0)
102:                    return emptySet;
103:
104:                return new GenericParameterValueSet(ci, numParms,
105:                        hasReturnParam);
106:            }
107:
108:            /**
109:             * Get a new result description from the input result
110:             * description.  Picks only the columns in the column
111:             * array from the inputResultDescription.
112:             *
113:             * @param inputResultDescription  the input rd
114:             * @param theCols array of ints, non null
115:             *
116:             * @return ResultDescription the rd
117:             */
118:            public ResultDescription getResultDescription(
119:                    ResultDescription inputResultDescription, int[] theCols) {
120:                return new GenericResultDescription(inputResultDescription,
121:                        theCols);
122:            }
123:
124:            /**
125:             * Get a new result description
126:             *
127:             * @param cols an array of col descriptors
128:             * @param type the statement type
129:             *
130:             * @return ResultDescription the rd
131:             */
132:            public ResultDescription getResultDescription(
133:                    ResultColumnDescriptor[] cols, String type) {
134:                return new GenericResultDescription(cols, type);
135:            }
136:
137:            /*
138:             ** REMIND: we will need a row and column factory
139:             ** when we make putResultSets available for users'
140:             ** server-side JDBC methods.
141:             */
142:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.