SupportSQLiteOpenHelper.Configuration


public final class SupportSQLiteOpenHelper.Configuration


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

Summary

Nested types

Builder class for Configuration.

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

Added in 2.3.0
public final boolean allowDataLossOnRecovery

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

callback

Added in 2.0.0
public final @NonNull SupportSQLiteOpenHelper.Callback callback

The callback class to handle creation, upgrade and downgrade.

context

Added in 2.0.0
public final @NonNull Context context

Context to use to open or create the database.

name

Added in 2.0.0
public final String name

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

useNoBackupDirectory

Added in 2.1.0
public final boolean useNoBackupDirectory

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

Public constructors

Configuration

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

Public methods

builder

Added in 2.3.0
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.