1 package org.apache.ojb.broker; 2 3 import java.io.Serializable ; 4 5 import org.apache.ojb.broker.util.collections.RemovalAwareList; 6 7 8 12 public class ProductGroupWithRemovalAwareCollection implements Serializable 13 { 14 15 16 private RemovalAwareList allArticlesInGroup; 17 18 19 private int groupId; 20 21 22 private String groupName; 23 24 25 26 public int getId() 27 { 28 return groupId; 29 } 30 31 32 33 public String getName() 34 { 35 return groupName; 36 } 37 38 public ProductGroupWithRemovalAwareCollection() 39 { 40 } 41 42 43 public RemovalAwareList getAllArticles() 44 { 45 return allArticlesInGroup; 46 } 47 48 public synchronized void add(Article art) 49 { 50 if (allArticlesInGroup == null) 51 { 52 allArticlesInGroup = new RemovalAwareList(); 53 } 54 this.allArticlesInGroup.add(art); 55 } 56 57 58 public void setId(int newValue) 59 { 60 groupId = newValue; 61 } 62 63 67 public void setAllArticlesInGroup(RemovalAwareList allArticlesInGroup) 68 { 69 this.allArticlesInGroup = allArticlesInGroup; 70 } 71 72 73 77 public int getGroupId() 78 { 79 return groupId; 80 } 81 82 86 public void setGroupId(int groupId) 87 { 88 this.groupId = groupId; 89 } 90 91 95 public String getGroupName() 96 { 97 return groupName; 98 } 99 100 104 public void setGroupName(String groupName) 105 { 106 this.groupName = groupName; 107 } 108 109 } 110 | Popular Tags |