pedviz.loader
Class PostgreSQLDatabase

java.lang.Object
  extended by pedviz.loader.PostgreSQLDatabase
All Implemented Interfaces:
Database

public class PostgreSQLDatabase
extends java.lang.Object
implements Database

This class allows the DatabaseGraphLoader to load data from a PostgreSQL database.

Author:
lukas forer

Constructor Summary
PostgreSQLDatabase()
           
 
Method Summary
 void close()
          Closes the db connection.
 boolean connect(java.lang.String user, java.lang.String password, java.lang.String host)
          Connects to the db with the given username, password and host.
 java.sql.ResultSet executeQuerie(java.lang.String querie)
          Executes the given Querie.
 java.sql.Connection getConnection()
          Returns the connection.
 java.lang.String getInfo()
          Returns some informations about the db.
 boolean isConnected()
          Returns true, if the db is connected.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgreSQLDatabase

public PostgreSQLDatabase()
Method Detail

connect

public boolean connect(java.lang.String user,
                       java.lang.String password,
                       java.lang.String host)
Description copied from interface: Database
Connects to the db with the given username, password and host.

Specified by:
connect in interface Database
Returns:
true, if the connection is ok.

close

public void close()
Description copied from interface: Database
Closes the db connection.

Specified by:
close in interface Database

isConnected

public boolean isConnected()
Description copied from interface: Database
Returns true, if the db is connected.

Specified by:
isConnected in interface Database
Returns:
true, if the db is connected.

getInfo

public java.lang.String getInfo()
Description copied from interface: Database
Returns some informations about the db.

Specified by:
getInfo in interface Database
Returns:
some informations about the db.

executeQuerie

public java.sql.ResultSet executeQuerie(java.lang.String querie)
Description copied from interface: Database
Executes the given Querie.

Specified by:
executeQuerie in interface Database
Returns:
result

getConnection

public java.sql.Connection getConnection()
Description copied from interface: Database
Returns the connection.

Specified by:
getConnection in interface Database
Returns:
connection