-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Enums in skattekortservice DTOs
#deploy-skattekort-service Enums in skattekortservice data transfer objects have been refactored using Lombok library. Added @Getter and @requiredargsconstructor annotations to simplify the code and enhance readability. The inbuilt Lombok functionalities are now eliminating the need for manually defining constructors and getter methods for the value field.
- Loading branch information
Showing
4 changed files
with
25 additions
and
32 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
15 changes: 7 additions & 8 deletions
15
...ansfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/Tabelltype.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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
package no.nav.testnav.libs.dto.skattekortservice.v1; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum Tabelltype { | ||
|
||
TREKKTABELL_FOR_PENSJON("trekktabellForPensjon"), | ||
TREKKTABELL_FOR_LOENN("trekktabellForLoenn"); | ||
private final String value; | ||
|
||
Tabelltype(String v) { | ||
value = v; | ||
} | ||
|
||
public String value() { | ||
return value; | ||
} | ||
private final String value; | ||
} |
14 changes: 6 additions & 8 deletions
14
...bjects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/Tilleggsopplysning.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 |
---|---|---|
@@ -1,18 +1,16 @@ | ||
package no.nav.testnav.libs.dto.skattekortservice.v1; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum Tilleggsopplysning { | ||
|
||
OPPHOLD_PAA_SVALBARD("oppholdPaaSvalbard"), | ||
KILDESKATTPENSJONIST("kildeskattpensjonist"), | ||
OPPHOLD_I_TILTAKSSONE("oppholdITiltakssone"), | ||
KILDESKATT_PAA_LOENN("kildeskattPaaLoenn"); | ||
private final String value; | ||
|
||
Tilleggsopplysning(String v) { | ||
value = v; | ||
} | ||
|
||
public String value() { | ||
return value; | ||
} | ||
private final String value; | ||
} |
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