INNER CODE UNIT · Java
removeByIds
objectbox/objectbox-java · objectbox-java/src/main/java/io/objectbox/Box.java:500
public void removeByIds(@Nullable Collection<Long> ids) {
if (ids == null || ids.isEmpty()) {
return;
}
Cursor<T> cursor = getWriter();
try {
for (long key : ids) {
cursor.deleteEntity(key);
}
commitWriter(cursor);
} finally {
releaseWriter(cursor);
}
}
/**
* Like {@link #remove(long)}, but obtains the ID from the {@link Id @Id} property of the given object instead.
*/