-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Legger til nytt felt ansettelsePeriode til Arbeidstaker (#169)
- Loading branch information
Showing
3 changed files
with
117 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
soknad/src/main/java/no/nav/k9/søknad/felles/opptjening/UtenlandskArbeidsforhold.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package no.nav.k9.søknad.felles.opptjening; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Pattern; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import no.nav.k9.søknad.felles.type.Landkode; | ||
import no.nav.k9.søknad.felles.type.Periode; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE) | ||
|
||
public class UtenlandskArbeidsforhold { | ||
|
||
@JsonProperty("ansettelsePeriode") | ||
@Valid | ||
@NotNull | ||
private Periode ansettelsePeriode; | ||
|
||
@JsonProperty(value = "land", required = true) | ||
@Valid | ||
@NotNull | ||
private Landkode land; | ||
|
||
@JsonProperty(value = "arbeidsgiversnavn") | ||
@Pattern(regexp = "^[\\p{Graph}\\p{Space}\\p{Sc}\\p{L}\\p{M}\\p{N}]+$", message = "'${validatedValue}' matcher ikke tillatt pattern '{regexp}'") | ||
private String arbeidsgiversnavn; | ||
|
||
|
||
@JsonCreator | ||
public UtenlandskArbeidsforhold(@JsonProperty(value = "ansettelsePeriode") @Valid @NotNull Periode ansettelsePeriode, | ||
@JsonProperty(value = "land") @Valid @NotNull Landkode land, | ||
@JsonProperty(value = "arbeidsgiversnavn") String arbeidsgiversnavn | ||
) { | ||
this.ansettelsePeriode = ansettelsePeriode; | ||
this.land = land; | ||
this.arbeidsgiversnavn = arbeidsgiversnavn; | ||
} | ||
|
||
public UtenlandskArbeidsforhold() { | ||
} | ||
|
||
public Periode getAnsettelsePeriode() { | ||
return ansettelsePeriode; | ||
} | ||
|
||
public void setAnsettelsePeriode(Periode ansettelsePeriode) { | ||
this.ansettelsePeriode = ansettelsePeriode; | ||
} | ||
|
||
public Landkode getLand() { | ||
return land; | ||
} | ||
|
||
public void setLand(Landkode land) { | ||
this.land = land; | ||
} | ||
|
||
public String getArbeidsgiversnavn() { | ||
return arbeidsgiversnavn; | ||
} | ||
|
||
public void setArbeidsgiversnavn(String arbeidsgiversnavn) { | ||
this.arbeidsgiversnavn = arbeidsgiversnavn; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters