/** * PUBLIC: * Retrieves the current row index number */ public int currentIndex() throws DatabaseException { return getPosition(); }
/** * PUBLIC: * Retrieves the current row index number */ public int currentIndex() throws DatabaseException { return getPosition(); }
/** * PUBLIC: * Retrieves the current row index number */ public int currentIndex() throws DatabaseException { return getPosition(); }
/** * PUBLIC: * Indicates whether the cursor is before the first row in the result set. */ public boolean isBeforeFirst() throws DatabaseException { if (getPreviousObject() != null) { return false; } return getPosition() == 0; }
/** * PUBLIC: * Indicates whether the cursor is before the first row in the result set. */ public boolean isBeforeFirst() throws DatabaseException { if (getPreviousObject() != null) { return false; } return getPosition() == 0; }
/** * PUBLIC: * Indicates whether the cursor is before the first row in the result set. */ public boolean isBeforeFirst() throws DatabaseException { if (getPreviousObject() != null) { return false; } return getPosition() == 0; }
/** * PUBLIC: * Indicates whether the cursor is after the last row in the result set. */ public boolean isAfterLast() throws DatabaseException { try { if (this.nextObject != null) { return false; } if ((this.objectCollection.size() > 0) && (getPosition() <= this.objectCollection.size())) { return false; } return this.resultSet.isAfterLast(); } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(this.session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), this.session, false); } }
/** * PUBLIC: * Indicates whether the cursor is after the last row in the result set. */ public boolean isAfterLast() throws DatabaseException { try { if (this.nextObject != null) { return false; } if ((this.objectCollection.size() > 0) && (getPosition() <= this.objectCollection.size())) { return false; } return this.resultSet.isAfterLast(); } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(this.session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), this.session, false); } }
/** * INTERNAL: * Read the next row from the result set. */ protected Object retrieveNextObject() throws DatabaseException { while (true) { if (getPosition() < getObjectCollection().size()) { setPosition(getPosition() + 1); return getObjectCollection().elementAt(getPosition() - 1); } if (isClosed()) { return null; } AbstractRecord row = getAccessor().cursorRetrieveNextRow(getFields(), getResultSet(), getExecutionSession()); if (row == null) { // If already afterLast do not increment position again. setPosition(size() + 1); return null; } setPosition(getPosition() + 1); Object object = buildAndRegisterObject(row); if (object == InvalidObject.instance) { continue; } return object; } }
if (getPosition() <= (getObjectCollection().size() + 1)) { if ((getPosition() == (getObjectCollection().size() + 1)) && (!isClosed())) { getAccessor().cursorRetrievePreviousRow(getFields(), getResultSet(), getExecutionSession()); if (getPosition() <= 1) { setPosition(getPosition() - 1); return getObjectCollection().elementAt(getPosition() - 1); return null; setPosition(getPosition() - 1);
/** * PUBLIC: * Indicates whether the cursor is on the first row of the result set. */ public boolean isFirst() throws DatabaseException { if (getPreviousObject() != null) { return false; } try { if (this.objectCollection.size() > 0) { return getPosition() == 1; } return this.resultSet.isFirst(); } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(this.session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), this.session, false); } }
/** * PUBLIC: * Indicates whether the cursor is on the first row of the result set. */ public boolean isFirst() throws DatabaseException { if (getPreviousObject() != null) { return false; } try { if (this.objectCollection.size() > 0) { return getPosition() == 1; } return this.resultSet.isFirst(); } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(this.session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), this.session, false); } }
try { boolean suceeded = false; int oldPosition = getPosition(); int newPosition = getPosition() + rows; int initiallyConforming = this.objectCollection.size(); if (newPosition <= initiallyConforming) {
try { boolean suceeded = false; int oldPosition = getPosition(); int newPosition = getPosition() + rows; int initiallyConforming = this.objectCollection.size(); if (newPosition <= initiallyConforming) {
/** * PUBLIC: * Indicates whether the cursor is after the last row in the result set. */ public boolean isAfterLast() throws DatabaseException { try { if (getNextObject() != null) { return false; } if ((getObjectCollection().size() > 0) && (getPosition() <= getObjectCollection().size())) { return false; } return getResultSet().isAfterLast(); } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(getSession(), exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), getSession(), false); } }
/** * PUBLIC: * Indicates whether the cursor is on the first row of the result set. */ public boolean isFirst() throws DatabaseException { if (getPreviousObject() != null) { return false; } try { if (getObjectCollection().size() > 0) { return getPosition() == 1; } return getResultSet().isFirst(); } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(getSession(), exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), getSession(), false); } }
int currentPosition = getPosition(); if (currentPosition < this.objectCollection.size()) { this.position = currentPosition + 1;
int currentPosition = getPosition(); if (currentPosition < this.objectCollection.size()) { this.position = currentPosition + 1;
int currentPosition = getPosition(); if (currentPosition <= (this.objectCollection.size() + 1)) {
try { boolean suceeded = false; int oldPosition = getPosition(); int newPosition = getPosition() + rows; int initiallyConforming = getObjectCollection().size(); if (newPosition <= initiallyConforming) {