SqlDBManager¶
-
public interface
SqlDBManager
¶ Classes implementing this interface are responsible for retrieving sql properties from the bootstrap configuration, updating sql-related properties for modules and creating databases for given properties.
Methods¶
checkForDatabase¶
createDatabase¶
getChosenSQLDriver¶
getSqlProperties¶
-
Properties
getSqlProperties
(Properties propertiesToUpdate)¶ Being passed raw properties, inserts correct SQL configuration in the correct places. Current replacement codes are:
- ${sql.driver}
- ${sql.user}
- ${sql.password}
- ${sql.url}
- ${sql.quartz.delegateClass}
As a result of calling this method, all occurrences of the above keys get replaced with actual sql properties, retrieved from the provided bootstrap configuration.
Parameters: - propertiesToUpdate – Raw properties, containing replacement codes
Throws: - IOException – In case an I/O exception occurs when loading / merging properties
Returns: Actual properties, with sql configuration from bootstrap
hasColumn¶
-
boolean
hasColumn
(String database, String table, String column)¶ Checks whether table with the given name has a column with the given name.
Parameters: - table – the name of the table
- column – the name of the column
Throws: - SQLException – when incorrect data was given
Returns: true if the table has that column, false otherwise