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

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

public class JndiConnectionProvider
extends Object
implements ConnectionProvider

Todo: Document Me

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
JndiConnectionProvider()
           
 
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 getConnectionPath()
           
 String getPassword()
           
 String getUsername()
           
 int hashCode()
           
 void setConnectionPath(String connectionPath)
           
 void setPassword(String password)
           
 void setUsername(String username)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiConnectionProvider

public JndiConnectionProvider()
Method Detail

getConnectionPath

public String getConnectionPath()

setConnectionPath

public void setConnectionPath(String connectionPath)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

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.

equals

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

getConnectionHash

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object