Move triggerInfiniteScrolling condition logic around.
Use entityClass method.