/** * 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 can move to the the previous row */ public boolean hasPrevious() throws DatabaseException { if (isClosed()) { return false; } loadPrevious(); return (getPreviousObject() != null); }
/** * PUBLIC: * Indicates whether the cursor can move to the the previous row */ public boolean hasPrevious() throws DatabaseException { if (isClosed()) { return false; } loadPrevious(); return (getPreviousObject() != null); }
/** * PUBLIC: * Indicates whether the cursor can move to the the previous row */ public boolean hasPrevious() throws DatabaseException { if (isClosed()) { return false; } loadPrevious(); return (getPreviousObject() != null); }
/** * Load the previous object. This is used solely for scrollable cursor support */ protected void loadPrevious() { // CR#4139 if (getPreviousObject() == null) { setPreviousObject(retrievePreviousObject()); } }
/** * PUBLIC: * Return the previous object from the collection. * * @return - previous object in stream * @exception - throws exception if read pass first of stream */ public Object previous() throws DatabaseException, QueryException { // CR#4139 loadPrevious(); if (getPreviousObject() == null) { throw QueryException.readBeyondStream(getQuery()); } Object previous = getPreviousObject(); clearNextAndPrevious(); return previous; }
/** * 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); } }
/** * 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); } }