public void createUser(User user) { ContentValues values = new ContentValues(); values.put(DBConstUser.COLUMN_ID, user.getId()); values.put(DBConstUser.COLUMN_IDENTIFIER, user.getIdentifier()); values.put(DBConstUser.COLUMN_TOKEN, user.getToken()); database.insert(DBConstUser.TABLE_NAME, null, values); }
private User cursorToUser(Cursor cursor) { User user = new User(cursor.getString(0)); user.setId(cursor.getString(1)); user.setToken(cursor.getString(2)); return user; }