Author: amarkhel
Date: 2009-03-05 05:43:53 -0500 (Thu, 05 Mar 2009)
New Revision: 12835
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
Log:
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-05
10:20:09 UTC (rev 12834)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-05
10:43:53 UTC (rev 12835)
@@ -323,4 +323,21 @@
this.informAboutNews = informAboutNews;
}
+ public List<Album> getAllAlbums(){
+ List<Album> albums = new ArrayList<Album>();
+ for(Shelf s:getShelfs()){
+ albums.addAll(s.getChildAlbums());
+ }
+ return albums;
+ }
+
+ public List<Image> getAllImages(){
+ List<Image> images = new ArrayList<Image>();
+ for(Shelf s:getShelfs()){
+ for(Album a:s.getChildAlbums()){
+ images.addAll(a.getImages());
+ }
+ }
+ return images;
+ }
}
\ No newline at end of file
Show replies by date