de.smartics.properties.spi.config.ds
Class DefaultDataSourceManager

Package class diagram package DefaultDataSourceManager
java.lang.Object
  extended by de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor
      extended by de.smartics.properties.spi.config.ds.DefaultDataSourceManager
All Implemented Interfaces:
PropertiesDataSourceDescriptor, PropertiesDataSourceManager, Serializable
Direct Known Subclasses:
PropertiesStore

public class DefaultDataSourceManager
     
     
extends AbstractDataSourceDescriptor
implements PropertiesDataSourceManager

Helper to create database configurations with a data source.

See Also:
Serialized Form

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.
 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.
 void print(PrintStream out)
          Prints the contents of the data source to the given stream.
 
Methods inherited from class de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor
getNameColumn, getTable, getValueColumn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.smartics.properties.spi.config.ds.PropertiesDataSourceDescriptor
getNameColumn, getTable, getValueColumn
 

Field Detail

dropTable

protected final boolean dropTable
Signals to drop the properties table before creation.


ignoreTableCreationProblems

protected final boolean ignoreTableCreationProblems
The flag signals that any problems encountered on creating the table should be ignored. Useful if there are no means to check is a database table already exists.

Constructor Detail

DefaultDataSourceManager

protected DefaultDataSourceManager(DefaultDataSourceManager.Builder builder)
Default constructor.

Parameters:
builder - the builder of manager instance.
Method Detail

getDataSourceId

public final String getDataSourceId()
Description copied from interface: PropertiesDataSourceDescriptor
Returns the identifier of the data source.

Specified by:
getDataSourceId in interface PropertiesDataSourceDescriptor
Returns:
the identifier of the data source.

getDataSourceProxy

public final DataSourceProxy getDataSourceProxy()
Description copied from interface: PropertiesDataSourceManager
Returns a reference to the data source proxy used to connect to the data source.

Specified by:
getDataSourceProxy in interface PropertiesDataSourceManager
Returns:
a reference to the data source proxy used to connect to the data source.

createConfigTable

public final void createConfigTable()
                             throws DataSourceException
Description copied from interface: PropertiesDataSourceManager
Creates the configuration on the referenced data source.

Specified by:
createConfigTable in interface PropertiesDataSourceManager
Throws:
DataSourceException - on any problem accessing the data source.

dropConfigTable

public final void dropConfigTable()
                           throws DataSourceException
Description copied from interface: PropertiesDataSourceManager
Drops the configuration table from the referenced data source.

Specified by:
dropConfigTable in interface PropertiesDataSourceManager
Throws:
DataSourceException - on any problem accessing the data source.

print

public final void print(PrintStream out)
                 throws DataSourceException
Description copied from interface: PropertiesDataSourceManager
Prints the contents of the data source to the given stream. Useful for debugging.

Specified by:
print in interface PropertiesDataSourceManager
Parameters:
out - the stream to write to.
Throws:
DataSourceException - on any problem accessing the data source.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.