main
Last change
on this file since 1dd9226 was 1dd9226, checked in by HristijanMitic00 <hristijan.mitic.01@…>, 19 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1003 bytes
|
Line | |
---|
1 | package model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 |
|
---|
5 | import java.util.Objects;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | public class Magacin {
|
---|
9 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
10 | @Id
|
---|
11 | @Column(name = "id_magacin")
|
---|
12 | private int idMagacin;
|
---|
13 | @Basic
|
---|
14 | @Column(name = "lokacija")
|
---|
15 | private String lokacija;
|
---|
16 |
|
---|
17 | public int getIdMagacin() {
|
---|
18 | return idMagacin;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public void setIdMagacin(int idMagacin) {
|
---|
22 | this.idMagacin = idMagacin;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public String getLokacija() {
|
---|
26 | return lokacija;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public void setLokacija(String lokacija) {
|
---|
30 | this.lokacija = lokacija;
|
---|
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 | Magacin magacin = (Magacin) o;
|
---|
38 | return idMagacin == magacin.idMagacin && Objects.equals(lokacija, magacin.lokacija);
|
---|
39 | }
|
---|
40 |
|
---|
41 | @Override
|
---|
42 | public int hashCode() {
|
---|
43 | return Objects.hash(idMagacin, lokacija);
|
---|
44 | }
|
---|
45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.