[d14176d] | 1 | package project.fmo.app.projcetfmo.Model;
|
---|
[1dd9226] | 2 |
|
---|
[d14176d] | 3 | import javax.persistence.*;
|
---|
[1dd9226] | 4 |
|
---|
| 5 | import java.io.Serializable;
|
---|
| 6 | import java.util.Objects;
|
---|
| 7 |
|
---|
| 8 | public class TelefonskibrojPK implements Serializable {
|
---|
| 9 | @Column(name = "id_korisnik")
|
---|
| 10 | @Id
|
---|
| 11 | private int idKorisnik;
|
---|
| 12 | @Column(name = "telefonski_broj")
|
---|
| 13 | @Id
|
---|
| 14 | private String telefonskiBroj;
|
---|
| 15 |
|
---|
[d14176d] | 16 |
|
---|
| 17 | public TelefonskibrojPK(){
|
---|
| 18 |
|
---|
| 19 | }
|
---|
| 20 | public TelefonskibrojPK(int idKorisnik, String telefonskiBroj) {
|
---|
| 21 | this.idKorisnik = idKorisnik;
|
---|
| 22 | this.telefonskiBroj = telefonskiBroj;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
[1dd9226] | 25 | public int getIdKorisnik() {
|
---|
| 26 | return idKorisnik;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public void setIdKorisnik(int idKorisnik) {
|
---|
| 30 | this.idKorisnik = idKorisnik;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public String getTelefonskiBroj() {
|
---|
| 34 | return telefonskiBroj;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public void setTelefonskiBroj(String telefonskiBroj) {
|
---|
| 38 | this.telefonskiBroj = telefonskiBroj;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | @Override
|
---|
| 42 | public boolean equals(Object o) {
|
---|
| 43 | if (this == o) return true;
|
---|
| 44 | if (o == null || getClass() != o.getClass()) return false;
|
---|
| 45 | TelefonskibrojPK that = (TelefonskibrojPK) o;
|
---|
| 46 | return idKorisnik == that.idKorisnik && Objects.equals(telefonskiBroj, that.telefonskiBroj);
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | @Override
|
---|
| 50 | public int hashCode() {
|
---|
| 51 | return Objects.hash(idKorisnik, telefonskiBroj);
|
---|
| 52 | }
|
---|
| 53 | }
|
---|