private DBObject updateForItem(Container container, SeriesRef seriesRef) { MongoUpdateBuilder childUpdate = MongoBuilders.update().setField(ItemTranslator.CONTAINER_ID, container.getId()); if (seriesRef != null) { childUpdate.setField(ItemTranslator.SERIES_ID, seriesRef.getId()); } DBObject update = childUpdate.build(); return update; }
private BasicDBList dbosFromSeriesRefs(Iterable<SeriesRef> childRefs) { return seriesRefTranslator.toDBList(SeriesRef.dedupeAndSort(childRefs)); }