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.project
Class ProjectDataSourceFactory

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

All Implemented Interfaces:
  DataSourceFactory

    public class ProjectDataSourceFactory

extends DriverDataSourceFactory

Factory of DataSource objects used by the project model. Always tries to locate file with direct connection info.

Author:
  Andrus Adamchik

Field Summary
`protected File` | `projectDir`

Fields inherited from class org.apache.cayenne.conf.DriverDataSourceFactory
`driverInfo, parentConfiguration, parser`

Constructor Summary
`ProjectDataSourceFactory(File projectDir)`

Method Summary
`DataSource` | `getDataSource(String location)` Returns DataSource object corresponding to `location`.
`protected DataSourceInfo` | `getDriverInfo()` Returns DataSourceInfo property.

Methods inherited from class org.apache.cayenne.conf.DriverDataSourceFactory
`getInputStream, initializeWithParentConfiguration, load`

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

Field Detail

### projectDir

    protected File projectDir

Constructor Detail

### ProjectDataSourceFactory

    public ProjectDataSourceFactory(File projectDir)
                             throws Exception

Throws:
  `Exception`

Method Detail

### 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`
  Overrides:
    `getDataSource` in class `DriverDataSourceFactory`
  Throws:
    `Exception`

### getDriverInfo

    protected DataSourceInfo getDriverInfo()

  Description copied from class: `DriverDataSourceFactory`
  Returns DataSourceInfo property.

  Overrides:
    `getDriverInfo` in class `DriverDataSourceFactory`

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