java.lang.Object
org.apache.derby.impl.sql.conn.GenericLanguageConnectionFactory
- All Implemented Interfaces:
- org.apache.derby.iapi.services.cache.CacheableFactory, org.apache.derby.iapi.sql.conn.LanguageConnectionFactory, org.apache.derby.iapi.services.monitor.ModuleControl, org.apache.derby.iapi.services.monitor.ModuleSupportable, org.apache.derby.iapi.services.property.PropertySetCallback
- public class GenericLanguageConnectionFactory
- extends java.lang.Object
- implements org.apache.derby.iapi.sql.conn.LanguageConnectionFactory, org.apache.derby.iapi.services.cache.CacheableFactory, org.apache.derby.iapi.services.property.PropertySetCallback, org.apache.derby.iapi.services.monitor.ModuleControl, org.apache.derby.iapi.services.monitor.ModuleSupportable
LanguageConnectionFactory generates all of the items
a language system needs that is specific to a particular
connection. Alot of these are other factories.
|
Method Summary |
org.apache.derby.iapi.services.daemon.Serviceable |
apply(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p)
Apply a property change. |
void |
boot(boolean create,
java.util.Properties startParams)
Start-up method for this instance of the language connection factory. |
protected void |
bootDataDictionary(boolean create,
java.util.Properties startParams)
|
boolean |
canSupport(java.util.Properties startParams)
this implementation will not support caching of statements. |
org.apache.derby.iapi.store.access.AccessFactory |
getAccessFactory()
Get the AccessFactory to use with this language connection |
org.apache.derby.iapi.services.loader.ClassFactory |
getClassFactory()
Get the ClassFactory to use with this language connection |
org.apache.derby.iapi.types.DataValueFactory |
getDataValueFactory()
Get the DataValueFactory to use with this language connection |
org.apache.derby.iapi.sql.execute.ExecutionFactory |
getExecutionFactory()
Get the ExecutionFactory to use with this language connection |
org.apache.derby.iapi.services.compiler.JavaFactory |
getJavaFactory()
Get the JavaFactory to use with this language connection
REMIND: this is only used by the compiler; should there be
a compiler module control class to boot compiler-only stuff? |
protected int |
getNextLCCInstanceNumber()
Get the instance # for the next LCC. |
org.apache.derby.iapi.sql.compile.NodeFactory |
getNodeFactory()
Get the NodeFactory to use with this language connection
REMIND: is this only used by the compiler? |
org.apache.derby.iapi.sql.compile.OptimizerFactory |
getOptimizerFactory()
Get the OptimizerFactory to use with this language connection |
org.apache.derby.iapi.services.property.PropertyFactory |
getPropertyFactory()
Get the PropertyFactory to use with this language connection |
org.apache.derby.iapi.sql.Statement |
getStatement(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor compilationSchema,
java.lang.String statementText)
Get a Statement for the connection |
org.apache.derby.iapi.services.cache.CacheManager |
getStatementCache()
returns the statement cache that this connection should use; currently
there is a statement cache per connection. |
org.apache.derby.iapi.sql.compile.TypeCompilerFactory |
getTypeCompilerFactory()
Get the TypeCompilerFactory to use with this language connection |
org.apache.derby.iapi.services.uuid.UUIDFactory |
getUUIDFactory()
Get the UUIDFactory to use with this language connection
REMIND: this is only used by the compiler; should there be
a compiler module control class to boot compiler-only stuff? |
void |
init(boolean dbOnly,
java.util.Dictionary p)
Initialize the properties for this callback. |
java.io.Serializable |
map(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p)
Map a proposed new value for a property to an official value. |
org.apache.derby.iapi.services.cache.Cacheable |
newCacheable(org.apache.derby.iapi.services.cache.CacheManager cm)
|
org.apache.derby.iapi.sql.conn.LanguageConnectionContext |
newLanguageConnectionContext(org.apache.derby.iapi.services.context.ContextManager cm,
org.apache.derby.iapi.store.access.TransactionController tc,
org.apache.derby.iapi.sql.LanguageFactory lf,
org.apache.derby.iapi.db.Database db,
java.lang.String userName,
java.lang.String drdaID,
java.lang.String dbname)
Get a LanguageConnectionContext. |
org.apache.derby.iapi.sql.compile.Parser |
newParser(org.apache.derby.iapi.sql.compile.CompilerContext cc)
|
protected void |
pushDataDictionaryContext(org.apache.derby.iapi.services.context.ContextManager cm)
|
protected void |
setStore()
|
protected void |
setValidation()
|
private int |
statementCacheSize(java.util.Properties startParams)
|
void |
stop()
Stop this module. |
boolean |
validate(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p)
Validate a property change. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dd
protected org.apache.derby.iapi.sql.dictionary.DataDictionary dd
ef
private org.apache.derby.iapi.sql.execute.ExecutionFactory ef
of
private org.apache.derby.iapi.sql.compile.OptimizerFactory of
tcf
private org.apache.derby.iapi.sql.compile.TypeCompilerFactory tcf
dvf
private org.apache.derby.iapi.types.DataValueFactory dvf
uuidFactory
private org.apache.derby.iapi.services.uuid.UUIDFactory uuidFactory
javaFactory
private org.apache.derby.iapi.services.compiler.JavaFactory javaFactory
classFactory
private org.apache.derby.iapi.services.loader.ClassFactory classFactory
nodeFactory
private org.apache.derby.iapi.sql.compile.NodeFactory nodeFactory
af
private org.apache.derby.iapi.store.access.AccessFactory af
pf
private org.apache.derby.iapi.services.property.PropertyFactory pf
nextLCCInstanceNumber
private int nextLCCInstanceNumber
cacheSize
private int cacheSize
singleStatementCache
private org.apache.derby.iapi.services.cache.CacheManager singleStatementCache
GenericLanguageConnectionFactory
public GenericLanguageConnectionFactory()
getStatement
public org.apache.derby.iapi.sql.Statement getStatement(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor compilationSchema,
java.lang.String statementText)
- Get a Statement for the connection
- Specified by:
getStatement in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
newLanguageConnectionContext
public org.apache.derby.iapi.sql.conn.LanguageConnectionContext newLanguageConnectionContext(org.apache.derby.iapi.services.context.ContextManager cm,
org.apache.derby.iapi.store.access.TransactionController tc,
org.apache.derby.iapi.sql.LanguageFactory lf,
org.apache.derby.iapi.db.Database db,
java.lang.String userName,
java.lang.String drdaID,
java.lang.String dbname)
throws org.apache.derby.iapi.error.StandardException
- Get a LanguageConnectionContext. this holds things
we want to remember about activity in the language system,
where this factory holds things that are pretty stable,
like other factories.
The returned LanguageConnectionContext is intended for use
only by the connection that requested it.
- Specified by:
newLanguageConnectionContext in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
newCacheable
public org.apache.derby.iapi.services.cache.Cacheable newCacheable(org.apache.derby.iapi.services.cache.CacheManager cm)
- Specified by:
newCacheable in interface org.apache.derby.iapi.services.cache.CacheableFactory
getUUIDFactory
public org.apache.derby.iapi.services.uuid.UUIDFactory getUUIDFactory()
- Get the UUIDFactory to use with this language connection
REMIND: this is only used by the compiler; should there be
a compiler module control class to boot compiler-only stuff?
- Specified by:
getUUIDFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getClassFactory
public org.apache.derby.iapi.services.loader.ClassFactory getClassFactory()
- Get the ClassFactory to use with this language connection
- Specified by:
getClassFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getJavaFactory
public org.apache.derby.iapi.services.compiler.JavaFactory getJavaFactory()
- Get the JavaFactory to use with this language connection
REMIND: this is only used by the compiler; should there be
a compiler module control class to boot compiler-only stuff?
- Specified by:
getJavaFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getNodeFactory
public org.apache.derby.iapi.sql.compile.NodeFactory getNodeFactory()
- Get the NodeFactory to use with this language connection
REMIND: is this only used by the compiler?
- Specified by:
getNodeFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getExecutionFactory
public org.apache.derby.iapi.sql.execute.ExecutionFactory getExecutionFactory()
- Get the ExecutionFactory to use with this language connection
- Specified by:
getExecutionFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getAccessFactory
public org.apache.derby.iapi.store.access.AccessFactory getAccessFactory()
- Get the AccessFactory to use with this language connection
- Specified by:
getAccessFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getPropertyFactory
public org.apache.derby.iapi.services.property.PropertyFactory getPropertyFactory()
- Get the PropertyFactory to use with this language connection
- Specified by:
getPropertyFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getOptimizerFactory
public org.apache.derby.iapi.sql.compile.OptimizerFactory getOptimizerFactory()
- Get the OptimizerFactory to use with this language connection
- Specified by:
getOptimizerFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getTypeCompilerFactory
public org.apache.derby.iapi.sql.compile.TypeCompilerFactory getTypeCompilerFactory()
- Get the TypeCompilerFactory to use with this language connection
- Specified by:
getTypeCompilerFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getDataValueFactory
public org.apache.derby.iapi.types.DataValueFactory getDataValueFactory()
- Get the DataValueFactory to use with this language connection
- Specified by:
getDataValueFactory in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
pushDataDictionaryContext
protected void pushDataDictionaryContext(org.apache.derby.iapi.services.context.ContextManager cm)
canSupport
public boolean canSupport(java.util.Properties startParams)
- this implementation will not support caching of statements.
- Specified by:
canSupport in interface org.apache.derby.iapi.services.monitor.ModuleSupportable
statementCacheSize
private int statementCacheSize(java.util.Properties startParams)
boot
public void boot(boolean create,
java.util.Properties startParams)
throws org.apache.derby.iapi.error.StandardException
- Start-up method for this instance of the language connection factory.
Note these are expected to be booted relative to a Database.
- Specified by:
boot in interface org.apache.derby.iapi.services.monitor.ModuleControl
bootDataDictionary
protected void bootDataDictionary(boolean create,
java.util.Properties startParams)
throws org.apache.derby.iapi.error.StandardException
getStatementCache
public org.apache.derby.iapi.services.cache.CacheManager getStatementCache()
- returns the statement cache that this connection should use; currently
there is a statement cache per connection.
- Specified by:
getStatementCache in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
stop
public void stop()
- Stop this module. In this case, nothing needs to be done.
- Specified by:
stop in interface org.apache.derby.iapi.services.monitor.ModuleControl
init
public void init(boolean dbOnly,
java.util.Dictionary p)
- Description copied from interface:
org.apache.derby.iapi.services.property.PropertySetCallback
- Initialize the properties for this callback.
Called when addPropertySetNotification() is called
with a non-null transaction controller.
This allows code to set read its initial property
values at boot time.
Code within an init() method should use the 3 argument
PropertyUtil method getPropertyFromSet() to obtain a property's value.
- Specified by:
init in interface org.apache.derby.iapi.services.property.PropertySetCallback
validate
public boolean validate(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.services.property.PropertySetCallback
- Validate a property change.
- Specified by:
validate in interface org.apache.derby.iapi.services.property.PropertySetCallback
apply
public org.apache.derby.iapi.services.daemon.Serviceable apply(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p)
- Description copied from interface:
org.apache.derby.iapi.services.property.PropertySetCallback
- Apply a property change. Will only be called after validate has been called
and only if validate returned true. If this method is called then the
new value is the value to be used, ie. the property is not set in the
overriding JVM system set.
- Specified by:
apply in interface org.apache.derby.iapi.services.property.PropertySetCallback
map
public java.io.Serializable map(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p)
- Description copied from interface:
org.apache.derby.iapi.services.property.PropertySetCallback
- Map a proposed new value for a property to an official value.
Will only be called after apply() has been called.
- Specified by:
map in interface org.apache.derby.iapi.services.property.PropertySetCallback
setValidation
protected void setValidation()
throws org.apache.derby.iapi.error.StandardException
setStore
protected void setStore()
throws org.apache.derby.iapi.error.StandardException
newParser
public org.apache.derby.iapi.sql.compile.Parser newParser(org.apache.derby.iapi.sql.compile.CompilerContext cc)
- Specified by:
newParser in interface org.apache.derby.iapi.sql.conn.LanguageConnectionFactory
getNextLCCInstanceNumber
protected int getNextLCCInstanceNumber()
- Get the instance # for the next LCC.
(Useful for logStatementText=true output.