code: public Iterator<?> getElements(Filter filter, int offset, int maxResultSize) throws LayerException {
  		try {
  			Session session = getSessionFactory().getCurrentSession();
  			Criteria criteria = session.createCriteria(getFeatureInfo().getDataSourceName());
  			if (filter != null) {
  				if (filter != Filter.INCLUDE) {
  					CriteriaVisitor visitor = new CriteriaVisitor((HibernateFeatureModel) featureModel, dateFormat);
  					Criterion c = (Criterion) filter.accept(visitor, criteria);
  					if (c != null) {
  						criteria.add(c);
  					}
  				}
  			}
  
  			// Sorting of elements.
  			if (getFeatureInfo().getSortAttributeName() != null) {
  				if (SortType.ASC.equals(getFeatureInfo().getSortType())) {
  					criteria.addOrder(Order.asc(getFeatureInfo().getSortAttributeName()));
  				} else {
  					criteria.addOrder(Order.desc(getFeatureInfo().getSortAttributeName()));
  				}
  			}
  
  			criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
  
  			if (isScrollableResultSet()) {
  				return (Iterator<?>) new ScrollIterator(criteria.scroll());
  			} else {
  				List<?> list = criteria.list();
  				return list.iterator();
  			}
  		} catch (HibernateException he) {
  			throw new HibernateLayerException(he, ExceptionCode.HIBERNATE_LOAD_FILTER_FAIL, getFeatureInfo()
  					.getDataSourceName(), filter.toString());
  		}
  	}
docs: This implementation does not support the 'offset' parameter. The maxResultSize parameter is not used (limiting
  the result needs to be done after security {@link org.geomajas.internal.layer.vector.GetFeaturesEachStep}). If
  you expect large results to be returned enable scrollableResultSet to retrieve only as many records as needed.