public enum DatabaseType extends Enum<DatabaseType>
Enum Constant and Description |
---|
HSQL |
MSSQL |
MYSQL |
ORACLE |
POSTGRESQL |
Modifier and Type | Method and Description |
---|---|
String |
generateUrl(String hostName,
String database)
Produces a JDBC URL incorporating the given host name, database name and default port.
|
abstract String |
generateUrl(String hostName,
String database,
int port)
Produces a JDBC URL incorporating the given host name, database name and port.
|
int |
getDefaultPort() |
String |
getDriverClassName() |
String |
getKey() |
String |
getProtocol() |
static DatabaseType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DatabaseType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DatabaseType HSQL
public static final DatabaseType MSSQL
public static final DatabaseType MYSQL
public static final DatabaseType ORACLE
public static final DatabaseType POSTGRESQL
public static DatabaseType[] values()
for (DatabaseType c : DatabaseType.values()) System.out.println(c);
public static DatabaseType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getKey()
public String getProtocol()
public String getDriverClassName()
public int getDefaultPort()
@NotNull public String generateUrl(@NotNull String hostName, @NotNull String database)
hostName
- the host name of the machine on which the database is runningdatabase
- the name of the database, or alternatively its service identifier@NotNull public abstract String generateUrl(@NotNull String hostName, @NotNull String database, int port)
hostName
- the host name of the machine on which the database is runningdatabase
- the name of the database, or alternatively its service identifierport
- the port on which the database can be accessed at the hostName
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.