|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ninja_squad.dbsetup.destination.DataSourceDestination
@Immutable public final class DataSourceDestination
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()
|
static DataSourceDestination |
with(javax.sql.DataSource dataSource)
Factory method creating a new DataSourceDestination. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceDestination(@Nonnull
javax.sql.DataSource dataSource)
dataSource - the wrapped DataSource| Method Detail |
|---|
public 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 DataSource
public java.sql.Connection getConnection()
throws java.sql.SQLException
Destination
getConnection 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||