/** * Set the position of the first query result to be retrieved. A negative value will * result in pagination starting from position 0. * * @param firstRow - the position of the first query result * @return {@code this}, for method chaining * * @deprecated {@link #setFirstResult(int)} should be used instead. */ @Deprecated default Query setHibernateFirstResult(int firstRow) { if ( firstRow < 0 ) { getQueryOptions().setFirstRow( 0 ); } else { getQueryOptions().setFirstRow( firstRow ); } return this; }
@Override @SuppressWarnings("unchecked") public QueryImplementor setFirstResult(int startPosition) { getProducer().checkOpen(); if ( startPosition < 0 ) { throw new IllegalArgumentException( "first-result value cannot be negative : " + startPosition ); } queryOptions.setFirstRow( startPosition ); return this; }
public QueryParameters getQueryParameters() { final RowSelection selection = new RowSelection(); selection.setFirstRow( rootCriteria.getFirstResult() ); selection.setMaxRows( rootCriteria.getMaxResults() ); selection.setTimeout( rootCriteria.getTimeout() );
public Query setFirstResult(int firstResult) { selection.setFirstRow( firstResult); return this; }
public Query setFirstResult(int firstResult) { selection.setFirstRow( firstResult); return this; }
RowSelection selection = new RowSelection(); selection.setFetchSize(basePage.getPageSize()); selection.setFirstRow(basePage.getBeginNumber()); return dialect.getLimitHandler().processSql(buf.toString(), selection);
public QueryParameters getQueryParameters() { LockOptions lockOptions = new LockOptions(); RowSelection selection = new RowSelection(); selection.setFirstRow( rootCriteria.getFirstResult() ); selection.setMaxRows( rootCriteria.getMaxResults() ); selection.setTimeout( rootCriteria.getTimeout() );
public QueryParameters getQueryParameters() { LockOptions lockOptions = new LockOptions(); RowSelection selection = new RowSelection(); selection.setFirstRow( rootCriteria.getFirstResult() ); selection.setMaxRows( rootCriteria.getMaxResults() ); selection.setTimeout( rootCriteria.getTimeout() );
rowSelection.setFirstRow(original.getFirstRow()); } else if (original.getFirstRow() != null && original.getFirstRow() > 0 && !original.getFirstRow().equals(rowSelection.getFirstRow())) { throw new IllegalStateException("Multiple row selections not allowed!");