@Immutable public final class DataSourceDestination extends java.lang.Object implements Destination
| Constructor and Description |
|---|
DataSourceDestination(javax.sql.DataSource dataSource)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.sql.Connection |
getConnection()
Returns a connection to the destination database
|
int |
hashCode() |
java.lang.String |
toString() |
static DataSourceDestination |
with(javax.sql.DataSource dataSource)
Factory method creating a new DataSourceDestination.
|
public DataSourceDestination(@Nonnull javax.sql.DataSource dataSource)
dataSource - the wrapped DataSourcepublic static DataSourceDestination with(@Nonnull javax.sql.DataSource dataSource)
DbSetup dbSetup = new DbSetup(DataSourceDestination.with(dataSource), operation);
or, if this method is statically imported:
DbSetup dbSetup = new DbSetup(with(dataSource), operation);
instead of
DbSetup dbSetup = new DbSetup(new DataSourceDestination(dataSource), operation);
dataSource - the wrapped DataSourcepublic java.sql.Connection getConnection() throws java.sql.SQLException
DestinationgetConnection in interface Destinationjava.sql.SQLException - if a connection can't be returnedpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object