public class TadilJContactDatabase
extends SQLiteOpenHelper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARRAY_DELIMITER |
static int |
DATABASE_VERSION |
static java.lang.String |
TABLE_CONTACTS |
static java.lang.String |
TAG |
Modifier and Type | Method and Description |
---|---|
boolean |
addContact(TadilJContact contact)
Add or update the specified contact to the DB
|
void |
clearAll() |
void |
clearTable() |
TadilJContact |
getContact(java.lang.String uid)
Retrieve a specific Tadil-J contact from the DB.
|
java.util.List<Contact> |
getContacts()
Retrieve all Tadil-J contacts in the DB.
|
static TadilJContactDatabase |
getInstance() |
void |
onCreate(DatabaseIface db) |
void |
onDowngrade(DatabaseIface db,
int oldVersion,
int newVersion) |
void |
onUpgrade(DatabaseIface db,
int oldVersion,
int newVersion) |
boolean |
removeContact(java.lang.String uid)
Remove the specified contact from the DB
|
public static final java.lang.String TAG
public static final int DATABASE_VERSION
public static final java.lang.String TABLE_CONTACTS
public static final java.lang.String ARRAY_DELIMITER
public static TadilJContactDatabase getInstance()
public void onCreate(DatabaseIface db)
public void onUpgrade(DatabaseIface db, int oldVersion, int newVersion)
public void onDowngrade(DatabaseIface db, int oldVersion, int newVersion)
public void clearTable()
public boolean addContact(TadilJContact contact)
contact
- TadilJContact object to be addedpublic boolean removeContact(java.lang.String uid)
uid
- the uid for the desired contact to removepublic java.util.List<Contact> getContacts()
public TadilJContact getContact(java.lang.String uid)
uid
- public void clearAll()