de.hpi.fgis.dude.database.adapter
Class PostGreSQLDatabase

java.lang.Object
  extended by de.hpi.fgis.dude.database.adapter.Database
      extended by de.hpi.fgis.dude.database.adapter.PostGreSQLDatabase
All Implemented Interfaces:
AutoJsonable

public class PostGreSQLDatabase
extends Database

PostGreSQLDatabase encapsulates all the necessary information for establishing a connection to a PostGreSQL database.

Author:
Gerald Töpper

Constructor Summary
PostGreSQLDatabase(DBInfo dbInfo)
          Initializes the PostGreSQLDatabase instance members and loads the settings provided by the parameter dbInfo.
PostGreSQLDatabase(InputStream iStream)
          Initializes the PostGreSQLDatabase using the passed InputStream.
PostGreSQLDatabase(Properties prop)
          Initializes the PostGreSQLDatabase using the passed Properties.
 
Method Summary
 String getDatabaseDriverName()
          Returns the Driver's name used for loading the Driver class.
 String getJDBCString()
          Returns the JDBC String which can be used for representing a connection to this database.
 
Methods inherited from class de.hpi.fgis.dude.database.adapter.Database
createConnection, equals, getDatabaseName, getHost, getPort, getSQLSchema, loadDatabaseInformation, loadDatabaseInformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostGreSQLDatabase

public PostGreSQLDatabase(DBInfo dbInfo)
Initializes the PostGreSQLDatabase instance members and loads the settings provided by the parameter dbInfo.

Parameters:
dbInfo - Information needed for establishing a connection to this database.

PostGreSQLDatabase

public PostGreSQLDatabase(InputStream iStream)
Initializes the PostGreSQLDatabase using the passed InputStream. The information provided by this stream has to convertible into a Properties instance.

Parameters:
iStream - The InputStream that provides the connection information.

PostGreSQLDatabase

public PostGreSQLDatabase(Properties prop)
Initializes the PostGreSQLDatabase using the passed Properties.

Parameters:
prop - The Properties instance that provides the connection information.
Method Detail

getDatabaseDriverName

public String getDatabaseDriverName()
Description copied from class: Database
Returns the Driver's name used for loading the Driver class. The corresponding library has to be added to the build path.

Specified by:
getDatabaseDriverName in class Database
Returns:
The Driver class name which is used for the database connection.

getJDBCString

public String getJDBCString()
Description copied from class: Database
Returns the JDBC String which can be used for representing a connection to this database.

Specified by:
getJDBCString in class Database
Returns:
The JDBC String for this database connection.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.