Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.configuration.server
Class DefaultDbAdapterFactory

    java.lang.Object
      org.apache.cayenne.configuration.server.DefaultDbAdapterFactory

All Implemented Interfaces:
  DbAdapterFactory

    public class DefaultDbAdapterFactory

extends java.lang.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

Field Summary
`protected java.util.List<DbAdapterDetector>` | `detectors`
`protected Injector` | `injector`
`protected JdbcEventLogger` | `jdbcEventLogger`
`protected AdhocObjectFactory` | `objectFactory`

Constructor Summary
`DefaultDbAdapterFactory(java.util.List<DbAdapterDetector> detectors)`

Method Summary
`DbAdapter` | `createAdapter(DataNodeDescriptor nodeDescriptor, javax.sql.DataSource dataSource)` Returns an instance of DbAdapter if the factory detects that it knows how to handle the database.
`protected DbAdapter` | `defaultAdapter()`
`protected DbAdapter` | `detectAdapter(java.sql.DatabaseMetaData metaData)`
`protected DbAdapter` | `detectAdapter(javax.sql.DataSource dataSource)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### injector

    protected Injector injector

### jdbcEventLogger

    protected JdbcEventLogger jdbcEventLogger

### objectFactory

    protected AdhocObjectFactory objectFactory

### detectors

    protected java.util.List<DbAdapterDetector> detectors

Constructor Detail

### DefaultDbAdapterFactory

    public DefaultDbAdapterFactory(java.util.List<DbAdapterDetector> detectors)

Method Detail

### createAdapter

    public DbAdapter createAdapter(DataNodeDescriptor nodeDescriptor,
                                   javax.sql.DataSource dataSource)
                            throws java.lang.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:
    `java.lang.Exception`

### detectAdapter

    protected DbAdapter detectAdapter(javax.sql.DataSource dataSource)

### detectAdapter

    protected DbAdapter detectAdapter(java.sql.DatabaseMetaData metaData)
                               throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### defaultAdapter

    protected DbAdapter defaultAdapter()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.