/** * Indicates whether the cursor is after the last row in the result set. */ public Transporter scrollableCursorIsAfterLast(Transporter remoteScrollableCursorOid) { Transporter transporter = new Transporter(); try { ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject()); if (stream != null) { transporter.setObject(new Boolean(stream.isAfterLast())); } else { transporter.setObject(new Boolean(false)); } } catch (RuntimeException exception) { transporter.setException(exception); } return transporter; }
/** * Indicates whether the cursor is after the last row in the result set. */ public Transporter scrollableCursorIsAfterLast(Transporter remoteScrollableCursorOid) { Transporter transporter = new Transporter(); try { ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject()); if (stream != null) { transporter.setObject(Boolean.valueOf(stream.isAfterLast())); } else { transporter.setObject(Boolean.FALSE); } } catch (RuntimeException exception) { transporter.setException(exception); } return transporter; }
/** * Indicates whether the cursor is after the last row in the result set. */ public Transporter scrollableCursorIsAfterLast(Transporter remoteScrollableCursorOid) { Transporter transporter = new Transporter(); try { ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject()); if (stream != null) { transporter.setObject(Boolean.valueOf(stream.isAfterLast())); } else { transporter.setObject(Boolean.FALSE); } } catch (RuntimeException exception) { transporter.setException(exception); } return transporter; }
/** * PUBLIC: * Retrieves the current cursor position (current row). The first row is number 1, the second number 2, and so on. * Unlike java.sql.ResultSet.getRow(), 0 is not returned if afterLast. * Instead size() + 1 is returned. * @return the current row number; 0 if there is no current row * @exception DatabaseException if a database access error occurs */ public int getPosition() throws DatabaseException { try { if (this.position == -1) { this.position = this.resultSet.getRow(); if (this.position == 0) { // This could mean either beforeFirst or afterLast! if (isAfterLast()) { this.position = size() + 1; } } else { this.position += this.objectCollection.size(); } } return this.position; } 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: * Retrieves the current cursor position (current row). The first row is number 1, the second number 2, and so on. * Unlike java.sql.ResultSet.getRow(), 0 is not returned if afterLast. * Instead size() + 1 is returned. * @return the current row number; 0 if there is no current row * @exception DatabaseException if a database access error occurs */ public int getPosition() throws DatabaseException { try { if (this.position == -1) { this.position = this.resultSet.getRow(); if (this.position == 0) { // This could mean either beforeFirst or afterLast! if (isAfterLast()) { this.position = size() + 1; } } else { this.position += this.objectCollection.size(); } } return this.position; } 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: * Retrieves the current cursor position (current row). The first row is number 1, the second number 2, and so on. * Unlike java.sql.ResultSet.getRow(), 0 is not returned if afterLast. * Instead size() + 1 is returned. * @return the current row number; 0 if there is no current row * @exception SQLException if a database access error occurs */ public int getPosition() throws DatabaseException { try { if (position == -1) { position = getResultSet().getRow(); if (position == 0) { // This could mean either beforeFirst or afterLast! if (isAfterLast()) { position = size() + 1; } } else { position += getObjectCollection().size(); } } return position; } catch (SQLException exception) { DatabaseException commException = getAccessor().processExceptionForCommError(getSession(), exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, getAccessor(), getSession(), false); } }