[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 TelefonskibrojPK implements Serializable {
|
---|
| 12 | @Column(name = "id_korisnik")
|
---|
| 13 | @Id
|
---|
| 14 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 15 | private int idKorisnik;
|
---|
| 16 | @Column(name = "telefonski_broj")
|
---|
| 17 | @Id
|
---|
| 18 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 19 | private String telefonskiBroj;
|
---|
| 20 |
|
---|
| 21 | public int getIdKorisnik() {
|
---|
| 22 | return idKorisnik;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | public void setIdKorisnik(int idKorisnik) {
|
---|
| 26 | this.idKorisnik = idKorisnik;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public String getTelefonskiBroj() {
|
---|
| 30 | return telefonskiBroj;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public void setTelefonskiBroj(String telefonskiBroj) {
|
---|
| 34 | this.telefonskiBroj = telefonskiBroj;
|
---|
| 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 | TelefonskibrojPK that = (TelefonskibrojPK) o;
|
---|
| 42 | return idKorisnik == that.idKorisnik && Objects.equals(telefonskiBroj, that.telefonskiBroj);
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | @Override
|
---|
| 46 | public int hashCode() {
|
---|
| 47 | return Objects.hash(idKorisnik, telefonskiBroj);
|
---|
| 48 | }
|
---|
| 49 | }
|
---|