com.googlecode.jdbw.server
Class StandardDatabaseServer

java.lang.Object
  extended by com.googlecode.jdbw.server.AbstractDatabaseServer
      extended by com.googlecode.jdbw.server.StandardDatabaseServer
All Implemented Interfaces:
DatabaseServer, MultiCatalogDatabaseServer, NetworkDatabaseServer, UserAuthenticatedDatabaseServer
Direct Known Subclasses:
H2NetworkServer, MySQLServer, PostgresqlServer, SybaseASEServer

public abstract class StandardDatabaseServer
extends AbstractDatabaseServer
implements NetworkDatabaseServer, MultiCatalogDatabaseServer, UserAuthenticatedDatabaseServer

A common base class for DatabaseServers with are connected to over network and using a username/password for authentication. This class provides some helper methods and some default implementations for the interface methods.

Author:
Martin Berglund

Constructor Summary
protected StandardDatabaseServer(JDBCDriverDescriptor driverDescriptor, String hostname, int port, String catalog, String username, String password)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDefaultCatalog()
           
 String getHostname()
           
protected  String getJDBCUrl()
           
 String getPassword()
           
 int getPort()
           
 String getUsername()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class com.googlecode.jdbw.server.AbstractDatabaseServer
connect, getConnectionProperties, getDriverDescriptor, setConnectionProperty, testConnection
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.googlecode.jdbw.DatabaseServer
connect, getServerType, setConnectionProperty, testConnection
 

Constructor Detail

StandardDatabaseServer

protected StandardDatabaseServer(JDBCDriverDescriptor driverDescriptor,
                                 String hostname,
                                 int port,
                                 String catalog,
                                 String username,
                                 String password)
Method Detail

getDefaultCatalog

public String getDefaultCatalog()
Specified by:
getDefaultCatalog in interface MultiCatalogDatabaseServer

getHostname

public String getHostname()
Specified by:
getHostname in interface NetworkDatabaseServer

getPort

public int getPort()
Specified by:
getPort in interface NetworkDatabaseServer

getUsername

public String getUsername()
Specified by:
getUsername in interface UserAuthenticatedDatabaseServer

getPassword

public String getPassword()
Specified by:
getPassword in interface UserAuthenticatedDatabaseServer

getJDBCUrl

protected String getJDBCUrl()
Specified by:
getJDBCUrl in class AbstractDatabaseServer

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.