You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by br...@apache.org on 2003/11/19 22:12:41 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer OJBIterator.java

brj         2003/11/19 13:12:41

  Modified:    src/java/org/apache/ojb/broker/accesslayer OJBIterator.java
  Log:
  added javadoc
  
  Revision  Changes    Path
  1.4       +29 -5     db-ojb/src/java/org/apache/ojb/broker/accesslayer/OJBIterator.java
  
  Index: OJBIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/OJBIterator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OJBIterator.java	19 Jan 2003 12:24:45 -0000	1.3
  +++ OJBIterator.java	19 Nov 2003 21:12:41 -0000	1.4
  @@ -64,8 +64,32 @@
    */
   public interface OJBIterator extends Iterator
   {
  -	int size() throws PersistenceBrokerException;
  -	boolean absolute(int row) throws PersistenceBrokerException;
  -	boolean relative(int row) throws SQLException;
  -	public void releaseDbResources();
  +    /**
  +     * @return the size of the iterator, aka the number of rows in this iterator.
  +     */
  +    int size() throws PersistenceBrokerException;
  +
  +    /**
  +     * Moves the cursor to the given row number in the iterator.
  +     * If the row number is positive, the cursor moves to the given row number with
  +     * respect to the beginning of the iterator. The first row is row 1, the second is row 2, and so on.
  +     * @param row the row to move to in this iterator, by absolute number
  +     */
  +    boolean absolute(int row) throws PersistenceBrokerException;
  +	
  +    /**
  +     * Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last
  +     * row in the iterator positions the cursor before/after the the first/last row. Calling relative(0) is valid,
  +     * but does not change the cursor position.
  +     * @param row the row to move to in this iterator, by relative number
  +     */
  +    boolean relative(int row) throws SQLException;
  +	
  +    /**
  +     * Release all internally used Database resources of the iterator.
  +     * Clients must call this methods explicitely if the iterator is not
  +     * exhausted by the client application. If the Iterator is exhauseted
  +     * this method will be called implicitely.
  +     */
  +    public void releaseDbResources();
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org