@Entity public class DatabaseConnection extends Object implements Auditable<Integer>
SiteApplication
.SiteApplication.getDatabaseConnection()
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
DatabaseConnection.DatabaseType
enum-type for the supported databases
|
Modifier and Type | Field and Description |
---|---|
static String |
DB_PLACEHOLDER |
Constructor and Description |
---|
DatabaseConnection() |
DatabaseConnection(DatabaseConnection.DatabaseType type,
String databaseName,
String userName,
byte[] password) |
DatabaseConnection(DatabaseConnection.DatabaseType type,
String jdbcUrl,
String driverClass,
String userName,
byte[] password,
String validationQuery) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(Connection connection) |
Connection |
getConnection() |
String |
getDatabaseConnectionString(String databaseName) |
String |
getDatabaseName() |
Double |
getDatabaseSize() |
DataSource |
getDataSource() |
String |
getDescription()
Returns the description.
|
@NotNull(message="{validation.notNull}") String |
getDriverClass() |
Integer |
getId()
Returns the id.
|
@NotNull(message="{validation.notNull}") String |
getJdbcUrl() |
@NotNull(message="{validation.notNull}") Integer |
getMaxConnections() |
org.flywaydb.core.api.MigrationInfoService |
getMigrationInfoService() |
@NotNull(message="{validation.notNull}") @Min(value=1L,message="{validation.min}") Integer |
getMinConnections() |
@NotNull(message="{validation.notNull}") String |
getName()
Returns the name.
|
byte[] |
getPassword() |
String |
getPasswordPlain() |
Site |
getSite() |
@NotNull(message="{validation.notNull}") DatabaseConnection.DatabaseType |
getType() |
@NotNull(message="{validation.notNull}") String |
getUserName() |
Integer |
getValidationPeriod() |
String |
getValidationQuery() |
Date |
getVersion()
Returns the version.
|
boolean |
isActive() |
boolean |
isManaged() |
boolean |
isRootConnection() |
void |
registerDriver(boolean throwException) |
void |
setActive(boolean active) |
void |
setDatabaseSize(Double databaseSize) |
void |
setDescription(String description) |
void |
setDriverClass(String driverClass) |
void |
setId(Integer id) |
void |
setJdbcUrl(String jdbcUrl) |
void |
setManaged(boolean managed) |
void |
setMaxConnections(Integer maxConnections) |
void |
setMigrationInfoService(org.flywaydb.core.api.MigrationInfoService migrationInfoService) |
void |
setMinConnections(Integer minConnections) |
void |
setName(String name) |
void |
setPassword(byte[] password) |
void |
setPasswordPlain(String passwordPlain) |
void |
setSite(Site site) |
void |
setType(DatabaseConnection.DatabaseType type) |
void |
setUserName(String userName) |
void |
setValidationPeriod(Integer validationPeriod) |
void |
setValidationQuery(String validationQuery) |
void |
setVersion(Date version) |
boolean |
testConnection(boolean determineSize,
org.springframework.jdbc.core.ConnectionCallback<?>... callbacks) |
boolean |
testConnection(StringBuilder dbInfo) |
boolean |
testConnection(StringBuilder dbInfo,
boolean determineSize) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAuditName
public static final String DB_PLACEHOLDER
public DatabaseConnection()
public DatabaseConnection(DatabaseConnection.DatabaseType type, String databaseName, String userName, byte[] password)
public DatabaseConnection(DatabaseConnection.DatabaseType type, String jdbcUrl, String driverClass, String userName, byte[] password, String validationQuery)
public Integer getId()
Identifiable
getId
in interface Identifiable<Integer>
public void setId(Integer id)
@NotNull(message="{validation.notNull}") public @NotNull(message="{validation.notNull}") DatabaseConnection.DatabaseType getType()
public void setType(DatabaseConnection.DatabaseType type)
@NotNull(message="{validation.notNull}") public @NotNull(message="{validation.notNull}") String getName()
Nameable
public void setName(String name)
@NotNull(message="{validation.notNull}") public @NotNull(message="{validation.notNull}") String getJdbcUrl()
public void setJdbcUrl(String jdbcUrl)
@NotNull(message="{validation.notNull}") public @NotNull(message="{validation.notNull}") String getUserName()
public void setUserName(String userName)
public byte[] getPassword()
public void setPassword(byte[] password)
@NotNull(message="{validation.notNull}") public @NotNull(message="{validation.notNull}") String getDriverClass()
public void setDriverClass(String driverClass)
public Date getVersion()
Versionable
getVersion
in interface Versionable<Date>
public void setVersion(Date version)
public String getDescription()
Nameable
getDescription
in interface Nameable
public void setDescription(String description)
public Site getSite()
public void setSite(Site site)
public boolean isActive()
public void setActive(boolean active)
@NotNull(message="{validation.notNull}") @Min(value=1L, message="{validation.min}") public @NotNull(message="{validation.notNull}") @Min(value=1L,message="{validation.min}") Integer getMinConnections()
public void setMinConnections(Integer minConnections)
@NotNull(message="{validation.notNull}") public @NotNull(message="{validation.notNull}") Integer getMaxConnections()
public void setMaxConnections(Integer maxConnections)
public boolean isManaged()
public void setManaged(boolean managed)
public String getValidationQuery()
public void setValidationQuery(String validationQuery)
public String getPasswordPlain()
public void setPasswordPlain(String passwordPlain)
public Integer getValidationPeriod()
public void setValidationPeriod(Integer validationPeriod)
public void registerDriver(boolean throwException)
public boolean testConnection(StringBuilder dbInfo)
public boolean testConnection(StringBuilder dbInfo, boolean determineSize)
public boolean testConnection(boolean determineSize, org.springframework.jdbc.core.ConnectionCallback<?>... callbacks)
public Connection getConnection() throws SQLException
SQLException
public void closeConnection(Connection connection)
public String getDatabaseName()
public boolean isRootConnection()
public org.flywaydb.core.api.MigrationInfoService getMigrationInfoService()
public void setMigrationInfoService(org.flywaydb.core.api.MigrationInfoService migrationInfoService)
public Double getDatabaseSize()
public void setDatabaseSize(Double databaseSize)
public DataSource getDataSource()
Copyright © 2011–2021 aiticon GmbH. All rights reserved.