|
0.0.2
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.metagloss.db.DBUtils
public class DBUtils
Utility class for working with databases and building ContentValues from
classes annotated with CursorBind.
| Field Summary | |
|---|---|
static boolean |
debug
If set to true, buildContentValues methods prints the parsed values. |
| Method Summary | ||
|---|---|---|
static android.content.ContentValues |
buildContentValues(android.content.ContentValues contentValues,
java.lang.Object object)
Populate an instance of ContentValues from an object annotated
with CursorBind. |
|
static android.content.ContentValues |
buildContentValues(java.lang.Object object)
Populate an instance of ContentValues from an object annotated
with CursorBind. |
|
static
|
getColumns(java.lang.Class<T> table)
Gets all columns from a table. |
|
static java.lang.String |
getTableName(java.lang.Class<? extends java.lang.Enum<? extends ITable>> table)
Gets the name of a database table by querying an ITable enum. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean debug
buildContentValues methods prints the parsed values.
| Method Detail |
|---|
public static android.content.ContentValues buildContentValues(java.lang.Object object)
ContentValues from an object annotated
with CursorBind.
object - Object to inject.
public static android.content.ContentValues buildContentValues(android.content.ContentValues contentValues,
java.lang.Object object)
ContentValues from an object annotated
with CursorBind.
contentValues - If not null, will add values to the supplied ContentValues.object - Object to inject.
public static <T extends java.lang.Enum<? extends ITable>> java.lang.String[] getColumns(java.lang.Class<T> table)
table - Table to extract columns from.
public static java.lang.String getTableName(java.lang.Class<? extends java.lang.Enum<? extends ITable>> table)
ITable enum.
table - Table from which to get the name.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||