Browse Source

Add javadoc to Property.Transactional and TransactionalPropertyWrapper.

tags/7.0.0.alpha1
Henri Sara 12 years ago
parent
commit
bf94e8c417

+ 5
- 0
src/com/vaadin/data/Property.java View File

@@ -105,6 +105,11 @@ public interface Property<T> extends Serializable {
* A Property that is capable of handle a transaction that can end in commit
* or rollback.
*
* Note that this does not refer to e.g. database transactions but rather
* two-phase commit that allows resetting old field values on a form etc. if
* the commit of one of the properties fails after others have already been
* committed. If
*
* @param <T>
* The type of the property
* @author Vaadin Ltd

+ 23
- 0
src/com/vaadin/data/util/TransactionalPropertyWrapper.java View File

@@ -7,6 +7,29 @@ import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeNotifier;
/**
* Wrapper class that helps implement two-phase commit for a non-transactional
* property.
*
* When accessing the property through the wrapper, getting and setting the
* property value take place immediately. However, the wrapper keeps track of
* the old value of the property so that it can be set for the property in case
* of a roll-back. This can result in the underlying property value changing
* multiple times (first based on modifications made by the application, then
* back upon roll-back).
*
* Value change events on the {@link TransactionalPropertyWrapper} are only
* fired at the end of a successful transaction, whereas listeners attached to
* the underlying property may receive multiple value change events.
*
* @see com.vaadin.data.Property.Transactional
*
* @author Vaadin Ltd
* @version @version@
* @since 7.0
*
* @param <T>
*/
public class TransactionalPropertyWrapper<T> extends AbstractProperty<T>
implements ValueChangeNotifier, Property.Transactional<T> {

Loading…
Cancel
Save