File tree Expand file tree Collapse file tree
objectbox-java/src/main/java/io/objectbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,6 +216,27 @@ public List<T> get(Iterable<Long> ids) {
216216 return list ;
217217 }
218218
219+ /**
220+ * Get the stored objects for the given IDs.
221+ *
222+ * @return null if not found
223+ */
224+ public List <T > get (long [] ids ) {
225+ ArrayList <T > list = new ArrayList <>(ids .length );
226+ Cursor <T > reader = getReader ();
227+ try {
228+ for (Long id : ids ) {
229+ T entity = reader .get (id );
230+ if (entity != null ) {
231+ list .add (entity );
232+ }
233+ }
234+ } finally {
235+ releaseReader (reader );
236+ }
237+ return list ;
238+ }
239+
219240 /**
220241 * Get the stored objects for the given IDs as a Map with IDs as keys, and entities as values.
221242 * IDs for which no entity is found will be put in the map with null values.
@@ -560,6 +581,21 @@ public void attach(T entity) {
560581 }
561582 }
562583
584+ // Sketching future API extension
585+ private boolean isEmpty () {
586+ return false ;
587+ }
588+
589+ // Sketching future API extension
590+ private boolean isChanged (T entity ) {
591+ return false ;
592+ }
593+
594+ // Sketching future API extension
595+ private boolean putIfChanged (T entity ) {
596+ return false ;
597+ }
598+
563599 public Class <T > getEntityClass () {
564600 return entityClass ;
565601 }
You can’t perform that action at this time.
0 commit comments