1 package org.wcb.model.vo.hibernate;
2
3 import java.io.Serializable;
4
5 import javax.persistence.*;
6
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")
32 public class AircraftBO implements Serializable {
33
34
35 private Integer id;
36
37
38 private String registrationNumber;
39
40
41 private int typeId;
42
43
44 public AircraftBO(String registrationNumber, int typeId) {
45 this.registrationNumber = registrationNumber;
46 this.typeId = typeId;
47 }
48
49
50 public AircraftBO() {
51 }
52
53
54
55
56
57 @Id
58 @GeneratedValue(strategy= GenerationType.AUTO)
59 public Integer getId() {
60 return this.id;
61 }
62
63 public void setId(Integer id) {
64 this.id = id;
65 }
66
67
68
69
70
71 @Column(name = "registration_number", nullable=false, length=7)
72 public String getRegistrationNumber() {
73 return this.registrationNumber;
74 }
75
76 public void setRegistrationNumber(String registrationNumber) {
77 this.registrationNumber = registrationNumber;
78 }
79
80
81
82
83
84 @Column(name = "type_id", nullable=false, length=11)
85 public int getTypeId() {
86 return this.typeId;
87 }
88
89 public void setTypeId(int typeId) {
90 this.typeId = typeId;
91 }
92
93
94 public String toString() {
95 return this.registrationNumber;
96 }
97
98 }