1 19 20 package za.org.coefficient.core; 21 22 23 33 public class Category implements java.io.Serializable { 34 36 private Category parentCategory; 37 private Long id; 38 private String description; 39 private String name; 40 private long version; 41 42 44 public Category() { 45 name = "."; 46 } 47 48 50 public void setDescription(String description) { 51 this.description = description; 52 } 53 54 59 public String getDescription() { 60 return description; 61 } 62 63 68 public void setId(Long argId) { 69 this.id = argId; 70 } 71 72 79 public Long getId() { 80 return this.id; 81 } 82 83 public void setName(String name) { 84 this.name = name; 85 } 86 87 91 public String getName() { 92 return name; 93 } 94 95 public void setParentCategory(Category parentCategory) { 96 this.parentCategory = parentCategory; 97 } 98 99 103 public Category getParentCategory() { 104 return parentCategory; 105 } 106 107 112 public void setVersion(long version) { 113 this.version = version; 114 } 115 116 124 public long getVersion() { 125 return this.version; 126 } 127 128 public boolean equals(Object other) { 129 Category o = (Category) other; 130 131 return (this != null) && (o != null) 132 && (this.toString().equals(o.toString())); 133 } 134 135 public String toString() { 136 return ((parentCategory == null) ? "" 137 : (parentCategory.toString() + "/" 138 + name)); 139 } 140 } 141 | Popular Tags |