public abstract class Model
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_ID |
java.lang.Long |
id |
| Constructor and Description |
|---|
Model() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete the record from the database.
|
boolean |
equals(java.lang.Object obj) |
static <T extends Model> |
find(java.lang.Class<T> cls,
java.lang.Long id)
Find a record by id.
|
int |
hashCode() |
void |
load(android.database.Cursor cursor)
Load this objects values from a cursor.
|
java.lang.Long |
save()
Persist the record to the database.
|
public static final java.lang.String _ID
public java.lang.Long id
public static final <T extends Model> T find(java.lang.Class<T> cls, java.lang.Long id)
Find a record by id.
cls - The model class.id - The model Id.public final void load(android.database.Cursor cursor)
Load this objects values from a cursor.
cursor - public final java.lang.Long save()
Persist the record to the database. Inserts the record if it does not exists and updates the record if it does exists.
public final void delete()
Delete the record from the database.
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object