1 package org.wcb.model.vo.hibernate;
2
3 import java.io.Serializable;
4 import org.apache.commons.lang.builder.ToStringBuilder;
5
6 import javax.persistence.*;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 @Entity
31 @Table(name ="aircraft_type")
32 public class AircraftTypeBO implements Serializable {
33
34
35 private Integer id;
36
37
38 private String manufacturer;
39
40
41 private String model;
42
43
44 private String abbreviation;
45
46
47 private Integer characteristics;
48
49
50 public AircraftTypeBO(String manufacturer, String model, String abbreviation, Integer characteristics) {
51 this.manufacturer = manufacturer;
52 this.model = model;
53 this.abbreviation = abbreviation;
54 this.characteristics = characteristics;
55 }
56
57
58 public AircraftTypeBO() {
59 }
60
61
62
63
64
65 @Id
66 @GeneratedValue(strategy= GenerationType.AUTO)
67 public Integer getId() {
68 return this.id;
69 }
70
71 public void setId(Integer id) {
72 this.id = id;
73 }
74
75
76
77
78
79 @Column(name = "manufacturer", length=20)
80 public String getManufacturer() {
81 return this.manufacturer;
82 }
83
84 public void setManufacturer(String manufacturer) {
85 this.manufacturer = manufacturer;
86 }
87
88
89
90
91
92 @Column(name = "model", length=20)
93 public String getModel() {
94 return this.model;
95 }
96
97 public void setModel(String model) {
98 this.model = model;
99 }
100
101
102
103
104
105
106 @Column(name = "abbreviation", length=20)
107 public String getAbbreviation() {
108 return this.abbreviation;
109 }
110
111 public void setAbbreviation(String abbreviation) {
112 this.abbreviation = abbreviation;
113 }
114
115
116
117
118
119
120 @Column(name = "characteristics", length=11)
121 public Integer getCharacteristics() {
122 if (this.characteristics == null) {
123 this.characteristics = 1;
124 }
125 return this.characteristics;
126 }
127
128 public void setCharacteristics(Integer characteristics) {
129 this.characteristics = characteristics;
130 }
131
132 public String toString() {
133 return new ToStringBuilder(this)
134 .append("id", getId())
135 .toString();
136 }
137
138 }