org.apache.openjpa.jdbc.schema
Class SimpleDriverDataSource

java.lang.Object
  extended by org.apache.openjpa.jdbc.schema.SimpleDriverDataSource
All Implemented Interfaces:
DataSource, DriverDataSource

public class SimpleDriverDataSource
extends Object
implements DriverDataSource

Non-pooling driver data source.


Constructor Summary
SimpleDriverDataSource()
           
 
Method Summary
 List createConnectionDecorators()
          Provide any built-in decorators; may be null.
 ClassLoader getClassLoader()
          Classloader for loading driver class, etc.
 Connection getConnection()
           
 Connection getConnection(Properties props)
           
 Connection getConnection(String username, String password)
           
 String getConnectionDriverName()
          Driver class name.
 Properties getConnectionFactoryProperties()
          Configuration of datasource properties.
 Properties getConnectionProperties()
          Configuration of connection.
 String getConnectionURL()
          JDBC URL.
 String getConnectionUserName()
          JDBC user name.
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 void initDBDictionary(DBDictionary dict)
          Initialize self and dictionary once available.
 void setClassLoader(ClassLoader classLoader)
          JDBC password.
 void setConnectionDriverName(String connectionDriverName)
          Driver class name.
 void setConnectionFactoryProperties(Properties props)
          Configuration of datasource properties.
 void setConnectionPassword(String connectionPassword)
          JDBC password.
 void setConnectionProperties(Properties props)
          Configuration of connection.
 void setConnectionURL(String connectionURL)
          JDBC URL.
 void setConnectionUserName(String connectionUserName)
          JDBC user name.
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDriverDataSource

public SimpleDriverDataSource()
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

getConnection

public Connection getConnection(String username,
                                String password)
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

getConnection

public Connection getConnection(Properties props)
                         throws SQLException
Throws:
SQLException

getLoginTimeout

public int getLoginTimeout()
Specified by:
getLoginTimeout in interface DataSource

setLoginTimeout

public void setLoginTimeout(int seconds)
Specified by:
setLoginTimeout in interface DataSource

getLogWriter

public PrintWriter getLogWriter()
Specified by:
getLogWriter in interface DataSource

setLogWriter

public void setLogWriter(PrintWriter out)
Specified by:
setLogWriter in interface DataSource

initDBDictionary

public void initDBDictionary(DBDictionary dict)
Description copied from interface: DriverDataSource
Initialize self and dictionary once available.

Specified by:
initDBDictionary in interface DriverDataSource

setConnectionURL

public void setConnectionURL(String connectionURL)
Description copied from interface: DriverDataSource
JDBC URL.

Specified by:
setConnectionURL in interface DriverDataSource

getConnectionURL

public String getConnectionURL()
Description copied from interface: DriverDataSource
JDBC URL.

Specified by:
getConnectionURL in interface DriverDataSource

setConnectionUserName

public void setConnectionUserName(String connectionUserName)
Description copied from interface: DriverDataSource
JDBC user name.

Specified by:
setConnectionUserName in interface DriverDataSource

getConnectionUserName

public String getConnectionUserName()
Description copied from interface: DriverDataSource
JDBC user name.

Specified by:
getConnectionUserName in interface DriverDataSource

setConnectionPassword

public void setConnectionPassword(String connectionPassword)
Description copied from interface: DriverDataSource
JDBC password.

Specified by:
setConnectionPassword in interface DriverDataSource

setConnectionProperties

public void setConnectionProperties(Properties props)
Description copied from interface: DriverDataSource
Configuration of connection.

Specified by:
setConnectionProperties in interface DriverDataSource

getConnectionProperties

public Properties getConnectionProperties()
Description copied from interface: DriverDataSource
Configuration of connection.

Specified by:
getConnectionProperties in interface DriverDataSource

setConnectionFactoryProperties

public void setConnectionFactoryProperties(Properties props)
Description copied from interface: DriverDataSource
Configuration of datasource properties.

Specified by:
setConnectionFactoryProperties in interface DriverDataSource

getConnectionFactoryProperties

public Properties getConnectionFactoryProperties()
Description copied from interface: DriverDataSource
Configuration of datasource properties.

Specified by:
getConnectionFactoryProperties in interface DriverDataSource

createConnectionDecorators

public List createConnectionDecorators()
Description copied from interface: DriverDataSource
Provide any built-in decorators; may be null.

Specified by:
createConnectionDecorators in interface DriverDataSource

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Description copied from interface: DriverDataSource
JDBC password.

Specified by:
setClassLoader in interface DriverDataSource

getClassLoader

public ClassLoader getClassLoader()
Description copied from interface: DriverDataSource
Classloader for loading driver class, etc.

Specified by:
getClassLoader in interface DriverDataSource

setConnectionDriverName

public void setConnectionDriverName(String connectionDriverName)
Description copied from interface: DriverDataSource
Driver class name.

Specified by:
setConnectionDriverName in interface DriverDataSource

getConnectionDriverName

public String getConnectionDriverName()
Description copied from interface: DriverDataSource
Driver class name.

Specified by:
getConnectionDriverName in interface DriverDataSource


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.