Last change
on this file since fc7ec52 was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 22 months ago |
all files
|
-
Property mode
set to
100644
|
File size:
921 bytes
|
Rev | Line | |
---|
[fc7ec52] | 1 | package com.example.demo.model.Works_in;
|
---|
| 2 |
|
---|
| 3 | import com.example.demo.model.Employee.Employee;
|
---|
| 4 | import com.example.demo.model.Firm;
|
---|
| 5 |
|
---|
| 6 | import javax.persistence.Embeddable;
|
---|
| 7 | import javax.persistence.JoinColumn;
|
---|
| 8 | import javax.persistence.ManyToOne;
|
---|
| 9 | import java.io.Serializable;
|
---|
| 10 |
|
---|
| 11 | @Embeddable
|
---|
| 12 | public class WorksInKey implements Serializable {
|
---|
| 13 |
|
---|
| 14 | @ManyToOne
|
---|
| 15 | @JoinColumn(name="user_id")
|
---|
| 16 | private Employee employee;
|
---|
| 17 |
|
---|
| 18 | @ManyToOne
|
---|
| 19 | @JoinColumn(name="firm_id")
|
---|
| 20 | private Firm firm;
|
---|
| 21 |
|
---|
| 22 | public WorksInKey(Employee employee, Firm firm) {
|
---|
| 23 | this.employee = employee;
|
---|
| 24 | this.firm = firm;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | public WorksInKey() {
|
---|
| 28 |
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | public Employee getEmployee() {
|
---|
| 32 | return employee;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | public void setEmployee(Employee employee) {
|
---|
| 36 | this.employee = employee;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | public Firm getFirm() {
|
---|
| 40 | return firm;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | public void setFirm(Firm firm) {
|
---|
| 44 | this.firm = firm;
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.