From cb8d411923518d2c686c1e21cc8c6e3cd5a8c858 Mon Sep 17 00:00:00 2001 From: Kaja Kvinge Akselsen Date: Mon, 6 Nov 2023 16:04:45 +0100 Subject: [PATCH] Delete unused method --- .../kotlin/no/nav/syfo/db/UtsendtVarselDAO.kt | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/src/main/kotlin/no/nav/syfo/db/UtsendtVarselDAO.kt b/src/main/kotlin/no/nav/syfo/db/UtsendtVarselDAO.kt index cd6a6c77b..f9e2b23b2 100644 --- a/src/main/kotlin/no/nav/syfo/db/UtsendtVarselDAO.kt +++ b/src/main/kotlin/no/nav/syfo/db/UtsendtVarselDAO.kt @@ -1,40 +1,11 @@ package no.nav.syfo.db -import no.nav.syfo.db.domain.PPlanlagtVarsel import no.nav.syfo.db.domain.PUtsendtVarsel import no.nav.syfo.domain.PersonIdent import java.sql.Timestamp import java.time.LocalDateTime import java.util.* -fun DatabaseInterface.storeUtsendtVarsel(planlagtVarsel: PPlanlagtVarsel) { - val insertStatement = """INSERT INTO UTSENDT_VARSEL ( - uuid, - fnr, - aktor_id, - type, - utsendt_tidspunkt, - planlagt_varsel_id) VALUES (?, ?, ?, ?, ?, ?) - """.trimIndent() - - val now = Timestamp.valueOf(LocalDateTime.now()) - val varselUUID = UUID.randomUUID() - - connection.use { connection -> - connection.prepareStatement(insertStatement).use { - it.setObject(1, varselUUID) - it.setString(2, planlagtVarsel.fnr) - it.setString(3, planlagtVarsel.aktorId) - it.setString(4, planlagtVarsel.type) - it.setTimestamp(5, now) - it.setObject(6, UUID.fromString(planlagtVarsel.uuid)) - it.executeUpdate() - } - - connection.commit() - } -} - fun DatabaseInterface.storeUtsendtVarsel(PUtsendtVarsel: PUtsendtVarsel) { val insertStatement = """INSERT INTO UTSENDT_VARSEL ( uuid,