|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.config.database.JdbcDatasource.Builder
public static class JdbcDatasource.Builder
This is a builder class for constructing a JdbcDatasource manually.
Use the JdbcDatasource.builder()
factory to obtain an instance
of this class and call the various setXyzzy methods to
populate the fields. Those that are left unset or are explicitly
set to null will use their default values.
Constructor Summary | |
---|---|
JdbcDatasource.Builder()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JdbcDatasource.Builder()
Method Detail |
---|
public JdbcDatasource build()
IllegalArgumentException
- if the configuration is invalid, such as
if the username is left unspecified or if neither the JDBC URL nor
a database type is given.
InvalidDatabaseDriverException
- if the database driver is invalidpublic DatabaseType getDatabaseType()
public JdbcDatasource.Builder setDatabaseType(DatabaseType databaseType)
JDBC URL
is explicitly set. One or the other means of setting the URL is
required.
databaseType
- the database type for the JDBC URL
setJdbcUrl(String)
public String getHostname()
public JdbcDatasource.Builder setHostname(String hostname)
hostname
- the hostname for the JDBC URL
setDatabaseType(DatabaseType)
,
setJdbcUrl(String)
public String getPort()
public JdbcDatasource.Builder setPort(String port)
port
- the port for the JDBC URL
setDatabaseType(DatabaseType)
,
setJdbcUrl(String)
public String getInstance()
public JdbcDatasource.Builder setInstance(String instance)
instance
- the instance for the JDBC URL
setDatabaseType(DatabaseType)
,
setJdbcUrl(String)
public String getJdbcUrl()
public JdbcDatasource.Builder setJdbcUrl(String jdbcUrl)
driver class name
will
be required.
jdbcUrl
- the complete JDBC URL to use
setDatabaseType(DatabaseType)
,
setDriverClassName(String)
public String getDriverClassName()
public JdbcDatasource.Builder setDriverClassName(String driverClassName)
JDBC URL
is explicitly set. Otherwise, it is ignored.
driverClassName
- the class name of the JDBC driver to use
public String getUsername()
public JdbcDatasource.Builder setUsername(String username)
public String getPassword()
public JdbcDatasource.Builder setPassword(String password)
public Properties getConnectionProperties()
public JdbcDatasource.Builder setConnectionProperties(Properties connectionProperties)
public org.ofbiz.core.entity.config.ConnectionPoolInfo getConnectionPoolInfo()
public JdbcDatasource.Builder setConnectionPoolInfo(org.ofbiz.core.entity.config.ConnectionPoolInfo connectionPoolInfo)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |