|
2 | 2 |
|
3 | 3 | import java.time.LocalDate;
|
4 | 4 | import java.util.List;
|
| 5 | +import java.util.Objects; |
5 | 6 |
|
6 | 7 | import com.fasterxml.jackson.annotation.JsonAlias;
|
| 8 | +import com.fasterxml.jackson.annotation.JsonCreator; |
7 | 9 | import com.fasterxml.jackson.annotation.JsonProperty;
|
8 | 10 |
|
9 |
| -public record Grunnlag(Status status, |
10 |
| - Tema tema, |
11 |
| - Prosent dekningsgrad, |
12 |
| - @JsonProperty("fødselsdatoBarn") @JsonAlias("foedselsdatoBarn") LocalDate fødselsdatoBarn, |
13 |
| - @JsonProperty("kategori") @JsonAlias("arbeidskategori") Arbeidskategori kategori, |
14 |
| - List<Arbeidsforhold> arbeidsforhold, |
15 |
| - Periode periode, |
16 |
| - Behandlingstema behandlingstema, |
17 |
| - LocalDate identdato, |
18 |
| - LocalDate iverksatt, |
19 |
| - @JsonProperty("opphørFom") @JsonAlias("opphoerFom") LocalDate opphørFom, |
20 |
| - Integer gradering, |
21 |
| - LocalDate opprinneligIdentdato, |
22 |
| - LocalDate registrert, |
23 |
| - String saksbehandlerId, |
24 |
| - List<Vedtak> vedtak) { |
| 11 | +public class Grunnlag { |
| 12 | + private Status status; |
| 13 | + private Tema tema; |
| 14 | + private Prosent dekningsgrad; |
| 15 | + private LocalDate fødselsdatoBarn; |
| 16 | + private Arbeidskategori kategori; |
| 17 | + private List<Arbeidsforhold> arbeidsforhold; |
| 18 | + private Periode periode; |
| 19 | + private Behandlingstema behandlingsTema; |
| 20 | + private LocalDate identdato; |
| 21 | + private LocalDate iverksatt; |
| 22 | + private LocalDate opphørFom; |
| 23 | + private Integer gradering; |
| 24 | + private LocalDate opprinneligIdentdato; |
| 25 | + private LocalDate registrert; |
| 26 | + private String saksbehandlerId; |
| 27 | + private List<Vedtak> vedtak; |
25 | 28 |
|
| 29 | + @JsonCreator |
| 30 | + public Grunnlag(@JsonProperty("status") Status status, |
| 31 | + @JsonProperty("tema") Tema tema, |
| 32 | + @JsonProperty("dekningsgrad") Prosent dekningsgrad, |
| 33 | + @JsonProperty("fødselsdatoBarn") @JsonAlias("foedselsdatoBarn") LocalDate fødselsdatoBarn, |
| 34 | + @JsonProperty("kategori") @JsonAlias("arbeidskategori") Arbeidskategori kategori, |
| 35 | + @JsonProperty("arbeidsforhold") List<Arbeidsforhold> arbeidsforhold, |
| 36 | + @JsonProperty("periode") Periode periode, |
| 37 | + @JsonProperty("behandlingstema") Behandlingstema behandlingsTema, |
| 38 | + @JsonProperty("identdato") LocalDate identdato, |
| 39 | + @JsonProperty("iverksatt") LocalDate iverksatt, |
| 40 | + @JsonProperty("opphørFom") @JsonAlias("opphoerFom") LocalDate opphørFom, |
| 41 | + @JsonProperty("gradering") Integer gradering, |
| 42 | + @JsonProperty("opprinneligIdentdato") LocalDate opprinneligIdentdato, |
| 43 | + @JsonProperty("registrert") LocalDate registrert, |
| 44 | + @JsonProperty("saksbehandlerId") String saksbehandlerId, |
| 45 | + @JsonProperty("vedtak") List<Vedtak> vedtak) { |
| 46 | + this.status = status; |
| 47 | + this.tema = tema; |
| 48 | + this.dekningsgrad = dekningsgrad; |
| 49 | + this.fødselsdatoBarn = fødselsdatoBarn; |
| 50 | + this.kategori = kategori; |
| 51 | + this.arbeidsforhold = arbeidsforhold; |
| 52 | + this.periode = periode; |
| 53 | + this.behandlingsTema = behandlingsTema; |
| 54 | + this.identdato = identdato; |
| 55 | + this.iverksatt = iverksatt; |
| 56 | + this.opphørFom = opphørFom; |
| 57 | + this.gradering = gradering; |
| 58 | + this.opprinneligIdentdato = opprinneligIdentdato; |
| 59 | + this.registrert = registrert; |
| 60 | + this.saksbehandlerId = saksbehandlerId; |
| 61 | + this.vedtak = vedtak; |
| 62 | + } |
| 63 | + |
| 64 | + public Status getStatus() { |
| 65 | + return status; |
| 66 | + } |
| 67 | + |
| 68 | + public Tema getTema() { |
| 69 | + return tema; |
| 70 | + } |
| 71 | + |
| 72 | + public Prosent getDekningsgrad() { |
| 73 | + return dekningsgrad; |
| 74 | + } |
| 75 | + |
| 76 | + public LocalDate getFødselsdatoBarn() { |
| 77 | + return fødselsdatoBarn; |
| 78 | + } |
| 79 | + |
| 80 | + public Arbeidskategori getKategori() { |
| 81 | + return kategori; |
| 82 | + } |
| 83 | + |
| 84 | + public List<Arbeidsforhold> getArbeidsforhold() { |
| 85 | + return arbeidsforhold; |
| 86 | + } |
| 87 | + |
| 88 | + public Periode getPeriode() { |
| 89 | + return periode; |
| 90 | + } |
| 91 | + |
| 92 | + public Behandlingstema getBehandlingsTema() { |
| 93 | + return behandlingsTema; |
| 94 | + } |
| 95 | + |
| 96 | + public LocalDate getIdentdato() { |
| 97 | + return identdato; |
| 98 | + } |
| 99 | + |
| 100 | + public LocalDate getIverksatt() { |
| 101 | + return iverksatt; |
| 102 | + } |
| 103 | + |
| 104 | + public LocalDate getOpphørFom() { |
| 105 | + return opphørFom; |
| 106 | + } |
| 107 | + |
| 108 | + public Integer getGradering() { |
| 109 | + return gradering; |
| 110 | + } |
| 111 | + |
| 112 | + public LocalDate getOpprinneligIdentdato() { |
| 113 | + return opprinneligIdentdato; |
| 114 | + } |
| 115 | + |
| 116 | + public LocalDate getRegistrert() { |
| 117 | + return registrert; |
| 118 | + } |
| 119 | + |
| 120 | + public String getSaksbehandlerId() { |
| 121 | + return saksbehandlerId; |
| 122 | + } |
| 123 | + |
| 124 | + public List<Vedtak> getVedtak() { |
| 125 | + return vedtak; |
| 126 | + } |
| 127 | + |
| 128 | + @Override |
| 129 | + public int hashCode() { |
| 130 | + return Objects.hash(arbeidsforhold, behandlingsTema, dekningsgrad, fødselsdatoBarn, gradering, identdato, |
| 131 | + iverksatt, kategori, opphørFom, opprinneligIdentdato, periode, registrert, saksbehandlerId, status, |
| 132 | + tema, vedtak); |
| 133 | + |
| 134 | + } |
| 135 | + |
| 136 | + @Override |
| 137 | + public boolean equals(Object obj) { |
| 138 | + if (obj == null || !(obj instanceof Grunnlag)) { |
| 139 | + return false; |
| 140 | + } |
| 141 | + if (this == obj) { |
| 142 | + return true; |
| 143 | + } |
| 144 | + Grunnlag that = (Grunnlag) obj; |
| 145 | + return Objects.equals(that.arbeidsforhold, this.arbeidsforhold) && |
| 146 | + Objects.equals(that.behandlingsTema, this.behandlingsTema) && |
| 147 | + Objects.equals(that.dekningsgrad, this.dekningsgrad) && |
| 148 | + Objects.equals(that.fødselsdatoBarn, this.fødselsdatoBarn) && |
| 149 | + Objects.equals(that.gradering, this.gradering) && |
| 150 | + Objects.equals(that.iverksatt, this.iverksatt) && |
| 151 | + Objects.equals(that.kategori, this.kategori) && |
| 152 | + Objects.equals(that.opphørFom, this.opphørFom) && |
| 153 | + Objects.equals(that.opprinneligIdentdato, this.opprinneligIdentdato) && |
| 154 | + Objects.equals(that.periode, this.periode) && |
| 155 | + Objects.equals(that.registrert, this.registrert) && |
| 156 | + Objects.equals(that.saksbehandlerId, this.saksbehandlerId) && |
| 157 | + Objects.equals(that.status, this.status) && |
| 158 | + Objects.equals(that.tema, this.tema) && |
| 159 | + Objects.equals(that.vedtak, this.vedtak); |
| 160 | + } |
| 161 | + |
| 162 | + @Override |
| 163 | + public String toString() { |
| 164 | + return getClass().getSimpleName() + "[status=" + status + ", tema=" + tema + ", dekningsgrad=" + dekningsgrad |
| 165 | + + ", fødselsdatoBarn=" + fødselsdatoBarn + ", kategori=" + kategori + ", arbeidsforhold=" |
| 166 | + + arbeidsforhold + ", periode=" + periode + ", behandlingsTema=" + behandlingsTema + ", identdato=" |
| 167 | + + identdato + ", iverksatt=" + iverksatt + ", opphørFom=" + opphørFom + ", gradering=" + gradering |
| 168 | + + ", opprinneligIdentdato=" + opprinneligIdentdato + ", registrert=" + registrert + ", vedtak=" + vedtak + "]"; |
| 169 | + } |
26 | 170 | }
|
0 commit comments