1 package com.ibytecode.entities;
2
3 import java.io.Serializable;
4 import javax.persistence.Entity;
5 import javax.persistence.Id;
6 import javax.persistence.Column;
7
8 @Entity(name = "project")
9 public class Project implements Serializable {
10 private static final long serialVersionUID = 1L;
11
12 public Project() {
13 super();
14 }
15
16 @Id
17 private int pnumber;
18 private String pname;
19 private String plocation;
20
21 @Column(name = "dept_no")
22 private int deptNo;
23
24 public int getPnumber() {
25 return pnumber;
26 }
27 public void setPnumber(int pnumber) {
28 this.pnumber = pnumber;
29 }
30 public String getPname() {
31 return pname;
32 }
33 public void setPname(String pname) {
34 this.pname = pname;
35 }
36 public String getPlocation() {
37 return plocation;
38 }
39 public void setPlocation(String plocation) {
40 this.plocation = plocation;
41 }
42 public int getDeptNo() {
43 return deptNo;
44 }
45 public void setDeptNo(int deptNo) {
46 this.deptNo = deptNo;
47 }
48 @Override
49 public String toString() {
50 return "Project [pnumber=" + pnumber + ", pname=" + pname
51 + ", plocation=" + plocation + ", deptNo=" + deptNo + "]";
52 }
53 }