de.smartics.properties.config.transfer.jdbc
Class JdbcPropertySink

Package class diagram package JdbcPropertySink
java.lang.Object
  extended by de.smartics.properties.config.transfer.jdbc.JdbcPropertySink
All Implemented Interfaces:
PropertySink

public final class JdbcPropertySink
     
     
extends Object
implements PropertySink

Writes properties to a database via JDBC.

Properties are not stored within a transaction.


Constructor Summary
JdbcPropertySink(PropertiesStore store)
          Default constructor.
 
Method Summary
 void clear()
          Removes all information from the sink.
 void close()
          Closes the sink.
 void write(Iterable<PropertyProvider> providers)
          Writes the property definitions provided by the given providers.
 void write(PropertyProvider provider)
          Writes the property definitions provided by the given provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcPropertySink

public JdbcPropertySink(PropertiesStore store)
Default constructor.

Parameters:
store - the store of the properties.
Method Detail

clear

public void clear()
           throws TransferException,
                  DataSourceException
Description copied from interface: PropertySink
Removes all information from the sink.

Specified by:
clear in interface PropertySink
Throws:
TransferException - on any problem clearing the sink.
DataSourceException

write

public void write(PropertyProvider provider)
           throws TransferException
Description copied from interface: PropertySink
Writes the property definitions provided by the given provider.

It is assumed that the writing is transactional. If it is not, the implementation should document that it isn't.

Specified by:
write in interface PropertySink
Parameters:
provider - the provider of property definitions.
Throws:
TransferException - on any problem writing the definitions to this sink.

write

public void write(Iterable<PropertyProvider> providers)
           throws TransferException
Description copied from interface: PropertySink
Writes the property definitions provided by the given providers.

It is assumed that the writing is transactional. If it is not, the implementation should document that it isn't.

Specified by:
write in interface PropertySink
Parameters:
providers - the list of providers to add their property definitions.
Throws:
TransferException - on any problem writing property definitions to this sink.

close

public void close()
           throws TransferException
Closes the sink. No more writing to the sink will be allowed after the sink is closed.

This is a no-op.

Specified by:
close in interface PropertySink
Throws:
TransferException - on any problem closing the sink.


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