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