de.smartics.properties.spi.config.ds
Interface PropertiesDataSourceManager

Package class diagram package PropertiesDataSourceManager
All Superinterfaces:
PropertiesDataSourceDescriptor, Serializable
All Known Implementing Classes:
DefaultDataSourceManager, PropertiesStore

public interface PropertiesDataSourceManager
     
     
extends PropertiesDataSourceDescriptor

Interface to connect to a database to persist properties and to allow the management of the database infrastructure. That is

  1. Create and drop the properties table.
  2. Fill table with properties initially.


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.
 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.
 
Methods inherited from interface de.smartics.properties.spi.config.ds.PropertiesDataSourceDescriptor
getConfigColumn, getDataSourceId, getNameColumn, getTable, getValueColumn
 

Method Detail

getDataSourceProxy

DataSourceProxy getDataSourceProxy()
Returns a reference to the data source proxy used to connect to the data source.

Returns:
a reference to the data source proxy used to connect to the data source.

createConfigTable

void createConfigTable()
                       throws DataSourceException
Creates the configuration on the referenced data source.

Throws:
DataSourceException - on any problem accessing the data source.

dropConfigTable

void dropConfigTable()
                     throws DataSourceException
Drops the configuration table from the referenced data source.

Throws:
DataSourceException - on any problem accessing the data source.

getConfigurationKeys

List<String> getConfigurationKeys()
                                  throws DataSourceException
Returns the list of distinct data source keys.

Returns:
the list of distinct data source keys.
Throws:
DataSourceException - on any problem fetching the keys.

getInsertOrUpdateSqlStatementTemplate

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.

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.

print

void print(PrintStream out)
           throws NullPointerException,
                  DataSourceException
Prints the contents of the data source to the given stream. Useful for debugging.

Parameters:
out - the stream to write to.
Throws:
NullPointerException - if out is null.
DataSourceException - on any problem accessing the data source.


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