Add newlines
This commit is contained in:
parent
e258f750b3
commit
0ccfa03486
|
|
@ -3,14 +3,17 @@ package ru.touchinstinct.utils
|
|||
import org.springframework.data.repository.CrudRepository
|
||||
|
||||
fun <T : Any, ID> CrudRepository<T, ID>.update(entity: T, updater: T.() -> Unit): T {
|
||||
|
||||
return save(entity.apply(updater))
|
||||
}
|
||||
|
||||
fun <T : Any, ID> CrudRepository<T, ID>.upsert(entity: T, updater: (T) -> Unit): T {
|
||||
|
||||
return save(entity.apply(updater))
|
||||
}
|
||||
|
||||
fun <T : Any, ID> T.upsertInto(repository: CrudRepository<T, ID>, updater: (T) -> Unit): T {
|
||||
|
||||
return repository.save(also(updater))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ fun Source.stringify(): String {
|
|||
fun NodeList.get(localName: String): Node? {
|
||||
for (i in 0 until length) {
|
||||
if (item(i).localName == localName) {
|
||||
|
||||
return item(i)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue