@Override public long getPosition() { return rows.getPosition(); }
/** * {@inheritDoc} */ public long getPosition() { return rowIterator.getPosition(); }
@Override public long getPosition() { return rowIterator.getPosition(); }
@Override public boolean isFirst() throws SQLException { this.notClosed(); if (this.rowIter.getPosition() == 1) { return true; } return false; }
@Override public boolean isFirst() throws SQLException { this.notClosed(); if (this.rowIter.getPosition() == 1) { return true; } return false; }
@Override public int getRow() throws SQLException { notClosed(); return (int)this.rowIter.getPosition(); }
@Override public int getRow() throws SQLException { notClosed(); return (int)this.rowIter.getPosition(); }
@Override public boolean isBeforeFirst() throws SQLException { this.notClosed(); if (this.rowIter.getPosition() == 0) { return true; } return false; }
@Override public boolean isBeforeFirst() throws SQLException { this.notClosed(); if (this.rowIter.getPosition() == 0) { return true; } return false; }
@Override public boolean isAfterLast() throws SQLException { this.notClosed(); if (this.row == null && !this.rowIter.hasNext() && this.rowIter.getPosition() == this.rowIter.getSize()) { return true; } return false; }
@Override public boolean isLast() throws SQLException { this.notClosed(); if (this.row != null && !this.rowIter.hasNext() && this.rowIter.getPosition() == this.rowIter.getSize()) { return true; } return false; }
@Override public boolean isAfterLast() throws SQLException { this.notClosed(); if (this.row == null && !this.rowIter.hasNext() && this.rowIter.getPosition() == this.rowIter.getSize()) { return true; } return false; }
@Override public boolean isLast() throws SQLException { this.notClosed(); if (this.row != null && !this.rowIter.hasNext() && this.rowIter.getPosition() == this.rowIter.getSize()) { return true; } return false; }
public void testPositionEmptyResult() throws RepositoryException { QueryManager qm = superuser.getWorkspace().getQueryManager(); String stmt = testPath + "/*[@" + propertyName1 + " > 1000]"; QueryResult result = qm.createQuery(stmt, Query.XPATH).execute(); assertEquals("Wrong position", 0, result.getNodes().getPosition()); assertEquals("Wrong position", 0, result.getRows().getPosition()); stmt += " order by jcr:score()"; result = qm.createQuery(stmt, Query.XPATH).execute(); assertEquals("Wrong position", 0, result.getNodes().getPosition()); assertEquals("Wrong position", 0, result.getRows().getPosition()); } }