com.ninja_squad.dbsetup.destination
Class DataSourceDestination

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

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

A destination which wraps a DataSource and gets its connection from the wrapped DataSource


Constructor Summary
DataSourceDestination(javax.sql.DataSource dataSource)
          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

DataSourceDestination

public DataSourceDestination(@Nonnull
                             javax.sql.DataSource dataSource)
Constructor

Parameters:
dataSource - the wrapped DataSource
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