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.conf
Class DriverDataSourceFactory

    java.lang.Object
      org.apache.cayenne.conf.DriverDataSourceFactory

All Implemented Interfaces:
  DataSourceFactory

    public class DriverDataSourceFactory

extends Object
implements DataSourceFactory

Creates DataSource objects from XML configuration files that describe a JDBC driver. Wraps JDBC driver in a generic DataSource implementation.

Field Summary
`protected DataSourceInfo` | `driverInfo`
`protected Configuration` | `parentConfiguration`
`protected XMLReader` | `parser`

Constructor Summary
`DriverDataSourceFactory()` Creates new DriverDataSourceFactory.

Method Summary
`DataSource` | `getDataSource(String location)` Returns DataSource object corresponding to `location`.
`protected DataSourceInfo` | `getDriverInfo()` Returns DataSourceInfo property.
`protected InputStream` | `getInputStream(String location)`
`void` | `initializeWithParentConfiguration(Configuration parentConfiguration)` Stores configuration object internally to use it later for resource loading.
`protected void` | `load(String location)` Loads driver information from the file at `location`.

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

Field Detail

### parser

    protected XMLReader parser

### driverInfo

    protected DataSourceInfo driverInfo

### parentConfiguration

    protected Configuration parentConfiguration

Constructor Detail

### DriverDataSourceFactory

    public DriverDataSourceFactory()
                            throws Exception

  Creates new DriverDataSourceFactory.

  Throws:
    `Exception`

Method Detail

### initializeWithParentConfiguration

    public void initializeWithParentConfiguration(Configuration parentConfiguration)

  Stores configuration object internally to use it later for resource loading.

  Specified by:
    `initializeWithParentConfiguration` in interface `DataSourceFactory`

### getDataSource

    public DataSource getDataSource(String location)
                             throws Exception

  Description copied from interface: `DataSourceFactory`
  Returns DataSource object corresponding to `location`. Concrete implementations may treat location differently - as a file path, JNDI location, etc.

  Specified by:
    `getDataSource` in interface `DataSourceFactory`
  Throws:
    `Exception`

### getDriverInfo

    protected DataSourceInfo getDriverInfo()

  Returns DataSourceInfo property.

### getInputStream

    protected InputStream getInputStream(String location)

### load

    protected void load(String location)
                 throws Exception

  Loads driver information from the file at `location`. Called internally from "getDataSource"

  Throws:
    `Exception`

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-2009 Apache Cayenne. All Rights Reserved.