code: @SuppressWarnings("unchecked")
  	public <T> Iterator<T> iterator(long first, long count, Function<Object, T> transformer)
      {
      	ODatabaseDocument db = OrientDbWebSession.get().getDatabase();
      	OSQLSynchQuery<K> query = new OSQLSynchQuery<K>(prepareSql((int)first, (int)count));
      	Iterator<?> iterator = db.query(enhanceContextByVariables(query), prepareParams()).iterator();
      	return transformer==null?(Iterator<T>)iterator:Iterators.transform(iterator, transformer);
      }
docs: Get result as {@link Iterator}&lt;K&gt;. Suitable for pagination
  @param <T> type of objects to return
  @param first first element to start from
  @param count maximum size of a result set
  @param transformer transformer to use for results
  @return {@link Iterator} over results