|
||||||||||
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.Builder de.smartics.properties.spi.config.ds.DefaultDataSourceManager.Builder
public static class DefaultDataSourceManager.Builder
The builder of manager instances.
Field Summary | |
---|---|
protected DataSourceProxy |
dataSourceProxy The proxy to provide access to a data source. |
static String |
DEFAULT_CREATE_TABLE_TEMPLATE The default table template. |
Constructor Summary | |
---|---|
DefaultDataSourceManager.Builder() |
Method Summary | |
---|---|
DefaultDataSourceManager |
build() Creates the instance. |
void |
setCreateTableSqlStatementTemplate(String createTableSqlStatementTemplate) Sets the template to create an SQL statement to create the configuration table. |
void |
setDataSourceProxy(DataSourceProxy dataSourceProxy) Sets the proxy to provide access to a data source. |
void |
setDropTable(boolean dropTable) Sets the value for dropTable. |
void |
setIgnoreTableCreationProblems(boolean ignoreTableCreationProblems) Sets the flag signals that any problems encountered on creating the table should be ignored. |
void |
setInitialProperties(Map<String,String> initialProperties) Sets the properties to fill the database initially. |
Methods inherited from class de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor.Builder |
---|
setNameColumn, setTable, setValueColumn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CREATE_TABLE_TEMPLATE
The value of this constant is "CREATE TABLE IF NOT EXISTS ${table} (${nameColumn} VARCHAR(64) PRIMARY KEY, ${valueColumn} VARCHAR(255))".
"CREATE TABLE IF NOT EXISTS ${table} (${nameColumn} VARCHAR(64) PRIMARY KEY, ${valueColumn} VARCHAR(255))"
protected DataSourceProxy dataSourceProxy
Constructor Detail |
---|
public DefaultDataSourceManager.Builder()
Method Detail |
---|
public final void setCreateTableSqlStatementTemplate(String createTableSqlStatementTemplate)
${table}
,
${nameColumn}
and
${valueColumn}
to reference the name of the configuration table, the column that stores the property names and the column storing the property values.
Per default the default table template
is used.
createTableSqlStatementTemplate
- the template to create an SQL statement to create the configuration table.
DEFAULT_CREATE_TABLE_TEMPLATE
public final void setDataSourceProxy(DataSourceProxy dataSourceProxy) throws NullPointerException
dataSourceProxy
- the proxy to provide access to a data source.
NullPointerException
- of
dataSourceProxy
is
null
.
public final void setInitialProperties(Map<String,String> initialProperties)
null
.
initialProperties
- the properties to fill the database initially.
public final void setDropTable(boolean dropTable)
Signals to drop the properties table before creation.
dropTable
- the value for dropTable.
public final void setIgnoreTableCreationProblems(boolean ignoreTableCreationProblems)
ignoreTableCreationProblems
- the flag signals that any problems encountered on creating the table should be ignored.
public DefaultDataSourceManager build() throws NullPointerException
NullPointerException
- if no data source proxy has been provided.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |