@java.lang.SuppressWarnings("unused") public interface EntityListIterator extends java.util.ListIterator
Entity Cursor List Iterator for Handling Cursored Database Results
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
absolute(int rowNum) performs the same function as the ResultSet.absolute method; if rowNum is positive, goes to that position relative to the beginning of the list; if rowNum is negative, goes to that position relative to the end of the list; a rowNum of 1 is the same as first(); a rowNum of -1 is the same as last() |
|
public void |
afterLast() Sets the cursor position to just after the last result so that previous() will return the last result |
|
public void |
beforeFirst() Sets the cursor position to just before the first result so that next() will return the first result |
|
public void |
close() Close the underlying ResultSet and Connection. |
|
public EntityValue |
currentEntityValue() NOTE: Calling this method does return the current value, but so does calling next() or previous(), so calling one of those AND this method will cause the value to be created twice |
|
public int |
currentIndex() |
|
public boolean |
first() Sets the cursor position to last result; if result set is empty returns false |
|
public EntityList |
getCompleteList(boolean closeAfter) |
|
public EntityList |
getPartialList(int offset, int limit, boolean closeAfter) Gets a partial list of results starting at start and containing at most number elements. |
|
public boolean |
hasNext() PLEASE NOTE: Because of the nature of the JDBC ResultSet interface this method can be very inefficient; it is much better to just use next() until it returns null. |
|
public boolean |
hasPrevious() PLEASE NOTE: Because of the nature of the JDBC ResultSet interface this method can be very inefficient; it is much better to just use previous() until it returns null. |
|
public boolean |
last() Sets the cursor position to last result; if result set is empty returns false |
|
public EntityValue |
next() Moves the cursor to the next position and returns the EntityValue object for that position; if there is no next, returns null. |
|
public int |
nextIndex() Returns the index of the next result, but does not guarantee that there will be a next result |
|
public EntityValue |
previous() Moves the cursor to the previous position and returns the EntityValue object for that position; if there is no previous, returns null. |
|
public int |
previousIndex() Returns the index of the previous result, but does not guarantee that there will be a previous result |
|
public boolean |
relative(int rows) performs the same function as the ResultSet.relative method; if rows is positive, goes forward relative to the current position; if rows is negative, goes backward relative to the current position; |
|
public void |
setFetchSize(int rows) |
|
public int |
writeXmlText(java.io.Writer writer, java.lang.String prefix, int dependentLevels) Writes XML text with an attribute or CDATA element for each field of each record. |
|
public int |
writeXmlTextMaster(java.io.Writer writer, java.lang.String prefix, java.lang.String masterName) |
Methods inherited from class | Name |
---|---|
interface java.util.ListIterator |
java.util.ListIterator#add(java.lang.Object), java.util.ListIterator#remove(), java.util.ListIterator#next(), java.util.ListIterator#hasNext(), java.util.ListIterator#set(java.lang.Object), java.util.ListIterator#nextIndex(), java.util.ListIterator#previous(), java.util.ListIterator#previousIndex(), java.util.ListIterator#hasPrevious(), java.util.ListIterator#forEachRemaining(java.util.function.Consumer) |
performs the same function as the ResultSet.absolute method; if rowNum is positive, goes to that position relative to the beginning of the list; if rowNum is negative, goes to that position relative to the end of the list; a rowNum of 1 is the same as first(); a rowNum of -1 is the same as last()
Sets the cursor position to just after the last result so that previous() will return the last result
Sets the cursor position to just before the first result so that next() will return the first result
Close the underlying ResultSet and Connection. This must ALWAYS be called when done with an EntityListIterator.
NOTE: Calling this method does return the current value, but so does calling next() or previous(), so calling one of those AND this method will cause the value to be created twice
Sets the cursor position to last result; if result set is empty returns false
Gets a partial list of results starting at start and containing at most number elements. Start is a one based value, ie 1 is the first element.
PLEASE NOTE: Because of the nature of the JDBC ResultSet interface this method can be very inefficient; it is much better to just use next() until it returns null. For example, you could use the following to iterate through the results in an EntityListIterator:
EntityValue nextValue; while ((nextValue = eli.next()) != null) { ... }
PLEASE NOTE: Because of the nature of the JDBC ResultSet interface this method can be very inefficient; it is much better to just use previous() until it returns null.
Sets the cursor position to last result; if result set is empty returns false
Moves the cursor to the next position and returns the EntityValue object for that position; if there is no next, returns null. For example, you could use the following to iterate through the results in an EntityListIterator:
EntityValue nextValue; while ((nextValue = eli.next()) != null) { ... }
Returns the index of the next result, but does not guarantee that there will be a next result
Moves the cursor to the previous position and returns the EntityValue object for that position; if there is no previous, returns null.
Returns the index of the previous result, but does not guarantee that there will be a previous result
performs the same function as the ResultSet.relative method; if rows is positive, goes forward relative to the current position; if rows is negative, goes backward relative to the current position;
Writes XML text with an attribute or CDATA element for each field of each record. If dependents is true also writes all dependent (descendant) records.
writer
- A Writer object to write toprefix
- A prefix to put in front of the entity name in the tag namedependentLevels
- Write dependent (descendant) records this many levels deep, zero for no dependents