org.dbmaintain.script.runner.impl.db2
Class Db2ConnectionInfo
java.lang.Object
org.dbmaintain.script.runner.impl.db2.Db2ConnectionInfo
public class Db2ConnectionInfo
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PORT
protected static String DEFAULT_PORT
host
protected String host
port
protected String port
databaseName
protected String databaseName
remoteAlias
protected String remoteAlias
userName
protected String userName
password
protected String password
Db2ConnectionInfo
public Db2ConnectionInfo(String databaseName,
String userName,
String password)
Db2ConnectionInfo
public Db2ConnectionInfo(String host,
String port,
String databaseName,
String remoteAlias,
String userName,
String password)
isRemote
public boolean isRemote()
getHost
public String getHost()
getPort
public String getPort()
getDatabaseName
public String getDatabaseName()
getDatabaseAlias
public String getDatabaseAlias()
getUserName
public String getUserName()
getPassword
public String getPassword()
parseFromJdbcUrl
public static Db2ConnectionInfo parseFromJdbcUrl(String jdbcUrl,
String remoteAlias,
String userName,
String password)
parseFromType4JdbcUrl
protected static Db2ConnectionInfo parseFromType4JdbcUrl(String jdbcUrl,
String remoteAlias,
String userName,
String password)
- A type 4 connection url has following structure: jdbc:(db2)|(db:net)|(ids)://host(:port)/database
- Parameters:
jdbcUrl
- The url to parse, not nullremoteAlias
- An alias for defining the remote connection, not nulluserName
- The user name, not nullpassword
- The password, not null
- Returns:
- the connection info, not null
parseFromType2JdbcUrl
protected static Db2ConnectionInfo parseFromType2JdbcUrl(String jdbcUrl,
String userName,
String password)
- A type 2 connection url has following structure: jdbc:db2:database
- Parameters:
jdbcUrl
- The url to parse, not nulluserName
- The user name, not nullpassword
- The password, not null
- Returns:
- the connection info, not null
Copyright © 2011. All Rights Reserved.