Cortex Android
 All Classes Namespaces Functions Variables
nl.sense_os.cortex.coaching.db.TaskDB Class Reference
Inheritance diagram for nl.sense_os.cortex.coaching.db.TaskDB:
nl.sense_os.cortex.coaching.db.CoachingDB

Public Member Functions

 TaskDB (SensePlatform sensePlatform)
 
boolean update (JSONObject object)
 
long getPopulationTime ()
 
boolean populate (JSONArray coachesJSON)
 
- Public Member Functions inherited from nl.sense_os.cortex.coaching.db.CoachingDB
 CoachingDB (SensePlatform sensePlatform, JSONObject dataStructure)
 
SQLiteDatabase getWritableDatabase ()
 
SQLiteDatabase getReadableDatabase ()
 
void onConfigure (SQLiteDatabase db)
 
void onOpen (SQLiteDatabase db)
 
void onCreate (SQLiteDatabase db)
 
void onUpgrade (SQLiteDatabase db, int oldVersion, int newVersion)
 
boolean add (JSONObject object)
 
boolean add (JSONObject object, SQLiteDatabase db)
 
JSONArray get (JSONObject criterion)
 
JSONArray get (JSONObject start_criterion, JSONObject end_criterion)
 
void clearTable ()
 

Static Public Attributes

static String KEY_TASK_TYPE = "taskType"
 
static String KEY_VALUE = "value"
 
static String KEY_TARGET = "target"
 
static String KEY_STATUS = "status"
 
static String KEY_START_DATE = "startDate"
 
static String KEY_END_DATE = "endDate"
 
static String KEY_DESCRIPTION = "description"
 
static String KEY_COACH_TYPE = "coachType"
 
- Static Public Attributes inherited from nl.sense_os.cortex.coaching.db.CoachingDB
static final String KEY_ID = "_id"
 
static final String KEY_LOGIN_USERNAME = "login_username"
 
static final String KEY_MUTATED_AT = "mutated_at"
 

Protected Attributes

String PREFERENCES_POPULATION_TIME = "tasks_population_time"
 
- Protected Attributes inherited from nl.sense_os.cortex.coaching.db.CoachingDB
String tableName
 
JSONObject dataStructure
 
SensePlatform sensePlatform
 
boolean userAutoIncrementKey = true
 
boolean isUserSpecificTable = true
 
boolean tableCreated = false
 

Static Protected Attributes

static String TAG = "TaskDB"
 
- Static Protected Attributes inherited from nl.sense_os.cortex.coaching.db.CoachingDB
static String TAG = "CoachingDB"
 
static final String TYPE_INTEGER = " INTEGER"
 
static final String TYPE_TEXT = " TEXT"
 
static final String TYPE_DATETIME = " DATETIME"
 
static final String TYPE_REAL = " REAL"
 

Additional Inherited Members

- Protected Member Functions inherited from nl.sense_os.cortex.coaching.db.CoachingDB
String getLoginUsername ()
 
String createTableString ()
 
ContentValues toContentValues (JSONObject object)
 
String createEquals (JSONObject criterion)
 
String createBetween (JSONObject first_criterion, JSONObject second_criterion)
 
JSONObject getSingleCreterion (JSONObject first_criterion, JSONObject second_criterion)
 
JSONObject toJSONObject (Cursor c)
 
boolean update (JSONObject object)
 
boolean delete (JSONObject object)
 

Constructor & Destructor Documentation

nl.sense_os.cortex.coaching.db.TaskDB.TaskDB ( SensePlatform  sensePlatform)

Initialize the Task database.

Initializes the Task database and creates the database and Table if necessary.

Parameters
contextThe application Context.

Member Function Documentation

long nl.sense_os.cortex.coaching.db.TaskDB.getPopulationTime ( )

Returns the population time of the TaskDB

Returns
The epoch miliseconds of the time the TaskDB was populated. If never populated, it will return Long.MIN_VALUE
boolean nl.sense_os.cortex.coaching.db.TaskDB.update ( JSONObject  object)

Update a Task

Updates a row based on the JSONObject representation of the Task.

Parameters
objectThe JSONObject representation of the Task to update.

The documentation for this class was generated from the following file: