-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJobPost.java
More file actions
executable file
·73 lines (57 loc) · 2.01 KB
/
Copy pathJobPost.java
File metadata and controls
executable file
·73 lines (57 loc) · 2.01 KB
1
2
3
4
5
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.cpe.backend.jobpost.entity;
import lombok.*;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import com.cpe.backend.registercompany.entity.Company;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
@Data
@Entity
@NoArgsConstructor
@Table(name="JOBPOST")
public class JobPost {
@Id
@SequenceGenerator(name="JOBPOSTP_SEQ",sequenceName="JOBPOSTP_SEQ")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="JOBPOSTP_SEQ")
@Column(name="JOBPOSTP_ID",unique = true, nullable = true)
private @NonNull Long JobPost_id;
@Column(name="SARALY")
private @NonNull String salary;
@Column(name="EDUCATIONLEVEL")
private @NonNull String educationlevel;
@Column(name="OTHER_DETAILS")
private @NonNull String Other_details;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Company.class)
@JoinColumn(name = "Company_ID", insertable = true)
private Company company;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Benefits.class)
@JoinColumn(name = "BENEFITS_ID", insertable = true)
private Benefits benefits;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Position.class)
@JoinColumn(name = "POSITION_ID", insertable = true)
private Position position;
public void setBenefits(Benefits benefits) {
this.benefits=benefits;
}
public void setCompany(Company company) {
this.company=company;
}
public void setPosition(Position position) {
this.position=position;
}
public void setOther(String other_details) {
this.Other_details=other_details;
}
public void setEducationlevel(String educationlevel) {
this.educationlevel=educationlevel;
}
public void setSalary(String salary) {
this.salary=salary;
}
}