at.spardat.xma.mdl
Interface Transactional

All Known Implementing Classes:
Page, TransAtomTable, TransString, TransStringSet, WModel

public interface Transactional

This interface is implemented by classes that provide transactional support. In the context of XMA, transactional support does mean: Changes may be applied to a Transactional. These changes may be undone via rollback or committed via commit.

The states where no changes have been accumulated yet are called syncpoints. Syncpoints are construction (where the change list is trivially empty) and the states immediately after a rollback or commit call.


Method Summary
 boolean changed()
          Yields true if this WidgetModel has changed since the last syncpoint.
 void commit()
          This method clears the change history.
 void rollback()
          This method restores this Widget Model to its last syncpoint (which also becomes the new syncpoint).
 

Method Detail

changed

public boolean changed()
Yields true if this WidgetModel has changed since the last syncpoint. Some models have a more complex state, e.g., a table has a domain and a selection, where either may change. In this case, subclasses will provide more detailed information on what aspect of the model really has changed.

Returns:
true if changed, false otherwise

rollback

public void rollback()
This method restores this Widget Model to its last syncpoint (which also becomes the new syncpoint).


commit

public void commit()
This method clears the change history. Calling rollback afterwards won't have any effect. This method defines a new syncpoint.