|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor de.smartics.properties.spi.config.ds.DefaultDataSourceManager
public class DefaultDataSourceManager
Helper to create database configurations with a data source.
Nested Class Summary | |
---|---|
static class |
DefaultDataSourceManager.Builder The builder of manager instances. |
Field Summary | |
---|---|
protected boolean |
dropTable Signals to drop the properties table before creation. |
protected boolean |
ignoreTableCreationProblems The flag signals that any problems encountered on creating the table should be ignored. |
Constructor Summary | |
---|---|
protected |
DefaultDataSourceManager(DefaultDataSourceManager.Builder builder) Default constructor. |
Method Summary | |
---|---|
void |
createConfigTable() Creates the configuration on the referenced data source. |
void |
dropConfigTable() Drops the configuration table from the referenced data source. |
List<String> |
getConfigurationKeys() Returns the list of distinct data source keys. |
String |
getDataSourceId() Returns the identifier of the data source. |
DataSourceProxy |
getDataSourceProxy() Returns a reference to the data source proxy used to connect to the data source. |
String |
getInsertOrUpdateSqlStatementTemplate() Returns the SQL statement to insert or update a value in the table, dependent on if the value is already in the database or not. |
void |
print(PrintStream out) Prints the contents of the data source to the given stream. |
String |
toString() Returns the string representation of the object. |
Methods inherited from class de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor |
---|
getConfigColumn, getNameColumn, getTable, getValueColumn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.smartics.properties.spi.config.ds.PropertiesDataSourceDescriptor |
---|
getConfigColumn, getNameColumn, getTable, getValueColumn |
Field Detail |
---|
protected final boolean dropTable
protected final boolean ignoreTableCreationProblems
Constructor Detail |
---|
protected DefaultDataSourceManager(DefaultDataSourceManager.Builder builder)
builder
- the builder of manager instance.
Method Detail |
---|
public final String getDataSourceId()
PropertiesDataSourceDescriptor
getDataSourceId
in interface
PropertiesDataSourceDescriptor
public final DataSourceProxy getDataSourceProxy()
PropertiesDataSourceManager
getDataSourceProxy
in interface
PropertiesDataSourceManager
public String getInsertOrUpdateSqlStatementTemplate()
getInsertOrUpdateSqlStatementTemplate
in interface
PropertiesDataSourceManager
public final void createConfigTable() throws DataSourceException
PropertiesDataSourceManager
createConfigTable
in interface
PropertiesDataSourceManager
DataSourceException
- on any problem accessing the data source.
public final void dropConfigTable() throws DataSourceException
PropertiesDataSourceManager
dropConfigTable
in interface
PropertiesDataSourceManager
DataSourceException
- on any problem accessing the data source.
public final void print(PrintStream out) throws DataSourceException
PropertiesDataSourceManager
print
in interface
PropertiesDataSourceManager
out
- the stream to write to.
DataSourceException
- on any problem accessing the data source.
public final List<String> getConfigurationKeys() throws DataSourceException
PropertiesDataSourceManager
getConfigurationKeys
in interface
PropertiesDataSourceManager
DataSourceException
- on any problem fetching the keys.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |