-
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.
Merge branch 'feature/PEK-648_cti-to-enum' into sandbox
- Loading branch information
Showing
13 changed files
with
223 additions
and
452 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
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
36 changes: 6 additions & 30 deletions
36
...kotlin/no/nav/pensjon/simulator/core/domain/regler/beregning2011/FremskrivingsDetaljer.kt
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,38 +1,14 @@ | ||
package no.nav.pensjon.simulator.core.domain.regler.beregning2011 | ||
|
||
import java.io.Serializable | ||
import java.util.* | ||
|
||
class FremskrivingsDetaljer : Serializable, IFremskriving { | ||
// 2025-03-11 | ||
class FremskrivingsDetaljer : IFremskriving { | ||
override var justeringTomDato: Date? = null | ||
override var justeringsfaktor: Double = 0.0 | ||
override var teller: Double = 0.0 | ||
override var nevner: Double = 0.0 | ||
var arskull: Int = 0 | ||
override var justeringsfaktor = 0.0 | ||
override var teller = 0.0 | ||
override var nevner = 0.0 | ||
var arskull = 0 | ||
|
||
constructor() | ||
|
||
constructor(frem: FremskrivingsDetaljer) : this() { | ||
if (frem.justeringTomDato != null) { | ||
justeringTomDato = frem.justeringTomDato!!.clone() as Date | ||
} | ||
justeringsfaktor = frem.justeringsfaktor | ||
teller = frem.teller | ||
nevner = frem.nevner | ||
arskull = frem.arskull | ||
} | ||
|
||
constructor( | ||
justeringTomDato: Date? = null, | ||
justeringsfaktor: Double = 0.0, | ||
teller: Double = 0.0, | ||
nevner: Double = 0.0, | ||
arskull: Int = 0 | ||
) { | ||
this.justeringTomDato = justeringTomDato | ||
this.justeringsfaktor = justeringsfaktor | ||
this.teller = teller | ||
this.nevner = nevner | ||
this.arskull = arskull | ||
} | ||
} |
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
28 changes: 1 addition & 27 deletions
28
...kotlin/no/nav/pensjon/simulator/core/domain/regler/beregning2011/JusteringsInformasjon.kt
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,38 +1,12 @@ | ||
package no.nav.pensjon.simulator.core.domain.regler.beregning2011 | ||
|
||
import no.nav.pensjon.simulator.core.domain.regler.enum.JusteringsTypeEnum | ||
import java.io.Serializable | ||
import java.lang.reflect.InvocationTargetException | ||
|
||
// 2025-03-10 | ||
class JusteringsInformasjon : Serializable { | ||
class JusteringsInformasjon { | ||
var totalJusteringsfaktor: Double = 0.0 | ||
var justeringsTypeEnum: JusteringsTypeEnum? = null | ||
var elementer: MutableList<IJustering> = mutableListOf() | ||
|
||
constructor() | ||
|
||
constructor(source: JusteringsInformasjon) : this() { | ||
totalJusteringsfaktor = source.totalJusteringsfaktor | ||
justeringsTypeEnum = source.justeringsTypeEnum | ||
|
||
for (element in source.elementer) { | ||
val clazz = element.javaClass | ||
try { | ||
val constructor = clazz.getConstructor(clazz) | ||
elementer.add(constructor.newInstance(element) as IJustering) | ||
} catch (e: InvocationTargetException) { | ||
//Vil kastes hvis copy constructor f.eks. ledet til nullpointerexception. | ||
val cause = e.cause | ||
if (cause is RuntimeException) { | ||
throw cause | ||
} else { | ||
throw RuntimeException(e) | ||
} | ||
} catch (e: Exception) { | ||
//Vil kastes hvis f.eks. copy constructor ikke finnes for komponenten. | ||
throw RuntimeException(e) | ||
} | ||
} | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
...n/no/nav/pensjon/simulator/core/domain/regler/beregning2011/JustertGarantipensjonsniva.kt
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
37 changes: 9 additions & 28 deletions
37
...in/no/nav/pensjon/simulator/core/domain/regler/beregning2011/JustertMinstePensjonsniva.kt
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,37 +1,18 @@ | ||
package no.nav.pensjon.simulator.core.domain.regler.beregning2011 | ||
|
||
import java.io.Serializable | ||
import no.nav.pensjon.simulator.core.domain.reglerextend.beregning2011.copy | ||
|
||
class JustertMinstePensjonsniva : Serializable { | ||
// 2025-03-11 | ||
class JustertMinstePensjonsniva { | ||
var minstePensjonsniva: MinstePensjonsniva? = null | ||
var justeringsInformasjon: JusteringsInformasjon? = null | ||
var belop: Double = 0.0 | ||
var belop = 0.0 | ||
|
||
constructor() : super() {} | ||
constructor() | ||
|
||
constructor(fmpn: JustertMinstePensjonsniva) : super() { | ||
belop = fmpn.belop | ||
if (fmpn.minstePensjonsniva != null) { | ||
minstePensjonsniva = MinstePensjonsniva(fmpn.minstePensjonsniva!!) | ||
} | ||
if (fmpn.justeringsInformasjon != null) { | ||
justeringsInformasjon = JusteringsInformasjon(fmpn.justeringsInformasjon!!) | ||
} | ||
} | ||
|
||
constructor(mpn: MinstePensjonsniva?) { | ||
if (mpn != null) { | ||
minstePensjonsniva = MinstePensjonsniva(mpn) | ||
} | ||
} | ||
|
||
constructor( | ||
minstePensjonsniva: MinstePensjonsniva? = null, | ||
justeringsInformasjon: JusteringsInformasjon? = null, | ||
belop: Double = 0.0 | ||
) { | ||
this.minstePensjonsniva = minstePensjonsniva | ||
this.justeringsInformasjon = justeringsInformasjon | ||
this.belop = belop | ||
constructor(source: JustertMinstePensjonsniva) : super() { | ||
belop = source.belop | ||
minstePensjonsniva = source.minstePensjonsniva?.let(::MinstePensjonsniva) | ||
justeringsInformasjon = source.justeringsInformasjon?.copy() | ||
} | ||
} |
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
Oops, something went wrong.