1 8 9 package org.roller.pojos; 10 11 import java.io.Serializable ; 12 13 24 public class PingCategoryRestrictionData extends PersistentObject implements Serializable 25 { 26 protected String id; 27 protected AutoPingData autoPing; 28 protected WeblogCategoryData weblogCategory; 29 30 static final long serialVersionUID = 2261280579491859418L; 31 32 35 public PingCategoryRestrictionData() 36 { 37 } 38 39 46 public PingCategoryRestrictionData(String id, AutoPingData autoPing, WeblogCategoryData weblogCategory) 47 { 48 this.id = id; 49 this.autoPing = autoPing; 50 this.weblogCategory = weblogCategory; 51 } 52 53 56 public void setData(PersistentObject vo) 57 { 58 PingCategoryRestrictionData other = (PingCategoryRestrictionData)vo; 59 id = other.id; 60 autoPing = other.autoPing; 61 weblogCategory = other.weblogCategory; 62 } 63 64 71 public String getId() 72 { 73 return id; 74 } 75 76 82 public void setId(String id) 83 { 84 this.id = id; 85 } 86 87 94 public AutoPingData getAutoping() 95 { 96 return autoPing; 97 } 98 99 105 public void setAutoping(AutoPingData autoPing) 106 { 107 this.autoPing = autoPing; 108 } 109 110 117 public WeblogCategoryData getWeblogCategory() 118 { 119 return weblogCategory; 120 } 121 122 128 public void setWeblogCategory(WeblogCategoryData weblogCategory) 129 { 130 this.weblogCategory = weblogCategory; 131 } 132 133 136 public boolean equals(Object o) 137 { 138 if (this == o) return true; 139 if (!(o instanceof PingCategoryRestrictionData)) return false; 140 141 final PingCategoryRestrictionData pingCategoryRestrictionData = (PingCategoryRestrictionData)o; 142 143 if (id != null ? !id.equals(pingCategoryRestrictionData.id) : pingCategoryRestrictionData.id != null) return false; 144 if (autoPing != null ? !autoPing.equals(pingCategoryRestrictionData.autoPing) : pingCategoryRestrictionData.autoPing != null) return false; 145 if (weblogCategory != null ? !weblogCategory.equals(pingCategoryRestrictionData.weblogCategory) : pingCategoryRestrictionData.weblogCategory != null) return false; 146 147 return true; 148 } 149 150 153 public int hashCode() 154 { 155 return (id != null ? id.hashCode() : 0); 156 } 157 } | Popular Tags |