1 18 19 package org.apache.roller.pojos; 20 21 import java.io.Serializable ; 22 23 34 public class AutoPingData extends PersistentObject implements Serializable { 35 private String id = null; 36 private PingTargetData pingTarget = null; 37 private WebsiteData website = null; 38 39 public static final long serialVersionUID = -9105985454111986435L; 40 41 44 public AutoPingData() { 45 } 46 47 54 public AutoPingData(String id, PingTargetData pingtarget, WebsiteData website) { 55 this.id = id; 56 this.website = website; 57 this.pingTarget = pingtarget; 58 } 59 60 63 public void setData(PersistentObject vo) { 64 AutoPingData other = (AutoPingData) vo; 65 66 id = other.getId(); 67 website = other.getWebsite(); 68 pingTarget = other.getPingTarget(); 69 } 70 71 78 public String getId() { 79 return id; 80 } 81 82 88 public void setId(String id) { 89 this.id = id; 90 } 91 92 100 public WebsiteData getWebsite() { 101 return website; 102 } 103 104 111 public void setWebsite(WebsiteData website) { 112 this.website = website; 113 } 114 115 122 public PingTargetData getPingTarget() { 123 return pingTarget; 124 } 125 126 132 public void setPingTarget(PingTargetData pingtarget) { 133 this.pingTarget = pingtarget; 134 } 135 136 139 public boolean equals(Object o) { 140 if (this == o) return true; 141 if (!(o instanceof AutoPingData)) return false; 142 143 final AutoPingData autoPingData = (AutoPingData) o; 144 145 if (id != null ? !id.equals(autoPingData.getId()) : autoPingData.getId() != null) return false; 146 if (pingTarget != null ? !pingTarget.equals(autoPingData.getPingTarget()) : autoPingData.getPingTarget() != null) 147 { 148 return false; 149 } 150 if (website != null ? !website.equals(autoPingData.getWebsite()) : autoPingData.getWebsite() != null) { 151 return false; 152 } 153 154 return true; 155 } 156 157 160 public int hashCode() { 161 return (id != null ? id.hashCode() : 0); 162 } 163 164 170 public String toString() { 171 return "AutoPingData{" + "id='" + id + "'" + ", pingTarget=" + pingTarget + ", website= " + (website == null ? "null" : "{id='" + website.getId() + "'} ") + "}"; 172 } 173 } 174 | Popular Tags |