/magstudentportal/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk

« back to all changes in this revision

Viewing changes to src/main/java/DB/Staff.java

  • Committer: Gustav Hartvigsson
  • Date: 2017-08-17 11:10:50 UTC
  • mto: (15.1.9 magstudentportal-more-db)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: gustav.hartvigsson@gmail.com-20170817111050-bloyo5ujotddqdnd
Generated classes from tables and added them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package DB;
 
2
 
 
3
import java.io.Serializable;
 
4
import javax.persistence.*;
 
5
 
 
6
 
 
7
/**
 
8
 * The persistent class for the staff database table.
 
9
 * 
 
10
 */
 
11
@Entity
 
12
@Table(name="staff")
 
13
@NamedQuery(name="Staff.findAll", query="SELECT s FROM Staff s")
 
14
public class Staff implements Serializable {
 
15
        private static final long serialVersionUID = 1L;
 
16
        private Integer id;
 
17
        private String nameFirst;
 
18
        private String nameLast;
 
19
        private String pwd;
 
20
        private String userName;
 
21
        private StaffType staffTypeBean;
 
22
 
 
23
        public Staff() {
 
24
        }
 
25
 
 
26
 
 
27
        @Id
 
28
        @GeneratedValue(strategy=GenerationType.AUTO)
 
29
        @Column(unique=true, nullable=false)
 
30
        public Integer getId() {
 
31
                return this.id;
 
32
        }
 
33
 
 
34
        public void setId(Integer id) {
 
35
                this.id = id;
 
36
        }
 
37
 
 
38
 
 
39
        @Column(name="name_first", nullable=false, length=32)
 
40
        public String getNameFirst() {
 
41
                return this.nameFirst;
 
42
        }
 
43
 
 
44
        public void setNameFirst(String nameFirst) {
 
45
                this.nameFirst = nameFirst;
 
46
        }
 
47
 
 
48
 
 
49
        @Column(name="name_last", nullable=false, length=32)
 
50
        public String getNameLast() {
 
51
                return this.nameLast;
 
52
        }
 
53
 
 
54
        public void setNameLast(String nameLast) {
 
55
                this.nameLast = nameLast;
 
56
        }
 
57
 
 
58
 
 
59
        @Column(nullable=false, length=256)
 
60
        public String getPwd() {
 
61
                return this.pwd;
 
62
        }
 
63
 
 
64
        public void setPwd(String pwd) {
 
65
                this.pwd = pwd;
 
66
        }
 
67
 
 
68
 
 
69
        @Column(name="user_name", nullable=false, length=32)
 
70
        public String getUserName() {
 
71
                return this.userName;
 
72
        }
 
73
 
 
74
        public void setUserName(String userName) {
 
75
                this.userName = userName;
 
76
        }
 
77
 
 
78
 
 
79
        //bi-directional many-to-one association to StaffType
 
80
        @ManyToOne
 
81
        @JoinColumn(name="staff_type")
 
82
        public StaffType getStaffTypeBean() {
 
83
                return this.staffTypeBean;
 
84
        }
 
85
 
 
86
        public void setStaffTypeBean(StaffType staffTypeBean) {
 
87
                this.staffTypeBean = staffTypeBean;
 
88
        }
 
89
 
 
90
}
 
 
b'\\ No newline at end of file'