From f7a91d3f35c634cf1621445fa75d3b7f67016495 Mon Sep 17 00:00:00 2001 From: Petri Heinonen Date: Thu, 23 Aug 2012 09:57:20 +0300 Subject: refak listeners com.vaadin.data.util.sqlcontainer.query --- .../util/sqlcontainer/query/QueryDelegate.java | 16 ++++++++++++++++ .../data/util/sqlcontainer/query/TableQuery.java | 22 ++++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) (limited to 'server/src') diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java b/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java index 3e1866932b..10a710e823 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java @@ -210,6 +210,14 @@ public interface QueryDelegate extends Serializable { * @param listener * listener to be added */ + public void addRowIdChangeListener( + QueryDelegate.RowIdChangeListener listener); + + /** + * @deprecated Since 7.0, replaced by + * {@link #addRowIdChangeListener(RowIdChangeListener)} + **/ + @Deprecated public void addListener(QueryDelegate.RowIdChangeListener listener); /** @@ -218,6 +226,14 @@ public interface QueryDelegate extends Serializable { * @param listener * listener to be removed */ + public void removeRowIdChangeListener( + QueryDelegate.RowIdChangeListener listener); + + /** + * @deprecated Since 7.0, replaced by + * {@link #removeRowIdChangeListener(RowIdChangeListener)} + **/ + @Deprecated public void removeListener(QueryDelegate.RowIdChangeListener listener); } } diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java index e4544a491a..a6a1a5a8fb 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java @@ -704,23 +704,41 @@ public class TableQuery implements QueryDelegate, * Adds RowIdChangeListener to this query */ @Override - public void addListener(RowIdChangeListener listener) { + public void addRowIdChangeListener(RowIdChangeListener listener) { if (rowIdChangeListeners == null) { rowIdChangeListeners = new LinkedList(); } rowIdChangeListeners.add(listener); } + /** + * @deprecated Since 7.0, replaced by + * {@link #addRowIdChangeListener(com.vaadin.data.util.sqlcontainer.query.QueryDelegate.RowIdChangeListener)} + **/ + @Deprecated + public void addListener(RowIdChangeListener listener) { + addRowIdChangeListener(listener); + } + /** * Removes the given RowIdChangeListener from this query */ @Override - public void removeListener(RowIdChangeListener listener) { + public void removeRowIdChangeListener(RowIdChangeListener listener) { if (rowIdChangeListeners != null) { rowIdChangeListeners.remove(listener); } } + /** + * @deprecated Since 7.0, replaced by + * {@link #removeRowIdChangeListener(com.vaadin.data.util.sqlcontainer.query.QueryDelegate.RowIdChangeListener)} + **/ + @Deprecated + public void removeListener(RowIdChangeListener listener) { + removeRowIdChangeListener(listener); + } + private static final Logger getLogger() { return Logger.getLogger(TableQuery.class.getName()); } -- cgit v1.2.3