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

Package class diagram package DataSourceProxy
All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractHSqlDataSourceProxy, AbstractMySqlDataSourceProxy, HSqlDataSourceProxy, HSqlJndiDataSourceProxy, JndiDataSourceProxy, MySqlDataSourceProxy, MySqlJndiDataSourceProxy

public interface DataSourceProxy
     
     
extends Serializable

Allows serializable access to a data source.


Method Summary
 String getCreateTableSqlTemplate()
          Provides an SQL template to create the configuration table.
 DataSource getDataSource()
          Provides access to the data source.
 String getDataSourceId()
          Returns the identifier of the data source.
 String getInsertOrUpdateSqlTemplate()
          Provides an SQL template to insert or update a value in the configuration table.
 void setInsertOrUpdate(PreparedStatement statement, String config, String name, String value)
          Sets the parameters to the given statement to insert or update a property in the configuration table.
 

Method Detail

getDataSourceId

String getDataSourceId()
Returns the identifier of the data source.

Returns:
the identifier of the data source.

getDataSource

DataSource getDataSource()
Provides access to the data source.

Returns:
the data source.

getCreateTableSqlTemplate

String getCreateTableSqlTemplate()
Provides an SQL template to create the configuration table.

Returns:
the SQL template to create the configuration table.

getInsertOrUpdateSqlTemplate

String getInsertOrUpdateSqlTemplate()
Provides an SQL template to insert or update a value in the configuration table.

Returns:
the SQL template to insert or update a value in the configuration table.

setInsertOrUpdate

void setInsertOrUpdate(PreparedStatement statement,
                       String config,
                       String name,
                       String value)
                       throws SQLException
Sets the parameters to the given statement to insert or update a property in the configuration table.

The statement ist provided by getInsertOrUpdateSqlTemplate().

Parameters:
statement - the statement to set the values.
config - the configuration key.
name - the property key.
value - the property value.
Throws:
SQLException - on any problem configuring the given statement.


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