1 24 package org.infoglue.cms.entities.management; 25 26 import org.infoglue.cms.entities.kernel.Persistent; 27 import org.infoglue.cms.util.ConstraintExceptionBuffer; 28 import org.infoglue.cms.util.DomainUtils; 29 30 34 public class PropertiesCategoryVO extends Persistent 35 { 36 private Integer propertiesCategoryId; 37 private String attributeName; 38 private String entityName; 39 private Integer entityId; 40 private CategoryVO category = new CategoryVO(); 41 42 public PropertiesCategoryVO() {} 43 44 public PropertiesCategoryVO(String attributeName, String entityName, Integer entityId, CategoryVO category) 45 { 46 setAttributeName(attributeName); 47 setEntityName(entityName); 48 setEntityId(entityId); 49 setCategory(category); 50 } 51 52 public PropertiesCategoryVO(Integer id, String attributeName, String entityName, Integer entityId, CategoryVO category) 53 { 54 this(attributeName, entityName, entityId, category); 55 setPropertiesCategoryId(id); 56 } 57 58 public Integer getId() 59 { 60 return getPropertiesCategoryId(); 61 } 62 63 public Integer getPropertiesCategoryId() 64 { 65 return propertiesCategoryId; 66 } 67 68 public void setPropertiesCategoryId(Integer i) 69 { 70 propertiesCategoryId = i; 71 } 72 73 public String getAttributeName() 74 { 75 return attributeName; 76 } 77 78 public void setAttributeName(String s) 79 { 80 attributeName = s; 81 } 82 83 public Integer getEntityId() 84 { 85 return entityId; 86 } 87 88 public void setEntityId(Integer entityId) 89 { 90 this.entityId = entityId; 91 } 92 93 public String getEntityName() 94 { 95 return entityName; 96 } 97 98 public void setEntityName(String entityName) 99 { 100 this.entityName = entityName; 101 } 102 103 public CategoryVO getCategory() 104 { 105 return category; 106 } 107 108 public void setCategory(CategoryVO c) 109 { 110 category = (c != null) ? c : new CategoryVO(); 111 } 112 113 116 public ConstraintExceptionBuffer validate() 117 { 118 return new ConstraintExceptionBuffer(); 119 } 120 121 public boolean equals(Object o) 122 { 123 if (super.equals(o)) 124 { 125 PropertiesCategoryVO vo = (PropertiesCategoryVO)o; 126 return DomainUtils.equals(propertiesCategoryId, vo.propertiesCategoryId) 127 && DomainUtils.equals(attributeName, vo.attributeName) 128 && DomainUtils.equals(entityName, vo.entityName) 129 && DomainUtils.equals(entityId, vo.entityId) 130 && DomainUtils.equals(category.getId(), vo.category.getId()); 131 } 132 return false; 133 } 134 135 public StringBuffer toStringBuffer() 136 { 137 StringBuffer sb = super.toStringBuffer(); 138 sb.append(" attributeName=").append(attributeName) 139 .append(" entityName=").append(entityName) 140 .append(" entityId=").append(entityId) 141 .append(" categoryId=").append(category.getId()); 142 return sb; 143 } 144 145 } 146 147 | Popular Tags |