From 3841ea1f7309b068a0407031a6e745a3a0736aca Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Thu, 16 Feb 2017 10:59:38 +0200 Subject: Add javadoc clarification for DataProivder.refreshItem (#8585) * Add javadoc clarification for DataProivder.refreshItem --- server/src/main/java/com/vaadin/data/provider/DataProvider.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/src/main/java/com/vaadin') 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 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. + *

+ * 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 -- cgit v1.2.3