19 lines
474 B
Kotlin
19 lines
474 B
Kotlin
package net.cismon.urlshortener.dao
|
|
|
|
import net.cismon.urlshortener.model.UrlModel
|
|
import org.springframework.data.repository.CrudRepository
|
|
import org.springframework.transaction.annotation.Transactional
|
|
|
|
@Transactional
|
|
interface UrlDao : CrudRepository<UrlModel, Long> {
|
|
|
|
fun findById(id: Long): UrlModel?
|
|
|
|
fun findByUid(uid: Long) : List<UrlModel>
|
|
|
|
fun findByUuid(uuid: String): UrlModel?
|
|
|
|
fun deleteById(id: Long)
|
|
|
|
fun save(url: UrlModel): UrlModel
|
|
} |