org.apache.cayenne.configuration.server
Class DefaultDbAdapterFactory
java.lang.Object
org.apache.cayenne.configuration.server.DefaultDbAdapterFactory
- All Implemented Interfaces:
- DbAdapterFactory
public class DefaultDbAdapterFactory
- extends Object
- implements DbAdapterFactory
A factory of DbAdapters that either loads user-provided adapter or guesses
the adapter type from the database metadata.
- Since:
- 3.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
injector
protected Injector injector
jdbcEventLogger
protected JdbcEventLogger jdbcEventLogger
objectFactory
protected AdhocObjectFactory objectFactory
detectors
protected List<DbAdapterDetector> detectors
DefaultDbAdapterFactory
public DefaultDbAdapterFactory(List<DbAdapterDetector> detectors)
createAdapter
public DbAdapter createAdapter(DataNodeDescriptor nodeDescriptor,
DataSource dataSource)
throws Exception
- Description copied from interface:
DbAdapterFactory
- Returns an instance of DbAdapter if the factory detects that it knows how to handle
the database.
- Specified by:
createAdapter
in interface DbAdapterFactory
- Throws:
Exception
detectAdapter
protected DbAdapter detectAdapter(DataSource dataSource)
detectAdapter
protected DbAdapter detectAdapter(DatabaseMetaData metaData)
throws SQLException
- Throws:
SQLException
defaultAdapter
protected DbAdapter defaultAdapter()
Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.