org.apache.cayenne.project
Class ProjectDataSourceFactory
java.lang.Object
   org.apache.cayenne.project.ProjectDataSourceFactory
org.apache.cayenne.project.ProjectDataSourceFactory
- All Implemented Interfaces: 
- DataSourceFactory
- public class ProjectDataSourceFactory 
- extends Object- implements DataSourceFactory
Factory of DataSource objects used by the project model. Always tries to locate file
 with direct connection info.
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
projectDir
protected File projectDir
loadFromXML
protected boolean loadFromXML
parentConfiguration
protected Configuration parentConfiguration
ProjectDataSourceFactory
public ProjectDataSourceFactory(File projectDir)
ProjectDataSourceFactory
public ProjectDataSourceFactory(File projectDir,
                                boolean loadFromXML)
initializeWithParentConfiguration
public void initializeWithParentConfiguration(Configuration parentConfiguration)
- Description copied from interface: DataSourceFactory
- Initializes factory with the parent configuration object.
 
- 
- Specified by:
- initializeWithParentConfigurationin 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:
- getDataSourcein interface- DataSourceFactory
 
- 
- Throws:
- Exception
 
getDriverInfo
protected DataSourceInfo getDriverInfo(String location)
                                throws Exception
- Returns a DataSourceInfoobject, loading it from XML file if the factory is
 configured to do so.
 
- 
 
- 
- Throws:
- Exception
 
Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.