source: source/MovieZilla-master/src/main/java/com/example/demo/model/Client/ClientCompositeKey.java

Last change on this file was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 2 years ago

all files

  • Property mode set to 100644
File size: 603 bytes
Line 
1package com.example.demo.model.Client;
2
3import com.example.demo.model.User;
4
5import javax.persistence.Embeddable;
6import javax.persistence.JoinColumn;
7import javax.persistence.ManyToOne;
8import java.io.Serializable;
9
10@Embeddable
11public class ClientCompositeKey implements Serializable {
12
13 @ManyToOne
14 @JoinColumn(name="user_id")
15 public User user;
16
17 public ClientCompositeKey(User user) {
18 this.user = user;
19 }
20
21 public ClientCompositeKey() {
22
23 }
24
25 public User getUser() {
26 return user;
27 }
28
29 public void setUser(User user) {
30 this.user = user;
31 }
32}
Note: See TracBrowser for help on using the repository browser.