main
Last change
on this file was d14176d, checked in by HristijanMitic00 <hristijan.mitic.01@…>, 19 months ago |
First commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package project.fmo.app.projcetfmo.Model;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 |
|
---|
5 | import java.util.Objects;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | @Table(schema = "project", name = "magacioner", catalog = "db_202223z_va_prj_fmo")
|
---|
9 | public class Magacioner {
|
---|
10 | @Id
|
---|
11 | @Column(name = "id_korisnik")
|
---|
12 | private int idKorisnik;
|
---|
13 | @ManyToOne
|
---|
14 | @JoinColumn(name = "id_magacin")
|
---|
15 | private Magacin magacin;
|
---|
16 |
|
---|
17 | public int getIdKorisnik() {
|
---|
18 | return idKorisnik;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public void setIdKorisnik(int idKorisnik) {
|
---|
22 | this.idKorisnik = idKorisnik;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public Magacin getMagacin() {
|
---|
26 | return magacin;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public void setMagacin(Magacin magacin) {
|
---|
30 | this.magacin = magacin;
|
---|
31 | }
|
---|
32 |
|
---|
33 | @Override
|
---|
34 | public boolean equals(Object o) {
|
---|
35 | if (this == o) return true;
|
---|
36 | if (o == null || getClass() != o.getClass()) return false;
|
---|
37 | Magacioner that = (Magacioner) o;
|
---|
38 | return idKorisnik == that.idKorisnik && magacin == that.magacin;
|
---|
39 | }
|
---|
40 |
|
---|
41 | @Override
|
---|
42 | public int hashCode() {
|
---|
43 | return Objects.hash(idKorisnik, magacin);
|
---|
44 | }
|
---|
45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.