Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 package org.apache.ojb.broker; 2 3 import java.util.List ; 4 import java.util.Vector ; 5 6 9 public abstract class AbstractProductGroup implements InterfaceProductGroup 10 { 11 12 public synchronized void add(InterfaceArticle article) 13 { 14 if (allArticlesInGroup == null) 15 { 16 allArticlesInGroup = new Vector (); 17 } 18 article.setProductGroup(this); 19 allArticlesInGroup.add(article); 20 } 21 22 23 public Integer getId() 24 { 25 return groupId; 26 } 27 28 29 public String toString() 30 { 31 return 32 "----\n" + 33 "group Id: " + groupId + "\n" + 34 "name: " + groupName + "\n" + 35 "description: " + description + "\n" + 36 "articles in group: " + allArticlesInGroup; 37 } 38 39 40 public String getName() 41 { 42 return groupName; 43 } 44 45 46 private List allArticlesInGroup; 47 48 private String description; 49 50 private Integer groupId; 51 52 public AbstractProductGroup() 53 { 54 } 55 56 public AbstractProductGroup(Integer pGroupId, String pGroupName, String pDescription) 57 { 58 groupId = pGroupId; 59 groupName = pGroupName; 60 description = pDescription; 61 } 62 63 public void setName(String groupName) 64 { 65 this.groupName = groupName; 66 } 67 68 69 private String groupName; 70 71 72 public List getAllArticles() 73 { 74 return allArticlesInGroup; 75 } 76 77 78 public void setId(Integer newValue) 79 { 80 groupId = newValue; 81 } 82 86 public Integer getGroupId() 87 { 88 return groupId; 89 } 90 91 95 public void setGroupId(Integer groupId) 96 { 97 this.groupId = groupId; 98 } 99 100 104 public String getDescription() 105 { 106 return description; 107 } 108 109 113 public void setDescription(String description) 114 { 115 this.description = description; 116 } 117 118 122 public String getGroupName() 123 { 124 return groupName; 125 } 126 127 131 public void setGroupName(String groupName) 132 { 133 this.groupName = groupName; 134 } 135 136 140 public List getAllArticlesInGroup() 141 { 142 return allArticlesInGroup; 143 } 144 145 149 public void setAllArticlesInGroup(List allArticlesInGroup) 150 { 151 this.allArticlesInGroup = allArticlesInGroup; 152 } 153 154 } 155
| Popular Tags
|