org.deegree.metadata.persistence
Interface MetadataStoreTransaction

All Known Implementing Classes:
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: 27732 $, $Date: 2010-11-03 10:52:35 +0100 (Mi, 03. Nov 2010) $
Author:
Markus Schneider, last edited by: $Author: sthomas $
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(DeleteTransaction delete)
          Performs the given DeleteTransaction.
 java.util.List<java.lang.String> performInsert(InsertTransaction insert)
          Performs the given InsertTransaction.
 int performUpdate(UpdateTransaction update)
          Performs the given UpdateTransaction.
 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

java.util.List<java.lang.String> performInsert(InsertTransaction insert)
                                               throws MetadataStoreException,
                                                      MetadataInspectorException
Performs the given InsertTransaction.

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(DeleteTransaction delete)
                  throws MetadataStoreException
Performs the given DeleteTransaction.

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

performUpdate

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

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.