|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sessions.DefaultConnector
public class DefaultConnector
Purpose:Use this Connector to build a java.sql.Connection in the "standard" fashion, via the DriverManager.
Field Summary | |
---|---|
protected java.lang.String |
databaseURL
|
protected java.sql.Driver |
driver
cache up the instantiated Driver to speed up reconnects |
protected java.lang.Class |
driverClass
cache up the driver class to speed up reconnects |
protected java.lang.String |
driverClassName
|
protected java.lang.String |
driverURLHeader
|
Constructor Summary | |
---|---|
DefaultConnector()
PUBLIC: Construct a Connector with default settings The database URL will still need to be set. |
|
DefaultConnector(java.lang.String driverClassName,
java.lang.String driverURLHeader,
java.lang.String databaseURL)
PUBLIC: Construct a Connector with the specified settings. |
Method Summary | |
---|---|
void |
clearDriverClassAndDriver()
INTERNAL: Discard the cached driver class and driver. |
java.lang.Object |
clone()
INTERNAL: Clone the connector. |
java.sql.Connection |
connect(java.util.Properties properties,
Session session)
INTERNAL: Connect with the specified properties and session. |
protected java.sql.Connection |
directConnect(java.util.Properties properties)
INTERNAL: Connect directly - without using DriverManager. |
java.lang.String |
getConnectionDetails()
PUBLIC: Provide the details of my connection information. |
java.lang.String |
getConnectionString()
PUBLIC: Return the JDBC connection string. |
java.lang.String |
getDatabaseURL()
PUBLIC: The database URL is the JDBC URL for the database server. |
java.lang.String |
getDriverClassName()
PUBLIC: The driver class is the name of the Java class for the JDBC driver being used (e.g. |
java.lang.String |
getDriverURLHeader()
PUBLIC: The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. |
protected void |
initialize(java.lang.String driverClassName,
java.lang.String driverURLHeader,
java.lang.String databaseURL)
INTERNAL: Initialize the connector with the specified settings. |
protected void |
instantiateDriver()
INTERNAL: Instantiate the Driver. |
protected void |
loadDriverClass(Session session)
INTERNAL: Ensure that the driver has been loaded and registered with the DriverManager. |
void |
setDatabaseURL(java.lang.String databaseURL)
PUBLIC: The database URL is the JDBC URL for the database server. |
void |
setDriverClassName(java.lang.String driverClassName)
PUBLIC: The driver class is the name of the Java class for the JDBC driver being used (e.g. |
void |
setDriverURLHeader(java.lang.String driverURLHeader)
PUBLIC: The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. |
boolean |
shouldUseDriverManager(java.util.Properties properties,
Session session)
INTERNAL: Indicates whether DriverManager should be used. |
java.lang.String |
toString()
PUBLIC: Print connection string. |
void |
toString(java.io.PrintWriter writer)
INTERNAL: Print something useful on the log. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String driverClassName
protected java.lang.String driverURLHeader
protected java.lang.String databaseURL
protected java.lang.Class driverClass
protected java.sql.Driver driver
Constructor Detail |
---|
public DefaultConnector()
public DefaultConnector(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)
Method Detail |
---|
public java.lang.Object clone()
clone
in interface Connector
clone
in class java.lang.Object
public java.sql.Connection connect(java.util.Properties properties, Session session) throws DatabaseException
connect
in interface Connector
DatabaseException
public boolean shouldUseDriverManager(java.util.Properties properties, Session session)
protected java.sql.Connection directConnect(java.util.Properties properties) throws DatabaseException
DatabaseException
public java.lang.String getConnectionString()
public java.lang.String getConnectionDetails()
getConnectionDetails
in interface Connector
public java.lang.String getDatabaseURL()
public java.lang.String getDriverClassName()
public java.lang.String getDriverURLHeader()
protected void initialize(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)
protected void loadDriverClass(Session session) throws DatabaseException
DatabaseException
public void setDatabaseURL(java.lang.String databaseURL)
public void setDriverClassName(java.lang.String driverClassName)
public void setDriverURLHeader(java.lang.String driverURLHeader)
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.io.PrintWriter writer)
toString
in interface Connector
protected void instantiateDriver() throws DatabaseException
DatabaseException
public void clearDriverClassAndDriver()
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |