KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > rentacar > persistance > bo > CarDeLuxeVO


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 /**
12  *
13  * @author ofabre
14  *
15  */

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 JavaDoc fridge;
26     
27     private String JavaDoc swimingpool;
28     
29     private String JavaDoc smallBar;
30     
31     private String JavaDoc television;
32
33     public CarDeLuxeVO() {
34         super();
35     }
36
37     public CarDeLuxeVO(String JavaDoc type, String JavaDoc brand, String JavaDoc model, String JavaDoc fridge, String JavaDoc swimingpool, String JavaDoc smallBar, String JavaDoc 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 JavaDoc getFridge() {
46         return fridge;
47     }
48
49     public void setFridge(String JavaDoc fridge) {
50         this.fridge = fridge;
51     }
52
53     public String JavaDoc getSmallBar() {
54         return smallBar;
55     }
56
57     public void setSmallBar(String JavaDoc smallBar) {
58         this.smallBar = smallBar;
59     }
60
61     public String JavaDoc getSwimingpool() {
62         return swimingpool;
63     }
64
65     public void setSwimingpool(String JavaDoc swimingpool) {
66         this.swimingpool = swimingpool;
67     }
68
69     public String JavaDoc getTelevision() {
70         return television;
71     }
72
73     public void setTelevision(String JavaDoc television) {
74         this.television = television;
75     }
76
77     /**
78      * @see java.lang.Object#equals(Object)
79      */

80     public boolean equals(Object JavaDoc 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     /**
92      * @see java.lang.Object#hashCode()
93      */

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     /**
101      * @see java.lang.Object#toString()
102      */

103     public String JavaDoc 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