1 7 8 package org.roller.pojos; 9 10 import java.io.Serializable ; 11 12 22 public class AutoPingData extends PersistentObject implements Serializable 23 { 24 protected String id; 25 protected PingTargetData pingTarget; 26 protected WebsiteData website; 27 28 static final long serialVersionUID = -9105985454111986435L; 29 30 33 public AutoPingData() 34 { 35 } 36 37 44 public AutoPingData(String id, PingTargetData pingtarget, WebsiteData website) 45 { 46 this.id = id; 47 this.website = website; 48 this.pingTarget = pingtarget; 49 } 50 51 54 public void setData(PersistentObject vo) 55 { 56 AutoPingData other = (AutoPingData)vo; 57 id = other.id; 58 website = other.website; 59 pingTarget = other.pingTarget; 60 } 61 62 69 public String getId() 70 { 71 return id; 72 } 73 74 80 public void setId(String id) 81 { 82 this.id = id; 83 } 84 85 93 public WebsiteData getWebsite() 94 { 95 return website; 96 } 97 98 105 public void setWebsite(WebsiteData website) 106 { 107 this.website = website; 108 } 109 110 117 public PingTargetData getPingTarget() 118 { 119 return pingTarget; 120 } 121 122 128 public void setPingTarget(PingTargetData pingtarget) 129 { 130 this.pingTarget = pingtarget; 131 } 132 133 136 public boolean equals(Object o) 137 { 138 if (this == o) return true; 139 if (!(o instanceof AutoPingData)) return false; 140 141 final AutoPingData autoPingData = (AutoPingData)o; 142 143 if (id != null ? !id.equals(autoPingData.id) : autoPingData.id != null) return false; 144 if (pingTarget != null ? !pingTarget.equals(autoPingData.pingTarget) : autoPingData.pingTarget != null) return false; 145 if (website != null ? !website.equals(autoPingData.website) : autoPingData.website != null) return false; 146 147 return true; 148 } 149 150 153 public int hashCode() 154 { 155 return (id != null ? id.hashCode() : 0); 156 } 157 158 163 public String toString() 164 { 165 return "AutoPingData{" + 166 "id='" + id + "'" + 167 ", pingTarget=" + pingTarget + 168 ", website= " + (website == null ? "null" : "{id='" + website.getId() + "', user='" + website.getUser().getUserName() + "'} ") + 169 "}"; 170 } 171 } 172 | Popular Tags |