ar.com.ktulu.dict
Class JDBCMatches

java.lang.Object
  |
  +--ar.com.ktulu.dict.AbstractMatches
        |
        +--ar.com.ktulu.dict.JDBCMatches
All Implemented Interfaces:
Matches

public class JDBCMatches
extends AbstractMatches

List of results returned by a JDBCDatabase.

Author:
Luis Parravicini
See Also:
JDBCDatabase

Field Summary
(package private)  int pos
           
(package private)  java.sql.ResultSet results
           
(package private)  java.sql.Statement st
           
 
Fields inherited from class ar.com.ktulu.dict.AbstractMatches
db, size, word
 
Constructor Summary
protected JDBCMatches(Database db, java.lang.String word, java.sql.ResultSet results, java.sql.Statement st)
           
 
Method Summary
protected  void advance()
           
protected  int countMatches()
           
protected  void finalize()
           
 boolean hasNext()
          Returns true there are more elements.
 Definition next()
          Returns the definition of the next word in the collection.
 java.lang.String nextWord()
          Returns the next word definition in the collection.
 
Methods inherited from class ar.com.ktulu.dict.AbstractMatches
getDatabase, getWord, matches
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

st

java.sql.Statement st

results

java.sql.ResultSet results

pos

int pos
Constructor Detail

JDBCMatches

protected JDBCMatches(Database db,
                      java.lang.String word,
                      java.sql.ResultSet results,
                      java.sql.Statement st)
               throws DatabaseException
Method Detail

countMatches

protected int countMatches()
                    throws DatabaseException
DatabaseException

finalize

protected void finalize()
                 throws java.sql.SQLException
Overrides:
finalize in class java.lang.Object
java.sql.SQLException

hasNext

public boolean hasNext()
Description copied from interface: Matches
Returns true there are more elements.

Specified by:
hasNext in interface Matches
Specified by:
hasNext in class AbstractMatches

advance

protected void advance()
                throws java.sql.SQLException
java.sql.SQLException

next

public Definition next()
                throws DatabaseException
Description copied from interface: Matches
Returns the definition of the next word in the collection.

Specified by:
next in interface Matches
Specified by:
next in class AbstractMatches
DatabaseException

nextWord

public java.lang.String nextWord()
                          throws DatabaseException
Description copied from interface: Matches
Returns the next word definition in the collection.

Specified by:
nextWord in interface Matches
Specified by:
nextWord in class AbstractMatches
DatabaseException