Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad committed Oct 24, 2024
1 parent e5719f0 commit cc6c57c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ enum class HistorikkType {
UNNTAK,
IKKE_AKTUELL,
LUKKET,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import java.util.*

class IkkeAktuellRepository(private val database: DatabaseInterface) {

fun getIkkeAktuellListForPerson(personIdent: PersonIdentNumber): List<PIkkeAktuell> =
database.connection.use { connection ->
connection.prepareStatement(GET_IKKE_AKTUELL_FOR_PERSON).use {
it.setString(1, personIdent.value)
it.executeQuery().toList { toPIkkeAktuell() }
}
fun getIkkeAktuellListForPerson(personIdent: PersonIdentNumber): List<PIkkeAktuell> =
database.connection.use { connection ->
connection.prepareStatement(GET_IKKE_AKTUELL_FOR_PERSON).use {
it.setString(1, personIdent.value)
it.executeQuery().toList { toPIkkeAktuell() }
}
}

companion object {
private const val GET_IKKE_AKTUELL_FOR_PERSON =
"""
companion object {
private const val GET_IKKE_AKTUELL_FOR_PERSON =
"""
SELECT *
FROM IKKE_AKTUELL
WHERE personident = ?
"""
}
}
}

fun ResultSet.toPIkkeAktuell() = PIkkeAktuell(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ fun List<PIkkeAktuell>.toIkkeAktuellList() = this.map {
arsak = IkkeAktuellArsak.valueOf(it.arsak),
beskrivelse = it.beskrivelse,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ class DialogmotekandidatHistorikkApiSpek : Spek({
}
}
}
})
})

0 comments on commit cc6c57c

Please sign in to comment.