1 5 8 package com.opensymphony.workflow.spi.ejb; 9 10 11 15 public class PreviousStepPK extends java.lang.Object implements java.io.Serializable { 16 18 public java.lang.Long id; 19 public java.lang.Long previousId; 20 21 23 public PreviousStepPK() { 24 } 25 26 public PreviousStepPK(java.lang.Long id, java.lang.Long previousId) { 27 this.id = id; 28 this.previousId = previousId; 29 } 30 31 33 public void setId(java.lang.Long id) { 34 this.id = id; 35 } 36 37 public java.lang.Long getId() { 38 return id; 39 } 40 41 public void setPreviousId(java.lang.Long previousId) { 42 this.previousId = previousId; 43 } 44 45 public java.lang.Long getPreviousId() { 46 return previousId; 47 } 48 49 public boolean equals(Object obj) { 50 if (!(obj instanceof com.opensymphony.workflow.spi.ejb.PreviousStepPK)) { 51 return false; 52 } 53 54 com.opensymphony.workflow.spi.ejb.PreviousStepPK pk = (com.opensymphony.workflow.spi.ejb.PreviousStepPK) obj; 55 boolean eq = true; 56 57 if (obj == null) { 58 eq = false; 59 } else { 60 if ((this.id == null) && (((com.opensymphony.workflow.spi.ejb.PreviousStepPK) obj).getId() == null)) { 61 eq = true; 62 } else { 63 if ((this.id == null) || (((com.opensymphony.workflow.spi.ejb.PreviousStepPK) obj).getId() == null)) { 64 eq = false; 65 } else { 66 eq = eq && this.id.equals(pk.id); 67 } 68 } 69 70 if ((this.previousId == null) && (((com.opensymphony.workflow.spi.ejb.PreviousStepPK) obj).getPreviousId() == null)) { 71 eq = true; 72 } else { 73 if ((this.previousId == null) || (((com.opensymphony.workflow.spi.ejb.PreviousStepPK) obj).getPreviousId() == null)) { 74 eq = false; 75 } else { 76 eq = eq && this.previousId.equals(pk.previousId); 77 } 78 } 79 } 80 81 return eq; 82 } 83 84 public int hashCode() { 85 int hashCode = 0; 86 87 if (this.id != null) { 88 hashCode += this.id.hashCode(); 89 } 90 91 if (this.previousId != null) { 92 hashCode += this.previousId.hashCode(); 93 } 94 95 return hashCode; 96 } 97 98 99 public String toString() { 100 StringBuffer buffer = new StringBuffer ("[."); 101 buffer.append(this.id).append('.'); 102 buffer.append(this.previousId).append('.'); 103 buffer.append(']'); 104 105 return buffer.toString(); 106 } 107 } 108 | Popular Tags |