org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql
Class DriverConnectionProvider

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.DriverConnectionProvider
All Implemented Interfaces:
Serializable, ConnectionProvider

public class DriverConnectionProvider
extends Object
implements ConnectionProvider

Creation-Date: 07.04.2006, 15:04:26

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
DriverConnectionProvider()
           
 
Method Summary
 Connection createConnection(String user, String password)
          Although named getConnection() this method should always return a new connection when being queried or should wrap the connection in a way so that calls to "close()" on that connection do not prevent subsequent calls to this method to fail.
 boolean equals(Object o)
           
 Object getConnectionHash()
           
 String getDriver()
           
 String getProperty(String key)
           
 String[] getPropertyNames()
           
 String getUrl()
           
 int hashCode()
           
 void setDriver(String driver)
           
 Object setProperty(String key, String value)
           
 void setUrl(String url)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverConnectionProvider

public DriverConnectionProvider()
Method Detail

getProperty

public String getProperty(String key)

setProperty

public Object setProperty(String key,
                          String value)

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

getDriver

public String getDriver()

setDriver

public void setDriver(String driver)

createConnection

public Connection createConnection(String user,
                                   String password)
                            throws SQLException
Although named getConnection() this method should always return a new connection when being queried or should wrap the connection in a way so that calls to "close()" on that connection do not prevent subsequent calls to this method to fail.

Specified by:
createConnection in interface ConnectionProvider
Parameters:
user - the user name.
password - the password.
Returns:
the connection.
Throws:
SQLException - if the connection has errors.

getConnectionHash

public Object getConnectionHash()
Specified by:
getConnectionHash in interface ConnectionProvider

getPropertyNames

public String[] getPropertyNames()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object