public abstract class DBTools extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DATABASE_PASSWORD
Default database password.
|
static String |
DEFAULT_DATABASE_USER
Default user to use when connecting to the database.
|
static String |
DEFAULT_JDBC_DRIVER
Default Sybase JDBC driver to use.
|
static String |
DEFAULT_URL
Default vendor protocol, like jdbc:postgresql
|
static int |
MAX_PORT_VALUE
Maximum port range
|
static int |
MIN_PORT_VALUE
Minimal port range
|
static String |
POSTGRESQL_JDBC_DRIVER
PostgreSQL JDBC driver
|
Constructor and Description |
---|
DBTools() |
Modifier and Type | Method and Description |
---|---|
static String |
constructUrl(String url_,
String hostname_)
Constructs a JDBC url given a set of fragments.
|
public static final int MIN_PORT_VALUE
public static final int MAX_PORT_VALUE
public static final String DEFAULT_JDBC_DRIVER
public static final String POSTGRESQL_JDBC_DRIVER
public static final String DEFAULT_DATABASE_USER
public static final String DEFAULT_DATABASE_PASSWORD
public static final String DEFAULT_URL
public static String constructUrl(String url_, String hostname_) throws IllegalArgumentException, NullPointerException
jdbc:<protocol>:hostname:4100
hostname_
- The hostname where the database server isurl_
- (for example jdbc:sybase:Tds:@{link #OPENNMS_JDBC_HOSTNAME
OPENNMS_JDBC_HOSTNAME}:4100/tempdb). The OPENNMS_JDBC_HOSTNAME is replaced by the real
hostnameString
object.NullPointerException
- If one of the arguments is nullIllegalArgumentException
- If the OPENNMS_JDBC_HOSTNAME is not part of the JDBC urlCopyright © 2021. All rights reserved.