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.1 KB
|
Line | |
---|
1 | package project.fmo.app.projcetfmo.Model;
|
---|
2 |
|
---|
3 |
|
---|
4 | import javax.persistence.*;
|
---|
5 | import java.util.Objects;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | @Table(schema = "project", name = "kupuvac", catalog = "db_202223z_va_prj_fmo")
|
---|
9 | public class Kupuvac {
|
---|
10 |
|
---|
11 | @Id
|
---|
12 | @Column(name = "id_korisnik")
|
---|
13 | private int idKorisnik;
|
---|
14 | @Basic
|
---|
15 | @Column(name = "mail")
|
---|
16 | private String mail;
|
---|
17 |
|
---|
18 | public Kupuvac(int idKorisnik, String mail) {
|
---|
19 | this.idKorisnik=idKorisnik;
|
---|
20 | this.mail=mail;
|
---|
21 | }
|
---|
22 |
|
---|
23 | public Kupuvac() {
|
---|
24 | }
|
---|
25 |
|
---|
26 | public int getIdKorisnik() {
|
---|
27 | return idKorisnik;
|
---|
28 | }
|
---|
29 |
|
---|
30 | public void setIdKorisnik(int idKorisnik) {
|
---|
31 | this.idKorisnik = idKorisnik;
|
---|
32 | }
|
---|
33 |
|
---|
34 | public String getMail() {
|
---|
35 | return mail;
|
---|
36 | }
|
---|
37 |
|
---|
38 | public void setMail(String mail) {
|
---|
39 | this.mail = mail;
|
---|
40 | }
|
---|
41 |
|
---|
42 | @Override
|
---|
43 | public boolean equals(Object o) {
|
---|
44 | if (this == o) return true;
|
---|
45 | if (o == null || getClass() != o.getClass()) return false;
|
---|
46 | Kupuvac kupuvac = (Kupuvac) o;
|
---|
47 | return idKorisnik == kupuvac.idKorisnik && Objects.equals(mail, kupuvac.mail);
|
---|
48 | }
|
---|
49 |
|
---|
50 | @Override
|
---|
51 | public int hashCode() {
|
---|
52 | return Objects.hash(idKorisnik, mail);
|
---|
53 | }
|
---|
54 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.