Stay organized with collections Save and categorize content based on your preferences.

SupportSQLiteOpenHelper.Configuration

public final class SupportSQLiteOpenHelper.Configuration


The configuration to create an SQLite open helper object using Factory.

Summary

Public fields

final boolean

If true the database will be delete and its data loss in the case that it cannot be opened.

final @NonNull SupportSQLiteOpenHelper.Callback

The callback class to handle creation, upgrade and downgrade.

final @NonNull Context

Context to use to open or create the database.

final String

Name of the database file, or null for an in-memory database.

final boolean

If true the database will be stored in the no-backup directory.

Public constructors

Configuration(
    @NonNull Context context,
    String name,
    @NonNull SupportSQLiteOpenHelper.Callback callback,
    boolean useNoBackupDirectory,
    boolean allowDataLossOnRecovery
)

Public methods

static final @NonNull SupportSQLiteOpenHelper.Configuration.Builder

Creates a new Configuration.Builder to create an instance of Configuration.

Public fields

allowDataLossOnRecovery

public final boolean allowDataLossOnRecovery

If true the database will be delete and its data loss in the case that it cannot be opened.

callback

public final @NonNull SupportSQLiteOpenHelper.Callback callback

The callback class to handle creation, upgrade and downgrade.

context

public final @NonNull Context context

Context to use to open or create the database.

name

public final String name

Name of the database file, or null for an in-memory database.

useNoBackupDirectory

public final boolean useNoBackupDirectory

If true the database will be stored in the no-backup directory.

Public constructors

Configuration

public Configuration(
    @NonNull Context context,
    String name,
    @NonNull SupportSQLiteOpenHelper.Callback callback,
    boolean useNoBackupDirectory,
    boolean allowDataLossOnRecovery
)

Public methods

builder

public static final @NonNull SupportSQLiteOpenHelper.Configuration.Builder builder(@NonNull Context context)

Creates a new Configuration.Builder to create an instance of Configuration.

Parameters
@NonNull Context context

to use to open or create the database.