1 package org.objectweb.rentacar.persistance.bo; 2 3 import javax.xml.bind.annotation.AccessType; 4 import javax.xml.bind.annotation.XmlAccessorType; 5 import javax.xml.bind.annotation.XmlType; 6 7 import org.apache.commons.lang.builder.EqualsBuilder; 8 import org.apache.commons.lang.builder.HashCodeBuilder; 9 import org.apache.commons.lang.builder.ToStringBuilder; 10 11 16 @XmlAccessorType(AccessType.FIELD) 17 @XmlType(name = "carDeLuxeVO", propOrder = { 18 "fridge", 19 "smallBar", 20 "swimingpool", 21 "television" 22 }) 23 public class CarDeLuxeVO extends CarVO { 24 25 private String fridge; 26 27 private String swimingpool; 28 29 private String smallBar; 30 31 private String television; 32 33 public CarDeLuxeVO() { 34 super(); 35 } 36 37 public CarDeLuxeVO(String type, String brand, String model, String fridge, String swimingpool, String smallBar, String television) { 38 super(type, brand, model); 39 this.fridge = fridge; 40 this.swimingpool = swimingpool; 41 this.smallBar = smallBar; 42 this.television = television; 43 } 44 45 public String getFridge() { 46 return fridge; 47 } 48 49 public void setFridge(String fridge) { 50 this.fridge = fridge; 51 } 52 53 public String getSmallBar() { 54 return smallBar; 55 } 56 57 public void setSmallBar(String smallBar) { 58 this.smallBar = smallBar; 59 } 60 61 public String getSwimingpool() { 62 return swimingpool; 63 } 64 65 public void setSwimingpool(String swimingpool) { 66 this.swimingpool = swimingpool; 67 } 68 69 public String getTelevision() { 70 return television; 71 } 72 73 public void setTelevision(String television) { 74 this.television = television; 75 } 76 77 80 public boolean equals(Object object) { 81 if (!(object instanceof CarDeLuxeVO)) { 82 return false; 83 } 84 CarDeLuxeVO rhs = (CarDeLuxeVO) object; 85 return new EqualsBuilder().append(this.television, rhs.television) 86 .append(this.fridge, rhs.fridge).append(this.swimingpool, 87 rhs.swimingpool).append(this.smallBar, rhs.smallBar) 88 .isEquals(); 89 } 90 91 94 public int hashCode() { 95 return new HashCodeBuilder(-1474744901, 1349430491).append( 96 this.television).append(this.fridge).append(this.swimingpool) 97 .append(this.smallBar).toHashCode(); 98 } 99 100 103 public String toString() { 104 return new ToStringBuilder(this) 105 .append("swimingpool", this.swimingpool).append("smallBar", 106 this.smallBar).append("model", this.getModel()).append( 107 "carId", this.getCarId()).append("television", 108 this.television).append("type", this.getType()).append( 109 "fridge", this.fridge).append("brand", this.getBrand()) 110 .toString(); 111 } 112 113 } 114 | Popular Tags |