1 package com.iqjava.department;
2
3
4 import javax.persistence.Column;
5 import javax.persistence.Entity;
6 import javax.persistence.GeneratedValue;
7 import javax.persistence.Id;
8 import javax.persistence.Table;
9
10
11 @Entity
12 @Table(name="DEPTT")
13 public class Department {
14
15 private long departmentId;
16 private String departmentName;
17
18 public Department() {
19 }
20
21 public Department(String departmentName) {
22 this.departmentName = departmentName;
23 }
24
25 @Id
26 @GeneratedValue
27 @Column(name="DEPTT_ID")
28 public long getDepartmentId() {
29 return this.departmentId;
30 }
31
32 public void setDepartmentId(long departmentId) {
33 this.departmentId = departmentId;
34 }
35
36 @Column(name="DEPTT_NAME", nullable=false)
37 public String getDepartmentName() {
38 return this.departmentName;
39 }
40
41 public void setDepartmentName(String departmentName) {
42 this.departmentName = departmentName;
43 }
44
45 }
46