Code example for Cursor

Methods: getIntgetString

0
    } 
 
    @Override 
    public User loadFrom(Cursor cursor) {
        User user = new User();
        user.setId(cursor.getInt(0));
        user.setLogin(cursor.getString(1));
        user.setAvatarUrl(cursor.getString(2));
        return user;
    } 
 
    @Override 
    public void store(SQLiteDatabase db, List<User> orgs) {
        db.delete("orgs", null, null);
        if (orgs.isEmpty())
            return; 
 
        ContentValues values = new ContentValues(3);
        for (User user : orgs) {
            values.clear();