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

SupportSQLiteOpenHelper.Configuration.Builder

public class SupportSQLiteOpenHelper.Configuration.Builder


Builder class for Configuration.

Summary

Public methods

@NonNull SupportSQLiteOpenHelper.Configuration.Builder
allowDataLossOnRecovery(boolean allowDataLossOnRecovery)

Sets whether to delete and recreate the database file in situations when the database file cannot be opened, thus allowing for its data to be lost.

@NonNull SupportSQLiteOpenHelper.Configuration

Throws an IllegalArgumentException if the Callback is null.

@NonNull SupportSQLiteOpenHelper.Configuration.Builder
@NonNull SupportSQLiteOpenHelper.Configuration.Builder
name(String name)
@NonNull SupportSQLiteOpenHelper.Configuration.Builder
noBackupDirectory(boolean useNoBackupDirectory)

Sets whether to use a no backup directory or not.

Public methods

allowDataLossOnRecovery

public @NonNull SupportSQLiteOpenHelper.Configuration.Builder allowDataLossOnRecovery(boolean allowDataLossOnRecovery)

Sets whether to delete and recreate the database file in situations when the database file cannot be opened, thus allowing for its data to be lost.

Parameters
boolean allowDataLossOnRecovery

If true the database file might be recreated in the case that it cannot be opened.

callback

public @NonNull SupportSQLiteOpenHelper.Configuration.Builder callback(@NonNull SupportSQLiteOpenHelper.Callback callback)
Parameters
@NonNull SupportSQLiteOpenHelper.Callback callback

The callback class to handle creation, upgrade and downgrade.

Returns
@NonNull SupportSQLiteOpenHelper.Configuration.Builder

This builder instance.

name

public @NonNull SupportSQLiteOpenHelper.Configuration.Builder name(String name)
Parameters
String name

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

Returns
@NonNull SupportSQLiteOpenHelper.Configuration.Builder

This builder instance.

noBackupDirectory

public @NonNull SupportSQLiteOpenHelper.Configuration.Builder noBackupDirectory(boolean useNoBackupDirectory)

Sets whether to use a no backup directory or not.

Parameters
boolean useNoBackupDirectory

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

Returns
@NonNull SupportSQLiteOpenHelper.Configuration.Builder

This builder instance.