Overview | Package | Class | 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:
  Andrei Adamchik

Field Summary
`protected java.io.File` | `projectDir`

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

Constructor Summary
`ProjectDataSourceFactory(java.io.File projectDir)`

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

Methods inherited from class org.apache.cayenne.conf.DriverDataSourceFactory
`getDataSource, 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 java.io.File projectDir

Constructor Detail

### ProjectDataSourceFactory

    public ProjectDataSourceFactory(java.io.File projectDir)
                             throws java.lang.Exception

Throws:
  `java.lang.Exception`

Method Detail

### getDataSource

    public javax.sql.DataSource getDataSource(java.lang.String location)
                                       throws java.lang.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:
    `java.lang.Exception`

### getDriverInfo

    protected DataSourceInfo getDriverInfo()

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

  Overrides:
    `getDriverInfo` in class `DriverDataSourceFactory`

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

Copyright © 2001-2006 Apache.org All Rights Reserved.