|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.android.H2OpenHelper
public abstract class H2OpenHelper
This helper class helps creating and managing databases. A subclass typically implements the "on" methods.
Method Summary | |
---|---|
void |
close()
Close the connection. |
H2Database |
getReadableDatabase()
Open a read-only connection. |
H2Database |
getWritableDatabase()
Open a read-write connection. |
abstract void |
onCreate(H2Database db)
This method is called when the database did not already exist. |
void |
onOpen(H2Database db)
This method is called after opening the database. |
abstract void |
onUpgrade(H2Database db,
int oldVersion,
int newVersion)
This method is called when the version stored in the database file does not match the expected value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void close()
public H2Database getReadableDatabase()
public H2Database getWritableDatabase()
public abstract void onCreate(H2Database db)
db
- the connectionpublic void onOpen(H2Database db)
db
- the connectionpublic abstract void onUpgrade(H2Database db, int oldVersion, int newVersion)
db
- the connectionoldVersion
- the current versionnewVersion
- the expected version
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |