001    package railo.runtime.type;
002    
003    import railo.runtime.exp.PageException;
004    
005    /**
006     * Interface for a simple Iterator
007     */
008    public interface Iterator {
009    
010            /**
011            * set the intern pointer of the iterator to the next position, 
012            * return true if next position exist otherwise false.
013            * @return       boolean
014            * @throws PageException
015            * @deprecated use instead <code>{@link #next(int)}</code>
016            */
017            public boolean next()throws PageException;
018            
019            /**
020            * set the intern pointer of the iterator to the next position, 
021            * return true if next position exist otherwise false.
022            * @return       boolean
023            * @throws PageException
024            */
025            public boolean next(int pid)throws PageException;
026    
027            public boolean previous(int pid);
028            
029            /**
030            * reset ther intern pointer
031            * @throws PageException
032            * @deprecated use instead <code>{@link #reset(int)}</code>
033            */
034            public void reset()throws PageException;
035            
036            /**
037            *
038            * reset ther intern pointer
039            * @throws PageException
040            */
041            public void reset(int pid)throws PageException;
042            
043            /**
044            * return recordcount of the iterator object
045            * @return       int 
046            */
047            public int getRecordcount();
048            
049            
050            /**
051            * return the current position of the internal pointer
052            * @return       int 
053            */
054            public int getCurrentrow(int pid);
055    
056            /**
057            *
058            * set the internal pointer to defined position
059            * @param index
060            * @return       int 
061            * @throws PageException
062            */
063            public boolean go(int index, int pid)throws PageException;
064            
065            /**
066             * @return returns if iterator is empty or not
067             */
068            public boolean isEmpty();
069            
070            //public ArrayList column(String strColumn)throws PageException;
071            
072            //public String[] row(int number);
073    }