INNER CODE UNIT · Java

put

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

    public long put(T entity) {
        Cursor<T> cursor = getWriter();
        try {
            long key = cursor.put(entity);
            commitWriter(cursor);
            return key;
        } finally {
            releaseWriter(cursor);
        }
    }

    /**
     * Puts the given entities in a box using a single transaction.
     * <p>
     * See {@link #put(Object)} for more details.
     */
    @SafeVarargs // Not using T... as Object[], no ClassCastException expected.
    public final void put(@Nullable T... entities) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…