Renamed database classes to table classes.

Because they're not databases. They're tables.
This commit is contained in:
Greyson Parrelli
2022-11-29 10:47:12 -05:00
committed by Cody Henthorne
parent b190f9495a
commit 7949996c5c
382 changed files with 3420 additions and 3464 deletions

View File

@@ -6,10 +6,10 @@ import android.database.Cursor;
import androidx.annotation.NonNull;
import org.signal.core.util.concurrent.SignalExecutors;
import org.thoughtcrime.securesms.database.AttachmentDatabase;
import org.thoughtcrime.securesms.database.AttachmentTable;
import org.thoughtcrime.securesms.database.SignalDatabase;
import org.thoughtcrime.securesms.database.StickerDatabase;
import org.thoughtcrime.securesms.database.StickerDatabase.StickerPackRecordReader;
import org.thoughtcrime.securesms.database.StickerTable;
import org.thoughtcrime.securesms.database.StickerTable.StickerPackRecordReader;
import org.thoughtcrime.securesms.database.model.StickerPackRecord;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.jobmanager.JobManager;
@@ -22,9 +22,9 @@ import java.util.List;
final class StickerManagementRepository {
private final Context context;
private final StickerDatabase stickerDatabase;
private final AttachmentDatabase attachmentDatabase;
private final Context context;
private final StickerTable stickerDatabase;
private final AttachmentTable attachmentDatabase;
StickerManagementRepository(@NonNull Context context) {
this.context = context.getApplicationContext();
@@ -42,8 +42,8 @@ final class StickerManagementRepository {
try (Cursor cursor = attachmentDatabase.getUnavailableStickerPacks()) {
while (cursor != null && cursor.moveToNext()) {
String packId = cursor.getString(cursor.getColumnIndexOrThrow(AttachmentDatabase.STICKER_PACK_ID));
String packKey = cursor.getString(cursor.getColumnIndexOrThrow(AttachmentDatabase.STICKER_PACK_KEY));
String packId = cursor.getString(cursor.getColumnIndexOrThrow(AttachmentTable.STICKER_PACK_ID));
String packKey = cursor.getString(cursor.getColumnIndexOrThrow(AttachmentTable.STICKER_PACK_KEY));
jobManager.add(StickerPackDownloadJob.forReference(packId, packKey));
}

View File

@@ -12,7 +12,7 @@ import org.signal.core.util.concurrent.SignalExecutors;
import org.signal.core.util.logging.Log;
import org.signal.libsignal.protocol.InvalidMessageException;
import org.thoughtcrime.securesms.database.SignalDatabase;
import org.thoughtcrime.securesms.database.StickerDatabase;
import org.thoughtcrime.securesms.database.StickerTable;
import org.thoughtcrime.securesms.database.model.StickerPackRecord;
import org.thoughtcrime.securesms.database.model.StickerRecord;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
@@ -29,7 +29,7 @@ public final class StickerPackPreviewRepository {
private static final String TAG = Log.tag(StickerPackPreviewRepository.class);
private final StickerDatabase stickerDatabase;
private final StickerTable stickerDatabase;
private final SignalServiceMessageReceiver receiver;
public StickerPackPreviewRepository(@NonNull Context context) {
@@ -103,7 +103,7 @@ public final class StickerPackPreviewRepository {
List<StickerManifest.Sticker> stickers = new ArrayList<>();
try (Cursor cursor = stickerDatabase.getStickersForPack(packId)) {
StickerDatabase.StickerRecordReader reader = new StickerDatabase.StickerRecordReader(cursor);
StickerTable.StickerRecordReader reader = new StickerTable.StickerRecordReader(cursor);
StickerRecord record;
while ((record = reader.getNext()) != null) {

View File

@@ -7,10 +7,10 @@ import androidx.annotation.NonNull;
import org.signal.core.util.concurrent.SignalExecutors;
import org.thoughtcrime.securesms.components.emoji.EmojiUtil;
import org.thoughtcrime.securesms.database.AttachmentDatabase;
import org.thoughtcrime.securesms.database.AttachmentTable;
import org.thoughtcrime.securesms.database.SignalDatabase;
import org.thoughtcrime.securesms.database.StickerDatabase;
import org.thoughtcrime.securesms.database.StickerDatabase.StickerRecordReader;
import org.thoughtcrime.securesms.database.StickerTable;
import org.thoughtcrime.securesms.database.StickerTable.StickerRecordReader;
import org.thoughtcrime.securesms.database.model.StickerRecord;
import java.util.ArrayList;
@@ -19,8 +19,8 @@ import java.util.Set;
public final class StickerSearchRepository {
private final StickerDatabase stickerDatabase;
private final AttachmentDatabase attachmentDatabase;
private final StickerTable stickerDatabase;
private final AttachmentTable attachmentDatabase;
public StickerSearchRepository(@NonNull Context context) {
this.stickerDatabase = SignalDatabase.stickers();