Projects >> realm-java >>9073a169cd030fe4cc663237097737195c8da165

Chunk
Conflicting content
        return where(clazz).findAll();
    }

<<<<<<< HEAD
    /**
     * Get objects with distinct values of the specified field
     *
     * @param clazz the Class to get objects of
     * @param fieldName the field (must be indexed using the @Index annotation)
     * @return A RealmResult list containing the objects
     * @throws java.lang.IllegalArgumentException If field does not exist
     * @throws java.lang.UnsupportedOperationException If field is not indexed
     */
    public  RealmResults distinct(Class clazz, String fieldName) {
        Table table = getTable(clazz);
        long columnIndex = table.getColumnIndex(fieldName);
        if (columnIndex == -1) {
            throw new IllegalArgumentException(String.format("'%s' is not a valid field name.", fieldName));
        }

        return new RealmResults(this, table.getDistinctView(columnIndex), clazz);
    }

=======
>>>>>>> 80f075fa718543814ed06c8ab0307ac672ebe261
    // Notifications

    /**
Solution content
        return where(clazz).findAll();
    }

    /**
     * Get objects with distinct values of the specified field
     *
     * @param clazz the Class to get objects of
     * @param fieldName the field (must be indexed using the @Index annotation)
     * @return A RealmResult list containing the objects
     * @throws java.lang.IllegalArgumentException If field does not exsist
     * @throws java.lang.UnsupportedOperationException If field is not indexed
     */
    public  RealmResults distinct(Class clazz, String fieldName) {
        Table table = getTable(clazz);
        long columnIndex = table.getColumnIndex(fieldName);
        if (columnIndex == -1) {
            throw new IllegalArgumentException(String.format("'%s' is not a valid field name.", fieldName));
        }
        return new RealmResults(this, table.getDistinctView(columnIndex), clazz);
    }

    // Notifications

    /**
File
Realm.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration