public class

SupportSQLiteOpenHelper.Configuration.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder

Overview

Builder class for SupportSQLiteOpenHelper.Configuration.

Summary

Methods
public SupportSQLiteOpenHelper.Configuration.BuilderallowDataLossOnRecovery(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.

public SupportSQLiteOpenHelper.Configurationbuild()

Throws an java.lang.IllegalArgumentException if the SupportSQLiteOpenHelper.Callback is null.

public SupportSQLiteOpenHelper.Configuration.Buildercallback(SupportSQLiteOpenHelper.Callback callback)

public SupportSQLiteOpenHelper.Configuration.Buildername(java.lang.String name)

public SupportSQLiteOpenHelper.Configuration.BuildernoBackupDirectory(boolean useNoBackupDirectory)

Sets whether to use a no backup directory or not.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

Throws an java.lang.IllegalArgumentException if the SupportSQLiteOpenHelper.Callback is null.

Throws an java.lang.IllegalArgumentException if the is null.

Throws an java.lang.IllegalArgumentException if the java.lang.String database name is null.

Returns:

The SupportSQLiteOpenHelper.Configuration instance

public SupportSQLiteOpenHelper.Configuration.Builder name(java.lang.String name)

Parameters:

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

Returns:

This

Parameters:

callback: The callback class to handle creation, upgrade and downgrade.

Returns:

this

public SupportSQLiteOpenHelper.Configuration.Builder noBackupDirectory(boolean useNoBackupDirectory)

Sets whether to use a no backup directory or not.

Parameters:

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

Returns:

this

public 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:

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

Returns:

this