com.atlassian.jira.configurator.db
Class PostgresDatabaseConfig
java.lang.Object
com.atlassian.jira.configurator.db.PostgresDatabaseConfig
- All Implemented Interfaces:
- DatabaseConfig
public class PostgresDatabaseConfig
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PostgresDatabaseConfig
public PostgresDatabaseConfig()
getDatabaseType
public String getDatabaseType()
getInstanceFieldName
public String getInstanceFieldName()
- Description copied from interface:
DatabaseConfig
- The name of the "Instance" field for this DB.
eg for Oracle it is "SID", while for MySQL and PostgreSQL it is "Database" and for MS-SQL it is "Instance".
- Returns:
- name of the "Instance" field for this DB.
getClassName
public String getClassName()
getUrl
public String getUrl(String hostname,
String port,
String instance)
throws ValidationException
- Description copied from interface:
DatabaseConfig
- Returns the JDBC URL for this DB config.
- Parameters:
hostname
- the hostnameport
- the TCP/IP port numberinstance
- the DB "instance"
- Returns:
- the JDBC URL for this DB config.
- Throws:
ValidationException
- If the underlying configuration is invalid for this DB type. eg for Postgres, "Database" (instance) is a required field
parseUrl
public DatabaseInstance parseUrl(String jdbcUrl)
throws ParseException
- Throws:
ParseException
getProtocolPrefix
protected String getProtocolPrefix()
removeProtocolPrefix
protected String removeProtocolPrefix(String jdbcUrl)
throws ParseException
- Throws:
ParseException
Copyright © 2002-2012 Atlassian. All Rights Reserved.