001package com.thed.model; 002 003import java.util.Date; 004import java.util.HashSet; 005import java.util.Set; 006 007public class TCRCatalogTree implements java.io.Serializable { 008 009 private static final long serialVersionUID = -408621352178558271L; 010 011 private Long id; 012 private String type; 013 private String name; 014 private String description; 015 private Integer revision; 016 private TCRCatalogTree parent = null; 017 private Long parentId = null; 018 private Set<TCRCatalogTree> categories = new HashSet<TCRCatalogTree>(0); 019 private Long releaseId; 020 private Long linkedTCRCatalogTreeId; 021 private Date createdOn; 022 private Long createdBy; 023 private Long lastModifiedBy; 024 private Date lastModifiedOn; 025 026 public TCRCatalogTree(Long id, String name, String type, Long releaseId) { 027 this.id = id; 028 this.name = name; 029 this.type = type; 030 this.releaseId=releaseId; 031 } 032 033 public TCRCatalogTree() { 034 } 035 036 /** 037 * @return the categories 038 */ 039 public Set<TCRCatalogTree> getCategories() { 040 return categories; 041 } 042 043 /** 044 * @param categories 045 * the categories to set 046 */ 047 public void setCategories(Set<TCRCatalogTree> categories) { 048 this.categories = categories; 049 } 050 051 /** 052 * @return the id 053 */ 054 public Long getId() { 055 return id; 056 } 057 058 /** 059 * @param id 060 * the id to set 061 */ 062 public void setId(Long id) { 063 this.id = id; 064 } 065 066 /** 067 * @return the name 068 */ 069 public String getName() { 070 return name; 071 } 072 073 /** 074 * @param name 075 * the name to set 076 */ 077 public void setName(String name) { 078 this.name = name; 079 } 080 081 public String getDescription() { 082 return description; 083 } 084 085 public void setDescription(String description) { 086 this.description = description; 087 } 088 089 /** 090 * @return the parent 091 */ 092 public TCRCatalogTree getParent() { 093 return parent; 094 } 095 096 /** 097 * @param parent 098 * the parent to set 099 */ 100 public void setParent(TCRCatalogTree parent) { 101 this.parent = parent; 102 } 103 104 /** 105 * @return the revision 106 */ 107 public Integer getRevision() { 108 return revision; 109 } 110 111 /** 112 * @param revision 113 * the revision to set 114 */ 115 public void setRevision(Integer revision) { 116 this.revision = revision; 117 } 118 119 /** 120 * @return the type 121 */ 122 public String getType() { 123 return type; 124 } 125 126 /** 127 * @param type 128 * the type to set 129 */ 130 public void setType(String type) { 131 this.type = type; 132 } 133 134 public Long getReleaseId() { 135 return releaseId; 136 } 137 138 public void setReleaseId(Long releaseId) { 139 this.releaseId = releaseId; 140 } 141 142 public Long getLinkedTCRCatalogTreeId() { 143 return linkedTCRCatalogTreeId; 144 } 145 146 public void setLinkedTCRCatalogTreeId(Long linkedTCRCatalogTreeId) { 147 this.linkedTCRCatalogTreeId = linkedTCRCatalogTreeId; 148 } 149 150 public Date getCreatedOn() { 151 return createdOn; 152 } 153 154 public void setCreatedOn(Date createdOn) { 155 this.createdOn = createdOn; 156 } 157 158 public Long getCreatedBy() { 159 return createdBy; 160 } 161 162 public void setCreatedBy(Long createdBy) { 163 this.createdBy = createdBy; 164 } 165 166 public Long getLastModifiedBy() { 167 return lastModifiedBy; 168 } 169 170 public void setLastModifiedBy(Long lastModifiedBy) { 171 this.lastModifiedBy = lastModifiedBy; 172 } 173 174 public Date getLastModifiedOn() { 175 return lastModifiedOn; 176 } 177 178 public void setLastModifiedOn(Date lastModifiedOn) { 179 this.lastModifiedOn = lastModifiedOn; 180 } 181 public Long getParentId() { 182 return parentId; 183 } 184 185 public void setParentId(Long parentId) { 186 this.parentId = parentId; 187 } 188 189 190 @Override 191 public int hashCode() { 192 final int prime = 31; 193 int result = 1; 194 result = prime * result + ((id == null) ? 0 : id.hashCode()); 195 return result; 196 } 197 198 @Override 199 public boolean equals(Object obj) { 200 if (this == obj) 201 return true; 202 if (obj == null) 203 return false; 204 if (getClass() != obj.getClass()) 205 return false; 206 TCRCatalogTree other = (TCRCatalogTree) obj; 207 if (id == null) { 208 if (other.id != null) 209 return false; 210 } else if (!id.equals(other.id)) 211 return false; 212 return true; 213 } 214}