-
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 info om UkjentArbeidsforhold i DataBruktTilUtledning. (#361)
- Loading branch information
Showing
6 changed files
with
153 additions
and
11 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
soknad/src/main/java/no/nav/k9/søknad/ytelse/psb/v1/ArbeiderIPeriodenSvar.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,7 @@ | ||
package no.nav.k9.søknad.ytelse.psb.v1; | ||
|
||
public enum ArbeiderIPeriodenSvar { | ||
SOM_VANLIG, | ||
REDUSERT, | ||
HELT_FRAVÆR | ||
} |
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
34 changes: 34 additions & 0 deletions
34
soknad/src/main/java/no/nav/k9/søknad/ytelse/psb/v1/NormalArbeidstid.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,34 @@ | ||
package no.nav.k9.søknad.ytelse.psb.v1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import org.hibernate.validator.constraints.time.DurationMax; | ||
import org.hibernate.validator.constraints.time.DurationMin; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import java.time.Duration; | ||
|
||
public class NormalArbeidstid { | ||
@JsonProperty(value = "timerPerUke", required = true) | ||
@DurationMin(hours = 0, minutes = 1, message = "[ugyldigVerdi] Må være større enn 0.") | ||
@DurationMax(hours = 40, message = "[ugyldigVerdi] Må være lavere eller lik 40 timer.") | ||
@NotNull | ||
@Valid | ||
private Duration timerPerUke; | ||
|
||
public NormalArbeidstid(@JsonProperty(value = "timerPerUke", required = true) @Valid Duration timerPerUke) { | ||
this.timerPerUke = timerPerUke; | ||
} | ||
|
||
public NormalArbeidstid() { | ||
} | ||
|
||
public Duration getTimerPerUke() { | ||
return timerPerUke; | ||
} | ||
|
||
public NormalArbeidstid medTimerPerUke(Duration timerPerUke) { | ||
this.timerPerUke = timerPerUke; | ||
return this; | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
soknad/src/main/java/no/nav/k9/søknad/ytelse/psb/v1/UkjentArbeidsforhold.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,75 @@ | ||
package no.nav.k9.søknad.ytelse.psb.v1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import no.nav.k9.søknad.felles.type.Organisasjonsnummer; | ||
|
||
import javax.validation.Valid; | ||
|
||
public class UkjentArbeidsforhold { | ||
@JsonProperty(value = "organisasjonsnummer", required = true) | ||
@Valid | ||
private Organisasjonsnummer organisasjonsnummer; | ||
|
||
@JsonProperty(value = "erAnsatt", required = true) | ||
@Valid | ||
private Boolean erAnsatt; | ||
|
||
@JsonProperty(value = "normalarbeidstid") | ||
@Valid | ||
private NormalArbeidstid normalarbeidstid; | ||
|
||
@JsonProperty(value = "arbeiderIPerioden") | ||
@Valid | ||
private ArbeiderIPeriodenSvar arbeiderIPerioden; | ||
|
||
public UkjentArbeidsforhold( | ||
@JsonProperty(value = "organisasjonsnummer", required = true) @Valid Organisasjonsnummer organisasjonsnummer, | ||
@JsonProperty(value = "erAnsatt", required = true) @Valid Boolean erAnsatt, | ||
@JsonProperty(value = "normalarbeidstid") @Valid NormalArbeidstid normalarbeidstid, | ||
@JsonProperty(value = "arbeiderIPerioden") @Valid ArbeiderIPeriodenSvar arbeiderIPerioden | ||
) { | ||
this.organisasjonsnummer = organisasjonsnummer; | ||
this.erAnsatt = erAnsatt; | ||
this.normalarbeidstid = normalarbeidstid; | ||
this.arbeiderIPerioden = arbeiderIPerioden; | ||
} | ||
|
||
public UkjentArbeidsforhold() { | ||
} | ||
|
||
public Organisasjonsnummer getOrganisasjonsnummer() { | ||
return organisasjonsnummer; | ||
} | ||
|
||
public UkjentArbeidsforhold medOrganisasjonsnummer(Organisasjonsnummer organisasjonsnummer) { | ||
this.organisasjonsnummer = organisasjonsnummer; | ||
return this; | ||
} | ||
|
||
public boolean isErAnsatt() { | ||
return erAnsatt; | ||
} | ||
|
||
public UkjentArbeidsforhold medErAnsatt(Boolean erAnsatt) { | ||
this.erAnsatt = erAnsatt; | ||
return this; | ||
} | ||
|
||
public NormalArbeidstid getNormalarbeidstid() { | ||
return normalarbeidstid; | ||
} | ||
|
||
public UkjentArbeidsforhold medNormalarbeidstid(NormalArbeidstid normalarbeidstid) { | ||
this.normalarbeidstid = normalarbeidstid; | ||
return this; | ||
} | ||
|
||
public ArbeiderIPeriodenSvar getArbeiderIPerioden() { | ||
return arbeiderIPerioden; | ||
} | ||
|
||
public UkjentArbeidsforhold medArbeiderIPerioden(ArbeiderIPeriodenSvar arbeiderIPerioden) { | ||
this.arbeiderIPerioden = arbeiderIPerioden; | ||
return this; | ||
} | ||
} |
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
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