|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ninja_squad.dbsetup.destination.DriverManagerDestination
@Immutable public final class DriverManagerDestination
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()
|
static DriverManagerDestination |
with(java.lang.String url,
java.lang.String user,
java.lang.String password)
Factory method creating a new DriverManagerDestination. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DriverManagerDestination(@Nonnull java.lang.String url, java.lang.String user, java.lang.String password)
url
- the URL of the databaseuser
- the user used to get a connectionpassword
- the password used to get a connectionMethod Detail |
---|
public static DriverManagerDestination with(@Nonnull java.lang.String url, java.lang.String user, java.lang.String password)
DbSetup dbSetup = new DbSetup(DriverManagerDestination.with(url, user, password), operation);or, if this method is statically imported:
DbSetup dbSetup = new DbSetup(with(url, user, password), operation);instead of
DbSetup dbSetup = new DbSetup(new DriverManagerDestination(url, user, password), operation);
url
- the URL of the databaseuser
- the user used to get a connectionpassword
- the password used to get a connectionpublic java.sql.Connection getConnection() throws java.sql.SQLException
Destination
getConnection
in interface Destination
java.sql.SQLException
- if a connection can't be returnedpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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 |