1 22 package org.jboss.test.hibernate.timers; 23 24 import java.io.Serializable ; 25 26 32 public class TimersID implements Serializable 33 { 34 private static final long serialVersionUID = 1L; 35 36 private String timerID; 37 private String targetID; 38 39 public TimersID() 40 { 41 } 42 public TimersID(String timerID, String targetID) 43 { 44 this.timerID = timerID; 45 this.targetID = targetID; 46 } 47 48 public String getTimerID() 49 { 50 return this.timerID; 51 } 52 53 public void setTimerID(String timerID) 54 { 55 this.timerID = timerID; 56 } 57 58 public String getTargetID() 59 { 60 return this.targetID; 61 } 62 63 public void setTargetID(String targetID) 64 { 65 this.targetID = targetID; 66 } 67 68 69 public boolean equals(Object other) 70 { 71 if ((this == other)) return true; 72 if ((other == null)) return false; 73 if (!(other instanceof TimersID)) return false; 74 TimersID castOther = (TimersID) other; 75 76 return ((this.getTimerID() == castOther.getTimerID()) || (this.getTimerID() != null && castOther.getTimerID() != null && this.getTimerID().equals(castOther.getTimerID()))) 77 && ((this.getTargetID() == castOther.getTargetID()) || (this.getTargetID() != null && castOther.getTargetID() != null && this.getTargetID().equals(castOther.getTargetID()))); 78 } 79 80 public int hashCode() 81 { 82 int result = 17; 83 84 result = 37 * result + (getTimerID() == null ? 0 : this.getTimerID().hashCode()); 85 result = 37 * result + (getTargetID() == null ? 0 : this.getTargetID().hashCode()); 86 return result; 87 } 88 89 90 } 91 | Popular Tags |