Package net.sf.basedb.core
Interface Transactional
-
- All Superinterfaces:
Controlled
- All Known Implementing Classes:
AnnotationSet
,AnyToAny
,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 theFile
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 beforeDbControl.commit()
is called.By implementing this interface an item tells the
DbControl
to call theBasicItem.onBeforeCommit(Transactional.Action)
,BasicItem.onAfterCommit(Transactional.Action)
orBasicItem.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 (må, 06 apr 2009) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Transactional.Action
Enumeration constants used to tell the item what is going on in the core.
-