1 43 package net.jforum.entities; 44 45 import java.io.Serializable ; 46 47 53 public class Banner implements Serializable 54 { 55 private int id; 56 private String comment; 57 private boolean active; 58 private int type; 59 private String name; 60 private String description; 61 private int width; 62 private int height; 63 private int views; 64 private int clicks; 65 private String url; 66 private int placement; 67 private int weight; 68 69 public Banner() 70 {} 71 72 public Banner(int id) 73 { 74 this.id = id; 75 } 76 77 public Banner(Banner c) 78 { 79 this.id = c.getId(); 80 this.comment = c.getComment(); 81 this.active = c.isActive(); 82 this.type = c.getType(); 83 this.name = c.getName(); 84 this.description = c.getDescription(); 85 this.width = c.getWeight(); 86 this.height = c.getHeight(); 87 this.views = c.getViews(); 88 this.clicks = c.getClicks(); 89 this.url = c.getUrl(); 90 this.placement = c.getPlacement(); 91 this.weight = c.getWeight(); 92 } 93 94 97 public int getId() 98 { 99 return this.id; 100 } 101 102 public String getComment() 103 { 104 return comment; 105 } 106 107 public boolean isActive() 108 { 109 return active; 110 } 111 112 public int getType() 113 { 114 return type; 115 } 116 117 public String getName() 118 { 119 return name; 120 } 121 122 public String getDescription() 123 { 124 return description; 125 } 126 127 public int getWidth() 128 { 129 return width; 130 } 131 132 public int getHeight() 133 { 134 return height; 135 } 136 137 public int getViews() 138 { 139 return views; 140 } 141 142 public int getClicks() 143 { 144 return clicks; 145 } 146 147 public String getUrl() 148 { 149 return url; 150 } 151 152 public int getPlacement() 153 { 154 return placement; 155 } 156 157 public int getWeight() 158 { 159 return weight; 160 } 161 162 166 public void setId(int id) 167 { 168 this.id = id; 169 } 170 171 public void setComment(String comment) 172 { 173 this.comment = comment; 174 } 175 176 public void setActive(boolean active) 177 { 178 this.active = active; 179 } 180 181 public void setType(int type) 182 { 183 this.type = type; 184 } 185 186 public void setName(String name) 187 { 188 this.name = name; 189 } 190 191 public void setDescription(String description) 192 { 193 this.description = description; 194 } 195 196 public void setWidth(int width) 197 { 198 this.width = width; 199 } 200 201 public void setHeight(int height) 202 { 203 this.height = height; 204 } 205 206 public void setViews(int views) 207 { 208 this.views = views; 209 } 210 211 public void setClicks(int clicks) 212 { 213 this.clicks = clicks; 214 } 215 216 public void setUrl(String url) 217 { 218 this.url = url; 219 } 220 221 public void setPlacement(int placement) 222 { 223 this.placement = placement; 224 } 225 226 public void setWeight(int weight) 227 { 228 this.weight = weight; 229 } 230 231 234 public int hashCode() 235 { 236 return this.id; 237 } 238 239 242 public boolean equals(Object o) 243 { 244 return((o instanceof Banner) && (((Banner)o).getId() == this.id)); 245 } 246 247 250 public String toString() 251 { 252 return "[comment=" + this.comment + ", id=" + this.id + 253 ", type=" + this.type + ", name=" + this.name + 254 ", description=" + this.description + ", active=" + 255 this.active + "]"; 256 } 257 258 } 259 | Popular Tags |