public class EntityListIterator extends Object implements ListIterator<GenericValue>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected GenericDelegator |
delegator |
protected boolean |
haveMadeValue |
protected ModelEntity |
modelEntity |
protected ModelFieldTypeReader |
modelFieldTypeReader |
protected ResultSet |
resultSet |
protected List<ModelField> |
selectFields |
protected SQLProcessor |
sqlp |
| Constructor and Description |
|---|
EntityListIterator(SQLProcessor sqlp,
ModelEntity modelEntity,
List<ModelField> selectFields,
ModelFieldTypeReader modelFieldTypeReader) |
| Modifier and Type | Method and Description |
|---|---|
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()
|
void |
add(GenericValue obj) |
void |
afterLast()
Sets the cursor position to just after the last result so that previous() will return the last result
|
void |
beforeFirst()
Sets the cursor position to just before the first result so that next() will return the first result
|
void |
close() |
GenericValue |
currentGenericValue()
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
|
int |
currentIndex() |
boolean |
first()
Sets the cursor position to last result; if result set is empty returns false
|
List<GenericValue> |
getCompleteList() |
List<GenericValue> |
getPartialList(int start,
int number)
Gets a partial list of results starting at start and containing at most number elements.
|
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
|
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
|
boolean |
isCaseSensitive(String entityFieldName)
Detect whether or not the column data is case sensitive.
|
boolean |
last()
Sets the cursor position to last result; if result set is empty returns false
|
GenericValue |
next()
Moves the cursor to the next position and returns the GenericValue object for that position; if there is no next, returns null
|
int |
nextIndex()
Returns the index of the next result, but does not guarantee that there will be a next result
|
GenericValue |
previous()
Moves the cursor to the previous position and returns the GenericValue object for that position; if there is no previous, returns null
|
int |
previousIndex()
Returns the index of the previous result, but does not guarantee that there will be a previous result
|
void |
remove() |
void |
set(GenericValue obj) |
void |
setDelegator(GenericDelegator delegator) |
void |
setFetchSize(int rows) |
protected SQLProcessor sqlp
protected ResultSet resultSet
protected ModelEntity modelEntity
protected List<ModelField> selectFields
protected ModelFieldTypeReader modelFieldTypeReader
protected boolean closed
protected boolean haveMadeValue
protected GenericDelegator delegator
public EntityListIterator(SQLProcessor sqlp, ModelEntity modelEntity, List<ModelField> selectFields, ModelFieldTypeReader modelFieldTypeReader)
public void setDelegator(GenericDelegator delegator)
public boolean isCaseSensitive(String entityFieldName) throws GenericEntityException
entityFieldName - the field to check.GenericEntityException - if the information could not be found.public void afterLast()
throws GenericEntityException
GenericEntityExceptionpublic void beforeFirst()
throws GenericEntityException
GenericEntityExceptionpublic boolean last()
throws GenericEntityException
GenericEntityExceptionpublic boolean first()
throws GenericEntityException
GenericEntityExceptionpublic void close()
throws GenericEntityException
GenericEntityExceptionpublic GenericValue currentGenericValue() throws GenericEntityException
GenericEntityExceptionpublic int currentIndex()
throws GenericEntityException
GenericEntityExceptionpublic boolean absolute(int rowNum)
throws GenericEntityException
GenericEntityExceptionpublic boolean hasNext()
hasNext in interface Iterator<GenericValue>hasNext in interface ListIterator<GenericValue>public boolean hasPrevious()
hasPrevious in interface ListIterator<GenericValue>public GenericValue next()
next in interface Iterator<GenericValue>next in interface ListIterator<GenericValue>public int nextIndex()
nextIndex in interface ListIterator<GenericValue>public GenericValue previous()
previous in interface ListIterator<GenericValue>public int previousIndex()
previousIndex in interface ListIterator<GenericValue>public void setFetchSize(int rows)
throws GenericEntityException
GenericEntityExceptionpublic List<GenericValue> getCompleteList() throws GenericEntityException
GenericEntityExceptionpublic List<GenericValue> getPartialList(int start, int number) throws GenericEntityException
GenericEntityExceptionpublic void add(GenericValue obj)
add in interface ListIterator<GenericValue>public void remove()
remove in interface Iterator<GenericValue>remove in interface ListIterator<GenericValue>public void set(GenericValue obj)
set in interface ListIterator<GenericValue>Copyright © 2015 Atlassian. All rights reserved.