From a207ad7b9793b2c186b399d162f396353cef7c27 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Fri, 24 Jun 2022 09:43:01 +0200 Subject: [PATCH] Rename ArbitraryStorageNgEntity to ArbitraryStorageEntity Signed-off-by: Andy Scherzinger --- .../com/nextcloud/talk/data/source/local/TalkDatabase.kt | 4 ++-- .../com/nextcloud/talk/data/storage/ArbitraryStoragesDao.kt | 6 +++--- .../talk/data/storage/ArbitraryStoragesRepository.kt | 6 +++--- .../talk/data/storage/ArbitraryStoragesRepositoryImpl.kt | 6 +++--- ...rbitraryStorageNgEntity.kt => ArbitraryStorageEntity.kt} | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) rename app/src/main/java/com/nextcloud/talk/data/storage/model/{ArbitraryStorageNgEntity.kt => ArbitraryStorageEntity.kt} (97%) diff --git a/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt b/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt index 284387093..bc422c7fa 100644 --- a/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt +++ b/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt @@ -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 ) diff --git a/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesDao.kt b/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesDao.kt index 4508bc3da..ae55b36ed 100644 --- a/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesDao.kt +++ b/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesDao.kt @@ -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 } diff --git a/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepository.kt b/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepository.kt index 6244cd112..2e7affb96 100644 --- a/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepository.kt +++ b/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepository.kt @@ -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 } diff --git a/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepositoryImpl.kt b/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepositoryImpl.kt index 48355144c..9ceb92afd 100644 --- a/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepositoryImpl.kt +++ b/app/src/main/java/com/nextcloud/talk/data/storage/ArbitraryStoragesRepositoryImpl.kt @@ -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) } } diff --git a/app/src/main/java/com/nextcloud/talk/data/storage/model/ArbitraryStorageNgEntity.kt b/app/src/main/java/com/nextcloud/talk/data/storage/model/ArbitraryStorageEntity.kt similarity index 97% rename from app/src/main/java/com/nextcloud/talk/data/storage/model/ArbitraryStorageNgEntity.kt rename to app/src/main/java/com/nextcloud/talk/data/storage/model/ArbitraryStorageEntity.kt index d7dea1161..a76d3e684 100644 --- a/app/src/main/java/com/nextcloud/talk/data/storage/model/ArbitraryStorageNgEntity.kt +++ b/app/src/main/java/com/nextcloud/talk/data/storage/model/ArbitraryStorageEntity.kt @@ -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,