summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-02-16 10:59:38 +0200
committerHenri Sara <henri.sara@gmail.com>2017-02-16 12:38:08 +0200
commitd80c4201416516e30ac6064c217d3d4a88f6a47a (patch)
tree6a7b83b8f24e92b5ee5aa8df937c445fc83289bd
parent30a1416da4fdbc13cde6662498690792808a87b7 (diff)
downloadvaadin-framework-d80c4201416516e30ac6064c217d3d4a88f6a47a.tar.gz
vaadin-framework-d80c4201416516e30ac6064c217d3d4a88f6a47a.zip
Add javadoc clarification for DataProivder.refreshItem (#8585)
* Add javadoc clarification for DataProivder.refreshItem
-rw-r--r--server/src/main/java/com/vaadin/data/provider/DataProvider.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/data/provider/DataProvider.java b/server/src/main/java/com/vaadin/data/provider/DataProvider.java
index 6a5f9c0bb3..2fee0eef84 100644
--- a/server/src/main/java/com/vaadin/data/provider/DataProvider.java
+++ b/server/src/main/java/com/vaadin/data/provider/DataProvider.java
@@ -93,6 +93,14 @@ public interface DataProvider<T, F> extends Serializable {
* Refreshes the given item. This method should be used to inform all
* {@link DataProviderListener DataProviderListeners} that an item has been
* updated or replaced with a new instance.
+ * <p>
+ * For this to work properly, the item must either implement
+ * {@link #equals(Object)} and {@link #hashCode()} to consider both the old
+ * and the new item instances to be equal, or alternatively
+ * {@link #getId(Object)} should be implemented to return an appropriate
+ * identifier.
+ *
+ * @see #getId(Object)
*
* @param item
* the item to refresh