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:
970 bytes
|
Line | |
---|
1 | package model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 |
|
---|
5 | import java.util.Objects;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | public class Kupuvac {
|
---|
9 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
10 | @Id
|
---|
11 | @Column(name = "id_korisnik")
|
---|
12 | private int idKorisnik;
|
---|
13 | @Basic
|
---|
14 | @Column(name = "mail")
|
---|
15 | private String mail;
|
---|
16 |
|
---|
17 | public int getIdKorisnik() {
|
---|
18 | return idKorisnik;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public void setIdKorisnik(int idKorisnik) {
|
---|
22 | this.idKorisnik = idKorisnik;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public String getMail() {
|
---|
26 | return mail;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public void setMail(String mail) {
|
---|
30 | this.mail = mail;
|
---|
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 | Kupuvac kupuvac = (Kupuvac) o;
|
---|
38 | return idKorisnik == kupuvac.idKorisnik && Objects.equals(mail, kupuvac.mail);
|
---|
39 | }
|
---|
40 |
|
---|
41 | @Override
|
---|
42 | public int hashCode() {
|
---|
43 | return Objects.hash(idKorisnik, mail);
|
---|
44 | }
|
---|
45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.