| java.lang.Object com.Yasna.forum.database.DbQueryIterator
DbQueryIterator | public class DbQueryIterator implements Iterator(Code) | | Iterator for database query results.
|
Constructor Summary | |
public | DbQueryIterator(int[] messages, DbForumFactory factory) Creates a new query iterator using an array of message id's. | public | DbQueryIterator(int[] messages, DbForumFactory factory, int startIndex, int numResults) Creates a new query iterator using an array of message id's. |
Method Summary | |
public boolean | hasNext() Returns true if there are more messages left to iteratate through. | public Object | next() Returns the next message. | public void | remove() For security reasons, the remove operation is not supported. |
DbQueryIterator | public DbQueryIterator(int[] messages, DbForumFactory factory)(Code) | | Creates a new query iterator using an array of message id's. The
ForumFactory is used to lookup the actual message objects.
Parameters: messages - the array of message id's to iterate through. Parameters: factory - a DbForumFactory to obtain actual message objects from. |
DbQueryIterator | public DbQueryIterator(int[] messages, DbForumFactory factory, int startIndex, int numResults)(Code) | | Creates a new query iterator using an array of message id's. The
ForumFactory is used to lookup the actual message objects. A start index
and number of results limit the scope of the Iterator to a subset of the
message array. However, if the start index or number of results does
not fall into the bounds of the message array, the Iterator may return
fewer results than the number indicated by the numResults paramater.
Parameters: messages - the array of message id's to iterate through. Parameters: factory - a DbForumFactory to obtain actual message objects from. Parameters: startIndex - a starting index in the messages array for the Iterator. Parameters: numResults - the max number of results the Iterator should provide. |
hasNext | public boolean hasNext()(Code) | | Returns true if there are more messages left to iteratate through.
|
remove | public void remove()(Code) | | For security reasons, the remove operation is not supported.
|
|
|