main
Last change
on this file since d14176d was d14176d, checked in by HristijanMitic00 <hristijan.mitic.01@…>, 12 months ago |
First commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[d14176d] | 1 | package project.fmo.app.projcetfmo.Model;
|
---|
| 2 |
|
---|
| 3 | import javax.persistence.*;
|
---|
[1dd9226] | 4 |
|
---|
| 5 |
|
---|
| 6 | import java.io.Serializable;
|
---|
| 7 | import java.util.Objects;
|
---|
| 8 |
|
---|
| 9 | public class ProduktEVoMagacinPK implements Serializable {
|
---|
| 10 | @Column(name = "id_produkt")
|
---|
| 11 | @Id
|
---|
| 12 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 13 | private int idProdukt;
|
---|
| 14 | @Column(name = "id_magacin")
|
---|
| 15 | @Id
|
---|
| 16 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 17 | private int idMagacin;
|
---|
| 18 |
|
---|
| 19 | public int getIdProdukt() {
|
---|
| 20 | return idProdukt;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | public void setIdProdukt(int idProdukt) {
|
---|
| 24 | this.idProdukt = idProdukt;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | public int getIdMagacin() {
|
---|
| 28 | return idMagacin;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | public void setIdMagacin(int idMagacin) {
|
---|
| 32 | this.idMagacin = idMagacin;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | @Override
|
---|
| 36 | public boolean equals(Object o) {
|
---|
| 37 | if (this == o) return true;
|
---|
| 38 | if (o == null || getClass() != o.getClass()) return false;
|
---|
| 39 | ProduktEVoMagacinPK that = (ProduktEVoMagacinPK) o;
|
---|
| 40 | return idProdukt == that.idProdukt && idMagacin == that.idMagacin;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | @Override
|
---|
| 44 | public int hashCode() {
|
---|
| 45 | return Objects.hash(idProdukt, idMagacin);
|
---|
| 46 | }
|
---|
| 47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.