![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.com.harmony.kotlin.data.repository.VoidRepositories.kt Maven / Gradle / Ivy
package com.harmony.kotlin.data.repository
import com.harmony.kotlin.data.operation.Operation
import com.harmony.kotlin.data.query.Query
import com.harmony.kotlin.error.notSupportedOperation
class VoidRepository : GetRepository, PutRepository, DeleteRepository {
override suspend fun get(query: Query, operation: Operation): V = notSupportedOperation()
@Deprecated("Use get instead")
override suspend fun getAll(query: Query, operation: Operation): List = notSupportedOperation()
override suspend fun put(query: Query, value: V?, operation: Operation): V = notSupportedOperation()
@Deprecated("Use put instead")
override suspend fun putAll(query: Query, value: List?, operation: Operation): List = notSupportedOperation()
override suspend fun delete(query: Query, operation: Operation) = notSupportedOperation()
}
class VoidGetRepository : GetRepository {
override suspend fun get(query: Query, operation: Operation): V = notSupportedOperation()
@Deprecated("Use get instead")
override suspend fun getAll(query: Query, operation: Operation): List = notSupportedOperation()
}
class VoidPutRepository : PutRepository {
override suspend fun put(query: Query, value: V?, operation: Operation): V = notSupportedOperation()
@Deprecated("Use put instead")
override suspend fun putAll(query: Query, value: List?, operation: Operation): List = notSupportedOperation()
}
class VoidDeleteRepository : DeleteRepository {
override suspend fun delete(query: Query, operation: Operation) = notSupportedOperation()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy