|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.todoroo.andlib.data.ContentResolverDao<TYPE>
TYPE - model typepublic class ContentResolverDao<TYPE extends AbstractModel>
DAO for reading and writing values from an Android ContentResolver
| Constructor Summary | |
|---|---|
ContentResolverDao(java.lang.Class<TYPE> modelClass,
android.content.Context context,
android.net.Uri baseUri)
|
|
| Method Summary | |
|---|---|
int |
delete(long id)
Delete specific item from the given table |
int |
deleteWhere(Criterion where)
Delete by criteria |
TYPE |
fetch(long id,
Property<?>... properties)
Returns object corresponding to the given identifier |
TodorooCursor<TYPE> |
query(Query query)
Query content provider |
boolean |
save(TYPE model)
Create new or save existing model |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContentResolverDao(java.lang.Class<TYPE> modelClass,
android.content.Context context,
android.net.Uri baseUri)
| Method Detail |
|---|
public int delete(long id)
id -
public int deleteWhere(Criterion where)
where -
public TodorooCursor<TYPE> query(Query query)
query -
public boolean save(TYPE model)
model -
public TYPE fetch(long id,
Property<?>... properties)
database - table - name of tableproperties - properties to readid - id of item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||