com.ninja_squad.dbsetup.destination
Class DriverManagerDestination

java.lang.Object
  extended by com.ninja_squad.dbsetup.destination.DriverManagerDestination
All Implemented Interfaces:
Destination

@Immutable
public final class DriverManagerDestination
extends java.lang.Object
implements Destination

A destination which uses the DriverManager to get a connection


Constructor Summary
DriverManagerDestination(java.lang.String url, java.lang.String user, java.lang.String password)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.sql.Connection getConnection()
          Returns a connection to the destination database
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DriverManagerDestination

public DriverManagerDestination(@Nonnull
                                java.lang.String url,
                                java.lang.String user,
                                java.lang.String password)
Constructor

Parameters:
url - the URL of the database
user - the user used to get a connection
password - the password used to get a connection
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Description copied from interface: Destination
Returns a connection to the destination database

Specified by:
getConnection in interface Destination
Returns:
a connection to the destination database
Throws:
java.sql.SQLException - if a connection can't be returned

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object