2.17.2: 2011-06-17

net.sf.basedb.core
Interface Transactional

All Superinterfaces:
Controlled
All Known Implementing Classes:
AnnotationSet, BioPlateEvent, Experiment, File, Job, PluginConfiguration

public interface Transactional
extends Controlled

This interface is a tagging interface for items that wants to be notified before a transaction is committed or after it has been completed or rollbacked. One example is the File item, which must handle physical files on disk and check quota information. If a file has been uploaded when a transaction is rolled back the file should also be deleted. On the other hand, if a file item is deleted, the physical file should not be deleted before DbControl.commit() is called.

By implementing this interface an item tells the DbControl to call the BasicItem.onBeforeCommit(Transactional.Action), BasicItem.onAfterCommit(Transactional.Action) or BasicItem.onRollback(Transactional.Action) methods, whenever a commit is called or a rollback is required.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Nested Class Summary
static class Transactional.Action
          Enumeration constants used to tell the item what is going on in the core.
 


2.17.2: 2011-06-17