Last change
on this file was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 2 years ago |
all files
|
-
Property mode
set to
100644
|
File size:
844 bytes
|
Line | |
---|
1 | package com.example.demo.model.Employee;
|
---|
2 |
|
---|
3 | import lombok.Data;
|
---|
4 |
|
---|
5 | import javax.persistence.EmbeddedId;
|
---|
6 | import javax.persistence.Entity;
|
---|
7 | import javax.persistence.Table;
|
---|
8 |
|
---|
9 | @Entity
|
---|
10 | @Data
|
---|
11 | @Table(name="employee")
|
---|
12 | public class Employee {
|
---|
13 |
|
---|
14 | @EmbeddedId
|
---|
15 | EmployeeKey employeeKey;
|
---|
16 |
|
---|
17 | Integer employee_id;
|
---|
18 |
|
---|
19 | public Employee(EmployeeKey employeeKey, Integer employee_id) {
|
---|
20 | this.employeeKey = employeeKey;
|
---|
21 | this.employee_id = employee_id;
|
---|
22 | }
|
---|
23 |
|
---|
24 | public Employee() {
|
---|
25 |
|
---|
26 | }
|
---|
27 |
|
---|
28 | public EmployeeKey getEmployeeKey() {
|
---|
29 | return employeeKey;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public void setEmployeeKey(EmployeeKey employeeKey) {
|
---|
33 | this.employeeKey = employeeKey;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public Integer getEmployee_id() {
|
---|
37 | return employee_id;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public void setEmployee_id(Integer employee_id) {
|
---|
41 | this.employee_id = employee_id;
|
---|
42 | }
|
---|
43 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.