Moved function into class
This commit is contained in:
@@ -148,9 +148,8 @@ class CollectionItemService(private val connection: Connection) {
|
|||||||
throw DbElementNotFoundException("Could not find collection item with id $id")
|
throw DbElementNotFoundException("Could not find collection item with id $id")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun createItemFromResult(resultSet: ResultSet): CollectionItem {
|
private fun createItemFromResult(resultSet: ResultSet): CollectionItem {
|
||||||
try {
|
try {
|
||||||
val id = resultSet.getLong("id")
|
val id = resultSet.getLong("id")
|
||||||
val title = resultSet.getString("title")
|
val title = resultSet.getString("title")
|
||||||
@@ -197,4 +196,5 @@ fun createItemFromResult(resultSet: ResultSet): CollectionItem {
|
|||||||
} catch (cause: NullPointerException) {
|
} catch (cause: NullPointerException) {
|
||||||
throw DbElementInsertionException("${cause.message}\nresultSet = ${resultSet.metaData}")
|
throw DbElementInsertionException("${cause.message}\nresultSet = ${resultSet.metaData}")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user