Rename ArbitraryStorageNgEntity to ArbitraryStorageEntity

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-06-24 09:43:01 +02:00
parent 84c1874284
commit a207ad7b97
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
5 changed files with 12 additions and 12 deletions

View file

@ -33,7 +33,7 @@ import com.nextcloud.talk.data.source.local.converters.HashMapHashMapConverter
import com.nextcloud.talk.data.source.local.converters.PushConfigurationConverter
import com.nextcloud.talk.data.source.local.converters.SignalingSettingsConverter
import com.nextcloud.talk.data.storage.ArbitraryStoragesDao
import com.nextcloud.talk.data.storage.model.ArbitraryStorageNgEntity
import com.nextcloud.talk.data.storage.model.ArbitraryStorageEntity
import com.nextcloud.talk.data.user.UsersDao
import com.nextcloud.talk.data.user.model.UserEntity
import net.sqlcipher.database.SQLiteDatabase
@ -41,7 +41,7 @@ import net.sqlcipher.database.SupportFactory
import java.util.Locale
@Database(
entities = [UserEntity::class, ArbitraryStorageNgEntity::class],
entities = [UserEntity::class, ArbitraryStorageEntity::class],
version = 8,
exportSchema = true
)

View file

@ -24,7 +24,7 @@ import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.nextcloud.talk.data.storage.model.ArbitraryStorageNgEntity
import com.nextcloud.talk.data.storage.model.ArbitraryStorageEntity
@Dao
abstract class ArbitraryStoragesDao {
@ -34,11 +34,11 @@ abstract class ArbitraryStoragesDao {
"\"key\" = :key AND " +
"object = :objectString"
)
abstract fun getStorageSetting(accountIdentifier: Long, key: String, objectString: String): ArbitraryStorageNgEntity
abstract fun getStorageSetting(accountIdentifier: Long, key: String, objectString: String): ArbitraryStorageEntity
@Query("DELETE FROM ArbitraryStorage WHERE accountIdentifier = :accountIdentifier")
abstract suspend fun deleteArbitraryStorage(accountIdentifier: Long)
@Insert(onConflict = OnConflictStrategy.REPLACE)
abstract fun saveArbitraryStorage(arbitraryStorage: ArbitraryStorageNgEntity): Long
abstract fun saveArbitraryStorage(arbitraryStorage: ArbitraryStorageEntity): Long
}

View file

@ -20,10 +20,10 @@
package com.nextcloud.talk.data.storage
import com.nextcloud.talk.data.storage.model.ArbitraryStorageNgEntity
import com.nextcloud.talk.data.storage.model.ArbitraryStorageEntity
interface ArbitraryStoragesRepository {
fun getStorageSetting(accountIdentifier: Long, key: String, objectString: String): ArbitraryStorageNgEntity
fun getStorageSetting(accountIdentifier: Long, key: String, objectString: String): ArbitraryStorageEntity
suspend fun deleteArbitraryStorage(accountIdentifier: Long)
fun saveArbitraryStorage(arbitraryStorage: ArbitraryStorageNgEntity): Long
fun saveArbitraryStorage(arbitraryStorage: ArbitraryStorageEntity): Long
}

View file

@ -20,7 +20,7 @@
package com.nextcloud.talk.data.storage
import com.nextcloud.talk.data.storage.model.ArbitraryStorageNgEntity
import com.nextcloud.talk.data.storage.model.ArbitraryStorageEntity
class ArbitraryStoragesRepositoryImpl(private val arbitraryStoragesDao: ArbitraryStoragesDao) :
ArbitraryStoragesRepository {
@ -28,7 +28,7 @@ class ArbitraryStoragesRepositoryImpl(private val arbitraryStoragesDao: Arbitrar
accountIdentifier: Long,
key: String,
objectString: String
): ArbitraryStorageNgEntity {
): ArbitraryStorageEntity {
return arbitraryStoragesDao.getStorageSetting(accountIdentifier, key, objectString)
}
@ -36,7 +36,7 @@ class ArbitraryStoragesRepositoryImpl(private val arbitraryStoragesDao: Arbitrar
arbitraryStoragesDao.deleteArbitraryStorage(accountIdentifier)
}
override fun saveArbitraryStorage(arbitraryStorage: ArbitraryStorageNgEntity): Long {
override fun saveArbitraryStorage(arbitraryStorage: ArbitraryStorageEntity): Long {
return arbitraryStoragesDao.saveArbitraryStorage(arbitraryStorage)
}
}

View file

@ -28,7 +28,7 @@ import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "ArbitraryStorage")
data class ArbitraryStorageNgEntity(
data class ArbitraryStorageEntity(
@PrimaryKey @ColumnInfo(name = "accountIdentifier") var accountIdentifier: Long = 0,
@ColumnInfo(name = "key") var key: String? = null,
@ColumnInfo(name = "object") var storageObject: String? = null,