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

Public Member Functions

 MessageDB (SensePlatform sensePlatform)
 
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_COACH_TYPE = "coachType"
 
static String KEY_TASK_TYPE = "taskType"
 
static String KEY_TASK_START_TIME = "taskStartTime"
 
static String KEY_GENERATION_TIME = "generationTime"
 
static String KEY_TRIGGER_TIME = "triggerTime"
 
static String KEY_MSG_TYPE = "msgType"
 
static String KEY_VALUE = "value"
 
static String KEY_TARGET = "target"
 
static String KEY_STYLE = "style"
 
static String KEY_STYLE_MSG_ID = "styleMsgId"
 
static String KEY_ADVICE_ID = "adviceId"
 
static String KEY_TITLE = "title"
 
static String KEY_NOTIFICATION_TEXT = "notificationText"
 
static String KEY_TEXT = "text"
 
- 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 = "messages_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 = "MessageDB"
 
static String TABLE = "message"
 
- 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)
 

Member Function Documentation

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

Returns the population time of the MessageDB

Returns
The epoch miliseconds of the time the MessageDB was populated. If never populated, it will return Long.MIN_VALUE

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