1 package org.roller.pojos; 2 3 import org.roller.RollerException; 4 import org.roller.business.PersistenceStrategy; 5 import org.roller.model.RollerFactory; 6 7 27 public class WeblogCategoryAssoc extends PersistentObject 28 implements Assoc 29 { 30 static final long serialVersionUID = 674856287447472015L; 31 32 protected String id; 33 protected WeblogCategoryData category; 34 protected WeblogCategoryData ancestor; 35 protected java.lang.String relation; 36 37 public WeblogCategoryAssoc() 38 { 39 } 40 41 public WeblogCategoryAssoc( 42 String id, 43 WeblogCategoryData category, 44 WeblogCategoryData ancestor, 45 java.lang.String relation) 46 { 47 this.id = id; 48 this.category = category; 49 this.ancestor = ancestor; 50 this.relation = relation; 51 } 52 53 public WeblogCategoryAssoc(WeblogCategoryAssoc otherData) 54 { 55 this.id = otherData.id; 56 this.category = otherData.category; 57 this.ancestor = otherData.ancestor; 58 this.relation = otherData.relation; 59 } 60 61 66 public java.lang.String getId() 67 { 68 return this.id; 69 } 70 71 public void setId(java.lang.String id) 72 { 73 this.id = id; 74 } 75 76 77 80 public void remove() throws RollerException 81 { 82 PersistenceStrategy pstrategy = 83 RollerFactory.getRoller().getPersistenceStrategy(); 84 pstrategy.remove(this); 85 } 86 87 public void save() throws RollerException 88 { 89 PersistenceStrategy pstrategy = 90 RollerFactory.getRoller().getPersistenceStrategy(); 91 pstrategy.store(this); 92 } 93 94 97 public void setData(org.roller.pojos.PersistentObject otherData) 98 { 99 this.id = otherData.getId(); 100 this.category = ((WeblogCategoryAssoc)otherData).getCategory(); 101 this.ancestor = ((WeblogCategoryAssoc)otherData).getAncestorCategory(); 102 this.relation = ((WeblogCategoryAssoc)otherData).getRelation(); 103 } 104 105 109 public WeblogCategoryData getAncestorCategory() 110 { 111 return ancestor; 112 } 113 114 115 public void setAncestorCategory(WeblogCategoryData data) 116 { 117 ancestor = data; 118 } 119 120 124 public WeblogCategoryData getCategory() 125 { 126 return category; 127 } 128 129 130 public void setCategory(WeblogCategoryData data) 131 { 132 category = data; 133 } 134 135 139 public java.lang.String getRelation() 140 { 141 return relation; 142 } 143 144 145 public void setRelation(java.lang.String string) 146 { 147 relation = string; 148 } 149 150 public HierarchicalPersistentObject getObject() 151 { 152 return getCategory(); 153 } 154 155 public void setObject(HierarchicalPersistentObject hpo) 156 { 157 setCategory((WeblogCategoryData)hpo); 158 } 159 160 public HierarchicalPersistentObject getAncestor() 161 { 162 return getAncestorCategory(); 163 } 164 165 public void setAncestor(HierarchicalPersistentObject hpo) 166 { 167 setAncestorCategory((WeblogCategoryData)hpo); 168 } 169 } 170 | Popular Tags |