INNER CODE UNIT · Java

getAll

objectbox/objectbox-java · objectbox-java/src/main/java/io/objectbox/Box.java:320

    public List<T> getAll() {
        ArrayList<T> list = new ArrayList<>();
        Cursor<T> cursor = getReader();
        try {
            for (T object = cursor.first(); object != null; object = cursor.next()) {
                list.add(object);
            }
            return list;
        } finally {
            releaseReader(cursor);
        }
    }

    /**
     * Check if an object with the given ID exists in the database.
     * This is more efficient than a {@link #get(long)} and comparing against null.
     *
     * @return true if an object with the given ID was found, false otherwise.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…