Interface Property.Transactional<T>
- Type Parameters:
T- The type of the property
- All Superinterfaces:
Property<T>,Serializable
- All Known Implementing Classes:
TransactionalPropertyWrapper
- Since:
- 7.0
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.featurepack.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeEvent, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer -
Method Summary
Methods inherited from interface com.vaadin.featurepack.data.Property
getType, getValue, isPropertyReadOnly, setPropertyReadOnly, setValue
-
Method Details
-
startTransaction
void startTransaction()Starts a transaction.If the value is set during a transaction the value must not replace the original value until
commit()is called. Still,Property.getValue()must return the current value set in the transaction. Callingrollback()while in a transaction must rollback the value to what it was before the transaction started.Property.ValueChangeEvents must not be emitted for internal value changes during a transaction. If the value changes as a result ofcommit(), aProperty.ValueChangeEventshould be emitted. -
commit
void commit()Commits and ends the transaction that is in progress.If the value is changed as a result of this operation, a
Property.ValueChangeEventis emitted if such are supported.This method has no effect if there is no transaction is in progress.
This method must never throw an exception.
-
rollback
void rollback()Aborts and rolls back the transaction that is in progress.The value is reset to the value before the transaction started. No
Property.ValueChangeEventis emitted as a result of this.This method has no effect if there is no transaction is in progress.
This method must never throw an exception.
-