1 package org.objectweb.rentacar.persistance.bo; 2 3 import org.apache.commons.lang.builder.EqualsBuilder; 4 import org.apache.commons.lang.builder.HashCodeBuilder; 5 import org.apache.commons.lang.builder.ToStringBuilder; 6 7 12 public class AgencyCriteria { 13 14 private String agencyId; 15 16 private String zipPattern; 17 18 private String lastName; 19 20 public AgencyCriteria() { 21 super(); 22 } 23 24 public AgencyCriteria(String agencyId, String zipPattern, String lastName) { 25 super(); 26 this.zipPattern = zipPattern; 28 this.lastName = lastName; 29 } 30 31 public String getLastName() { 32 return lastName; 33 } 34 35 public void setLastName(String lastName) { 36 this.lastName = lastName; 37 } 38 39 public String getZipPattern() { 40 return zipPattern; 41 } 42 43 public void setZipPattern(String zipPattern) { 44 this.zipPattern = zipPattern; 45 } 46 47 public String getAgencyId() { 48 return agencyId; 49 } 50 51 public void setAgencyId(String agencyId) { 52 this.agencyId = agencyId; 53 } 54 55 58 public boolean equals(Object object) { 59 if (!(object instanceof AgencyCriteria)) { 60 return false; 61 } 62 AgencyCriteria rhs = (AgencyCriteria) object; 63 return new EqualsBuilder().append(this.zipPattern, rhs.zipPattern) 64 .append(this.agencyId, rhs.agencyId).append(this.lastName, 65 rhs.lastName).isEquals(); 66 } 67 68 71 public int hashCode() { 72 return new HashCodeBuilder(1916301059, 2054063585).append( 73 this.zipPattern).append(this.agencyId).append(this.lastName) 74 .toHashCode(); 75 } 76 77 80 public String toString() { 81 return new ToStringBuilder(this).append("lastName", this.lastName) 82 .append("agencyId", this.agencyId).append("zipPattern", 83 this.zipPattern).toString(); 84 } 85 86 87 88 } 89 | Popular Tags |