Package android.database
Class DefaultDatabaseErrorHandler
- java.lang.Object
-
- android.database.DefaultDatabaseErrorHandler
-
- All Implemented Interfaces:
DatabaseErrorHandler
public final class DefaultDatabaseErrorHandler extends Object implements DatabaseErrorHandler
Default class used to define the action to take when database corruption is reported by sqlite.An application can specify an implementation of
DatabaseErrorHandleron the following:SQLiteDatabase.openOrCreateDatabase(String, android.database.sqlite.SQLiteDatabase.CursorFactory, DatabaseErrorHandler)SQLiteDatabase.openDatabase(String, android.database.sqlite.SQLiteDatabase.CursorFactory, int, DatabaseErrorHandler)
DatabaseErrorHandleris used to handle database corruption errors, if they occur.If null is specified for the DatabaseErrorHandler param in the above calls, this class is used as the default
DatabaseErrorHandler.
-
-
Constructor Summary
Constructors Constructor Description DefaultDatabaseErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCorruption(SQLiteDatabase dbObj)defines the default method to be invoked when database corruption is detected.
-
-
-
Method Detail
-
onCorruption
public void onCorruption(SQLiteDatabase dbObj)
defines the default method to be invoked when database corruption is detected.- Specified by:
onCorruptionin interfaceDatabaseErrorHandler- Parameters:
dbObj- theSQLiteDatabaseobject representing the database on which corruption is detected.
-
-