summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetri Heinonen <petri@vaadin.com>2012-08-23 09:54:02 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-30 15:32:21 +0300
commit45e16c7e2bc1afe3d773c84e070c476966dc8413 (patch)
tree5c2e4db4a47b7076b175c0efbd1c04dd1b84b7e7
parente5923ad8435ad8598060be56458a5442a336c176 (diff)
downloadvaadin-framework-45e16c7e2bc1afe3d773c84e070c476966dc8413.tar.gz
vaadin-framework-45e16c7e2bc1afe3d773c84e070c476966dc8413.zip
refak listeners com.vaadin.data.util.sqlcontainer
-rw-r--r--server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java46
1 files changed, 42 insertions, 4 deletions
diff --git a/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java b/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java
index 13248f1e06..a53f32b96e 100644
--- a/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java
+++ b/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java
@@ -1493,13 +1493,23 @@ public class SQLContainer implements Container, Container.Filterable,
*/
@Override
- public void addListener(Container.ItemSetChangeListener listener) {
+ public void addItemSetChangeListener(
+ Container.ItemSetChangeListener listener) {
if (itemSetChangeListeners == null) {
itemSetChangeListeners = new LinkedList<Container.ItemSetChangeListener>();
}
itemSetChangeListeners.add(listener);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Container.ItemSetChangeListener listener) {
+ addItemSetChangeListener(listener);
+ }
+
/*
* (non-Javadoc)
*
@@ -1509,12 +1519,22 @@ public class SQLContainer implements Container, Container.Filterable,
*/
@Override
- public void removeListener(Container.ItemSetChangeListener listener) {
+ public void removeItemSetChangeListener(
+ Container.ItemSetChangeListener listener) {
if (itemSetChangeListeners != null) {
itemSetChangeListeners.remove(listener);
}
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Container.ItemSetChangeListener listener) {
+ removeItemSetChangeListener(listener);
+ }
+
protected void fireContentsChange() {
if (itemSetChangeListeners != null) {
final Object[] l = itemSetChangeListeners.toArray();
@@ -1553,7 +1573,7 @@ public class SQLContainer implements Container, Container.Filterable,
*
* @param listener
*/
- public void addListener(RowIdChangeListener listener) {
+ public void addRowIdChangeListener(RowIdChangeListener listener) {
if (delegate instanceof QueryDelegate.RowIdChangeNotifier) {
((QueryDelegate.RowIdChangeNotifier) delegate)
.addListener(listener);
@@ -1561,11 +1581,20 @@ public class SQLContainer implements Container, Container.Filterable,
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addRowIdChangeListener(RowIdChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(RowIdChangeListener listener) {
+ addRowIdChangeListener(listener);
+ }
+
+ /**
* Removes a RowIdChangeListener from the QueryDelegate
*
* @param listener
*/
- public void removeListener(RowIdChangeListener listener) {
+ public void removeRowIdChangeListener(RowIdChangeListener listener) {
if (delegate instanceof QueryDelegate.RowIdChangeNotifier) {
((QueryDelegate.RowIdChangeNotifier) delegate)
.removeListener(listener);
@@ -1573,6 +1602,15 @@ public class SQLContainer implements Container, Container.Filterable,
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeRowIdChangeListener(RowIdChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(RowIdChangeListener listener) {
+ removeRowIdChangeListener(listener);
+ }
+
+ /**
* Calling this will enable this SQLContainer to send and receive cache
* flush notifications for its lifetime.
*/