|
| UserDB (SensePlatform sensePlatform) |
|
User | createUser (String email, String password, JSONObject user_info, String secret_code) throws Exception |
|
User | getUser () throws Exception |
|
boolean | updateUserInfo (User user) |
|
boolean | deleteUser () |
|
| 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 String | KEY_USER_INFO = "userInfo" |
|
static String | KEY_EMAIL = "email" |
|
static final String | KEY_ID = "_id" |
|
static final String | KEY_LOGIN_USERNAME = "login_username" |
|
static final String | KEY_MUTATED_AT = "mutated_at" |
|
|
static String | TAG = "UserDB" |
|
static UserAPI | mUserApi |
|
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" |
|
|
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) |
|
String | tableName |
|
JSONObject | dataStructure |
|
SensePlatform | sensePlatform |
|
boolean | userAutoIncrementKey = true |
|
boolean | isUserSpecificTable = true |
|
boolean | tableCreated = false |
|
User nl.sense_os.cortex.coaching.db.UserDB.createUser |
( |
String |
email, |
|
|
String |
password, |
|
|
JSONObject |
user_info, |
|
|
String |
secret_code |
|
) |
| throws Exception |
Creates the Coaching enabled CommonSense user
Will create a CommonSense user which is added to the Coaching database
- Parameters
-
email | The email of the user |
password | The md5 hashed password of the user |
user_info | the JSONOBject user info |
secret_code | The secret registration code |
- Returns
- The Coaching enabled user. Will return null if it fails.
boolean nl.sense_os.cortex.coaching.db.UserDB.deleteUser |
( |
| ) |
|
Delete the current user
This will delete the current user and all of it's data locally, in the coaching engine back-end and in CommonSense.
- Returns
- True if the user was removed successfully
User nl.sense_os.cortex.coaching.db.UserDB.getUser |
( |
| ) |
throws Exception |
Get the CommonSense Coaching User
This will return the user object from the Coaching database
- Returns
- The User object. Throws an exception if the user could not be found.
boolean nl.sense_os.cortex.coaching.db.UserDB.updateUserInfo |
( |
User |
user | ) |
|
Updates the User's user info into in the Coaching database
Updates an existing user's user info in the Coaching database
- Parameters
-
- Returns
- Returns true if the update was successful else False;
The documentation for this class was generated from the following file:
- android-sdk/src/nl/sense_os/cortex/coaching/db/UserDB.java