diff --git a/db/src/main/java/com/readrops/db/dao/BaseDao.java b/db/src/main/java/com/readrops/db/dao/BaseDao.java deleted file mode 100644 index 3eebfe1c..00000000 --- a/db/src/main/java/com/readrops/db/dao/BaseDao.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.readrops.db.dao; - -import androidx.room.Delete; -import androidx.room.Insert; -import androidx.room.Update; - -import java.util.List; - -import io.reactivex.Completable; -import io.reactivex.Single; - -public interface BaseDao { - - @Insert - Single insert(T entity); - - // only here for compatibility with LocalFeedRepository - // which hasn't been written with rxjava usage in mind - @Insert - long compatInsert(T entity); - - @Insert - List insert(List entities); - - @Update - Completable update(T entity); - - @Update - Completable update(List entities); - - @Delete - Completable delete(T entity); - - @Delete - Completable delete(List entities); -} diff --git a/db/src/main/java/com/readrops/db/dao/BaseDao.kt b/db/src/main/java/com/readrops/db/dao/BaseDao.kt new file mode 100644 index 00000000..e070c04f --- /dev/null +++ b/db/src/main/java/com/readrops/db/dao/BaseDao.kt @@ -0,0 +1,33 @@ +package com.readrops.db.dao + +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.Update +import io.reactivex.Completable +import io.reactivex.Single + +interface BaseDao { + + @Insert + fun insert(entity: T): Single + + // only here for compatibility with LocalFeedRepository + // which hasn't been written with rxjava usage in mind + @Insert + fun compatInsert(entity: T): Long + + @Insert + fun insert(entities: List?): List + + @Update + fun update(entity: T): Completable + + @Update + fun update(entities: List?): Completable + + @Delete + fun delete(entity: T): Completable + + @Delete + fun delete(entities: List?): Completable +} \ No newline at end of file