Last change
on this file since 850b344 was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | package com.project.beautycenter.model;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 |
|
---|
5 | @Entity
|
---|
6 | @Table(name = "rezervacija_uslugi", schema = "project")
|
---|
7 | public class RezervacijaUslugi {
|
---|
8 | @EmbeddedId
|
---|
9 | private RezervacijaUslugiId id;
|
---|
10 |
|
---|
11 | @MapsId("brRez")
|
---|
12 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
|
---|
13 | @JoinColumn(name = "br_rez", nullable = false)
|
---|
14 | private Rezervacija brRez;
|
---|
15 |
|
---|
16 | @MapsId("uslugaId")
|
---|
17 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
|
---|
18 | @JoinColumn(name = "usluga_id", nullable = false)
|
---|
19 | private Uslugi usluga;
|
---|
20 |
|
---|
21 | public RezervacijaUslugi(){}
|
---|
22 | public RezervacijaUslugi(RezervacijaUslugiId id,Rezervacija brRez, Uslugi usluga) {
|
---|
23 | this.id = id;
|
---|
24 | this.brRez = brRez;
|
---|
25 | this.usluga = usluga;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public Uslugi getUsluga() {
|
---|
29 | return usluga;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public void setUsluga(Uslugi usluga) {
|
---|
33 | this.usluga = usluga;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public Rezervacija getBrRez() {
|
---|
37 | return brRez;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public void setBrRez(Rezervacija brRez) {
|
---|
41 | this.brRez = brRez;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public RezervacijaUslugiId getId() {
|
---|
45 | return id;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public void setId(RezervacijaUslugiId id) {
|
---|
49 | this.id = id;
|
---|
50 | }
|
---|
51 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.