Code example for Cursor

Methods: getIntgetString

0
     */ 
    private static ConditionsTreeNode buildNodeFromRow(Cursor cursor) {
        ConditionsTreeNode result = null;
        SearchCondition condition = null;
 
        Operator tmpValue = ConditionsTreeNode.Operator.valueOf(cursor.getString(5));
 
        if (tmpValue == Operator.CONDITION) {
            condition = new SearchCondition(Searchfield.valueOf(cursor.getString(0)),
                    Attribute.valueOf(cursor.getString(2)), cursor.getString(1));
        } 
 
        result = new ConditionsTreeNode(condition);
        result.mValue = tmpValue;
        result.mLeftMPTTMarker = cursor.getInt(3);
        result.mRightMPTTMarker = cursor.getInt(4);
 
        return result;
    }