Checking in AllItemsID REST endpoint and relevant changes

Checking in AllItemsID REST endpoint and relevant changes
I suppose u mean that ALSServingModel.getAllItemIDs() returns a Y.keys().iterator() only.

And transforming that into a collection of Integers could be done in the REST endpoint. Correct? See below:

In ALSServingModel.java:
<pre>
  public Iterator<IntCursor> getAllItemIDsIterator() {
    return Y.keys().iterator();
  }
</pre>

In AllItemIDs.java:
<pre>
  public List<Integer> get() {
    ALSServingModelManager alsServingModelManager = (ALSServingModelManager) servletContext.getAttribute("ModelManager");
    ALSServingModel alsServingModel = alsServingModelManager.getModel();

    final Iterator<Integer> transformed = Iterators.transform(alsServingModel.getAllItemIDsIterator(),
        new Function<IntCursor, Integer>() {
          @Override
          public Integer apply(IntCursor input) {
            return input.value;
          }
        });
    List<Integer> list = new ArrayList<>();
    Iterators.addAll(list, transformed);
    return list;
  }
</pre>