de.suse.lib.sqlmap.drivers
Class PgSQLDriver

java.lang.Object
  extended by de.suse.lib.sqlmap.drivers.GenericDriver
      extended by de.suse.lib.sqlmap.drivers.PgSQLDriver
All Implemented Interfaces:
DBConnectionDriver

public class PgSQLDriver
extends GenericDriver


Field Summary
 
Fields inherited from class de.suse.lib.sqlmap.drivers.GenericDriver
callback, connection
 
Constructor Summary
PgSQLDriver(java.sql.Connection conn)
          Create a driver out of the connection.
PgSQLDriver(java.lang.String url)
          Create a driver to an URL connection.
 
Method Summary
 PgSQLDriver connect(java.lang.String user, java.lang.String password)
          Connect to the PostgreSQL database with already given URL.
 java.sql.Connection getConnection()
           
protected  void parseURL()
          Parse URL for connect.
 PgSQLDriver setUseSSL(boolean useSSL)
          Use SSL connection?
 
Methods inherited from class de.suse.lib.sqlmap.drivers.GenericDriver
close, getDatabase, getHost, getPort, getUrl, isConnected, setConnectionCallback, setDatabase, setHost, setPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgSQLDriver

public PgSQLDriver(java.lang.String url)
            throws java.net.URISyntaxException,
                   java.lang.ClassNotFoundException,
                   java.sql.SQLException,
                   java.lang.Exception
Create a driver to an URL connection.

Parameters:
url -
Throws:
java.net.URISyntaxException
java.lang.ClassNotFoundException
java.sql.SQLException
java.lang.Exception

PgSQLDriver

public PgSQLDriver(java.sql.Connection conn)
Create a driver out of the connection.

Parameters:
conn -
Method Detail

parseURL

protected void parseURL()
                 throws java.sql.SQLException
Description copied from class: GenericDriver
Parse URL for connect.

Overrides:
parseURL in class GenericDriver
Throws:
java.sql.SQLException

setUseSSL

public PgSQLDriver setUseSSL(boolean useSSL)
Use SSL connection?

Parameters:
useSSL -

connect

public PgSQLDriver connect(java.lang.String user,
                           java.lang.String password)
                    throws java.lang.Exception
Connect to the PostgreSQL database with already given URL.

Specified by:
connect in interface DBConnectionDriver
Overrides:
connect in class GenericDriver
Parameters:
user -
password -
Returns:
Throws:
java.lang.Exception

getConnection

public java.sql.Connection getConnection()
Specified by:
getConnection in interface DBConnectionDriver
Overrides:
getConnection in class GenericDriver