]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add javadoc to Property.Transactional and TransactionalPropertyWrapper.
authorHenri Sara <hesara@vaadin.com>
Thu, 22 Dec 2011 09:08:26 +0000 (11:08 +0200)
committerHenri Sara <hesara@vaadin.com>
Thu, 22 Dec 2011 09:08:56 +0000 (11:08 +0200)
src/com/vaadin/data/Property.java
src/com/vaadin/data/util/TransactionalPropertyWrapper.java

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