Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.objectstyle.cayenne.project
Class ProjectDataSourceFactory  view ProjectDataSourceFactory download ProjectDataSourceFactory.java

java.lang.Object
  extended byorg.objectstyle.cayenne.conf.DriverDataSourceFactory
      extended byorg.objectstyle.cayenne.project.ProjectDataSourceFactory
All Implemented Interfaces:
org.objectstyle.cayenne.conf.DataSourceFactory

public class ProjectDataSourceFactory
extends org.objectstyle.cayenne.conf.DriverDataSourceFactory

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


Nested Class Summary
 
Nested classes inherited from class org.objectstyle.cayenne.conf.DriverDataSourceFactory
 
Field Summary
private static org.apache.log4j.Logger logObj
           
protected  java.io.File projectDir
           
 
Fields inherited from class org.objectstyle.cayenne.conf.DriverDataSourceFactory
driverInfo, logLevel, parentConfiguration, parser
 
Constructor Summary
ProjectDataSourceFactory(java.io.File projectDir)
           
 
Method Summary
 javax.sql.DataSource getDataSource(java.lang.String location, org.apache.log4j.Level logLevel)
          Returns DataSource object corresponding to location.
protected  org.objectstyle.cayenne.conn.DataSourceInfo getDriverInfo()
          Returns DataSourceInfo property.
 
Methods inherited from class org.objectstyle.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

logObj

private static org.apache.log4j.Logger logObj

projectDir

protected java.io.File projectDir
Constructor Detail

ProjectDataSourceFactory

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

getDataSource

public javax.sql.DataSource getDataSource(java.lang.String location,
                                          org.apache.log4j.Level logLevel)
                                   throws java.lang.Exception
Description copied from interface: org.objectstyle.cayenne.conf.DataSourceFactory
Returns DataSource object corresponding to location. Uses logLevel level of verbosity during data source loading. Concrete implementations may treat location differently - as a file path, JNDI location, etc.


getDriverInfo

protected org.objectstyle.cayenne.conn.DataSourceInfo getDriverInfo()
Description copied from class: org.objectstyle.cayenne.conf.DriverDataSourceFactory
Returns DataSourceInfo property.