Mercurial > dive4elements > river
changeset 4660:bb9ce9aece70
Add new method hasItems to Collection class
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 11 Dec 2012 16:24:57 +0100 |
parents | 518d60dfe6bf |
children | 5025acdb3815 |
files | flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java Tue Dec 11 16:23:29 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java Tue Dec 11 16:24:57 2012 +0100 @@ -336,7 +336,7 @@ * @return true, if the Collection is new. */ public boolean isNew() { - return collection.getItemLength() == 0; + return collection.hasItems(); }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java Tue Dec 11 16:23:29 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java Tue Dec 11 16:24:57 2012 +0100 @@ -56,5 +56,7 @@ public void addRecommendations(List<Recommendation> recommendations); public boolean loadedRecommendation(Recommendation recommendation); + + public boolean hasItems(); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Tue Dec 11 16:23:29 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Tue Dec 11 16:24:57 2012 +0100 @@ -291,5 +291,11 @@ return false; } + + + @Override + public boolean hasItems() { + return items.isEmpty(); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :