--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.sql.conn.LanguageConnectionFactory\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.sql.conn;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+import org.apache.derby.iapi.db.Database;\r
+\r
+import org.apache.derby.iapi.services.property.PropertyFactory;\r
+\r
+import org.apache.derby.iapi.sql.compile.OptimizerFactory;\r
+import org.apache.derby.iapi.sql.compile.NodeFactory;\r
+import org.apache.derby.iapi.sql.compile.CompilerContext;\r
+\r
+import org.apache.derby.iapi.types.DataValueFactory;\r
+import org.apache.derby.iapi.sql.compile.TypeCompilerFactory;\r
+import org.apache.derby.iapi.sql.execute.ExecutionFactory;\r
+import org.apache.derby.iapi.sql.Statement;\r
+import org.apache.derby.iapi.sql.compile.Parser;\r
+\r
+import org.apache.derby.iapi.services.uuid.UUIDFactory;\r
+import org.apache.derby.iapi.services.compiler.JavaFactory;\r
+import org.apache.derby.iapi.services.loader.ClassFactory;\r
+import org.apache.derby.iapi.services.context.ContextManager;\r
+import org.apache.derby.iapi.services.cache.CacheManager;\r
+\r
+import org.apache.derby.iapi.sql.LanguageFactory;\r
+import org.apache.derby.iapi.store.access.TransactionController;\r
+import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;\r
+\r
+\r
+/**\r
+ * Factory interface for items specific to a connection in the language system.\r
+ * This is expected to be used internally, and so is not in Language.Interface.\r
+ * <p>\r
+ * This Factory provides pointers to other language factories; the\r
+ * LanguageConnectionContext holds more dynamic information, such as\r
+ * prepared statements and whether a commit has occurred or not.\r
+ * <p>\r
+ * This Factory is for internal items used throughout language during a\r
+ * connection. Things that users need for the Database API are in\r
+ * LanguageFactory in Language.Interface.\r
+ * <p>\r
+ * This factory returns (and thus starts) all the other per-database\r
+ * language factories. So there might someday be properties as to which\r
+ * ones to start (attributes, say, like level of optimization).\r
+ * If the request is relative to a specific connection, the connection\r
+ * is passed in. Otherwise, they are assumed to be database-wide services.\r
+ *\r
+ * @see org.apache.derby.iapi.sql.LanguageFactory\r
+ *\r
+ */\r
+public interface LanguageConnectionFactory {\r
+ /**\r
+ Used to locate this factory by the Monitor basic service.\r
+ There needs to be a language factory per database.\r
+ */\r
+ String MODULE = "org.apache.derby.iapi.sql.conn.LanguageConnectionFactory";\r
+\r
+\r
+ /**\r
+ Get a Statement\r
+ @param compilationSchema schema\r
+ @param statementText the text for the statement\r
+ @param forReadOnly true if concurrency mode is CONCUR_READ_ONLY\r
+ @return The Statement\r
+ */\r
+ Statement getStatement(SchemaDescriptor compilationSchema, String statementText, boolean forReadOnly);\r
+\r
+ /**\r
+ Get a new LanguageConnectionContext. this holds things\r
+ we want to remember about activity in the language system,\r
+ where this factory holds things that are pretty stable,\r
+ like other factories.\r
+ <p>\r
+ The returned LanguageConnectionContext is intended for use\r
+ only by the connection that requested it.\r
+\r
+ @return a language connection context for the context stack.\r
+ @exception StandardException the usual\r
+ */\r
+ LanguageConnectionContext\r
+ newLanguageConnectionContext(ContextManager cm,\r
+ TransactionController tc,\r
+ LanguageFactory lf,\r
+ Database db,\r
+ String userName,\r
+ String drdaID,\r
+ String dbname)\r
+\r
+ throws StandardException;\r
+\r
+ /**\r
+ Get the UUIDFactory to use with this language connection\r
+ */\r
+ UUIDFactory getUUIDFactory();\r
+\r
+ /**\r
+ Get the ClassFactory to use with this language connection\r
+ */\r
+ ClassFactory getClassFactory();\r
+\r
+ /**\r
+ Get the JavaFactory to use with this language connection\r
+ */\r
+ JavaFactory getJavaFactory();\r
+\r
+ /**\r
+ Get the NodeFactory to use with this language connection\r
+ */\r
+ NodeFactory getNodeFactory();\r
+\r
+ /**\r
+ Get the ExecutionFactory to use with this language connection\r
+ */\r
+ ExecutionFactory getExecutionFactory();\r
+\r
+ /**\r
+ Get the PropertyFactory to use with this language connection\r
+ */\r
+ PropertyFactory getPropertyFactory();\r
+\r
+ /**\r
+ Get the OptimizerFactory to use with this language connection\r
+ */\r
+ OptimizerFactory getOptimizerFactory();\r
+\r
+ /**\r
+ Get the TypeCompilerFactory to use with this language connection\r
+ */\r
+ TypeCompilerFactory getTypeCompilerFactory();\r
+\r
+ /**\r
+ Get the DataValueFactory to use with this language connection\r
+ This is expected to get stuffed into the language connection\r
+ context and accessed from there.\r
+\r
+ */\r
+ DataValueFactory getDataValueFactory(); \r
+\r
+ public CacheManager getStatementCache();\r
+\r
+ public Parser newParser(CompilerContext cc);\r
+}\r