/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-28 14:01:22 UTC
  • mfrom: (15.1.10 magstudentportal-more-db)
  • Revision ID: gustav.hartvigsson@gmail.com-20170828140122-dfqs6oxweh0zjzlj
* Merged stuff into trunk

Show diffs side-by-side

added added

removed removed

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