org.deegree.metadata.persistence
Interface MetadataStoreTransaction

All Known Implementing Classes:
EbrimEOMDStoreTransaction, ISOMetadataStoreTransaction

public interface MetadataStoreTransaction

Provides transactional access to a MetadataStore.

Please note that a transaction must always be ended by calling either commit() or rollback().

Version:
$Revision: 30650 $, $Date: 2011-05-05 11:34:25 +0200 (Do, 05. Mai 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $
See Also:
MetadataStore.acquireTransaction()

Method Summary
 void commit()
          Makes the changes persistent that have been performed in this transaction and releases the transaction instance so other clients may acquire a transaction on the MetadataStore.
 int performDelete(DeleteOperation delete)
          Performs the given DeleteOperation.
 List<String> performInsert(InsertOperation insert)
          Performs the given InsertOperation.
 int performUpdate(UpdateOperation update)
          Performs the given UpdateOperation.
 void rollback()
          Aborts the changes that have been performed in this transaction and releases the transaction instance so other clients may acquire a transaction on the MetadataStore.
 

Method Detail

commit

void commit()
            throws MetadataStoreException
Makes the changes persistent that have been performed in this transaction and releases the transaction instance so other clients may acquire a transaction on the MetadataStore.

Throws:
MetadataStoreException - if the committing fails

rollback

void rollback()
              throws MetadataStoreException
Aborts the changes that have been performed in this transaction and releases the transaction instance so other clients may acquire a transaction on the MetadataStore.

Throws:
MetadataStoreException - if the rollback fails

performInsert

List<String> performInsert(InsertOperation insert)
                           throws MetadataStoreException,
                                  MetadataInspectorException
Performs the given InsertOperation. TODO for scalabilitiy reasons and simplicitly, consider changing this to #performInsert (MetadataRecord)

Parameters:
insert - operation to be performed, must not be null
Returns:
identifier of the inserted records, can be empty, but never null
Throws:
MetadataStoreException - if the insertion failed
MetadataInspectorException

performDelete

int performDelete(DeleteOperation delete)
                  throws MetadataStoreException
Performs the given DeleteOperation.

Parameters:
delete - operation to be performed, must not be null
Returns:
number of deleted records
Throws:
MetadataStoreException - if the deletion failed

performUpdate

int performUpdate(UpdateOperation update)
                  throws MetadataStoreException,
                         MetadataInspectorException
Performs the given UpdateOperation.

Parameters:
update - operation to be performed, must not be null
Returns:
number of updated records
Throws:
MetadataStoreException - if the update failed
MetadataInspectorException


Copyright © 2011. All Rights Reserved.