|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hermit.android.provider.DbSchema
public abstract class DbSchema
Class encapsulating the schema for a content provider. Applications must subclass this, and provide the necessary information in the call to this base class's constructor.
An application's subclass will typically provide the following:
TableSchema
,
defining the schemas of the individual tables.
Constructor Summary | |
---|---|
protected |
DbSchema(java.lang.String name,
int version,
java.lang.String auth,
TableSchema[] tables)
Create a database schema instance. |
Method Summary | |
---|---|
java.lang.String |
getDbName()
Get the database name. |
int |
getDbVersion()
Get the database version number. |
protected TableSchema |
getTable(java.lang.String name)
Get the schema for a specified table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DbSchema(java.lang.String name, int version, java.lang.String auth, TableSchema[] tables)
name
- Name for the database; e.g. "passages".version
- Version number of the database. The upgrade
process will be run when this increments.auth
- Authority name for this content provider; e.g.
"org.hermit.provider.PassageData".tables
- List of table schemas.Method Detail |
---|
public java.lang.String getDbName()
public int getDbVersion()
protected TableSchema getTable(java.lang.String name) throws java.lang.IllegalArgumentException
name
- The name of the table we want.
java.lang.IllegalArgumentException
- No such table.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |