Most visited

Recently visited

Added in API level 11

DefaultDatabaseErrorHandler

public final class DefaultDatabaseErrorHandler
extends Object implements DatabaseErrorHandler

java.lang.Object
   ↳ android.database.DefaultDatabaseErrorHandler


缺省类,用于定义sqlite报告数据库损坏时要执行的操作。

应用程序可以在以下内容中指定 DatabaseErrorHandler的实现:

The specified DatabaseErrorHandler is used to handle database corruption errors, if they occur.

如果在上述调用中为DatabaseErrorHandler参数指定了null,则此类将用作默认值 DatabaseErrorHandler

Summary

Public constructors

DefaultDatabaseErrorHandler()

Public methods

void onCorruption(SQLiteDatabase dbObj)

定义检测到数据库损坏时要调用的缺省方法。

Inherited methods

From class java.lang.Object
From interface android.database.DatabaseErrorHandler

Public constructors

DefaultDatabaseErrorHandler

Added in API level 11
DefaultDatabaseErrorHandler ()

Public methods

onCorruption

Added in API level 11
void onCorruption (SQLiteDatabase dbObj)

定义检测到数据库损坏时要调用的缺省方法。

Parameters
dbObj SQLiteDatabase: the SQLiteDatabase object representing the database on which corruption is detected.

Hooray!