final class DefaultIItemResultSet extends java.lang.Object implements IItemResultSet
IItemResultSet.| Modifier and Type | Field and Description |
|---|---|
private java.util.List<IAggregator<?,?>> |
aggregators |
private java.util.List<IAttribute<?>> |
attributes |
private int |
cursor |
private java.util.ArrayList<java.lang.Object[]> |
data |
private java.util.Map<java.lang.String,ColumnInfo> |
info |
private IItemQuery |
query |
| Constructor and Description |
|---|
DefaultIItemResultSet(IItemCollection items,
IItemQuery query) |
| Modifier and Type | Method and Description |
|---|---|
private void |
calculateData(IItemCollection input) |
java.util.Map<java.lang.String,ColumnInfo> |
getColumnMetadata()
Returns the column metadata for the result set.
|
private static java.lang.Object |
getFirstNonNull(IItemCollection items,
IAttribute<?> attribute)
Returns the first encountered non-null attribute value, or null if no non-null value could be
found.
|
private int |
getNoOfColumns() |
IItemQuery |
getQuery()
Returns the query used to create the result set.
|
java.lang.Object |
getValue(int column)
Returns the value for the specified column, at the current row.
|
private void |
initializeMetadata() |
private java.lang.Object[] |
newRow() |
boolean |
next()
Advances the cursor to the next row in the result set.
|
private final IItemQuery query
private final java.util.List<IAttribute<?>> attributes
private final java.util.List<IAggregator<?,?>> aggregators
private final java.util.Map<java.lang.String,ColumnInfo> info
private final java.util.ArrayList<java.lang.Object[]> data
private int cursor
DefaultIItemResultSet(IItemCollection items, IItemQuery query)
private void calculateData(IItemCollection input)
private static java.lang.Object getFirstNonNull(IItemCollection items, IAttribute<?> attribute)
items - the items to search.attribute - the attribute to look for.private java.lang.Object[] newRow()
private void initializeMetadata()
public IItemQuery getQuery()
IItemResultSetgetQuery in interface IItemResultSetpublic java.lang.Object getValue(int column)
throws ItemResultSetException
IItemResultSetgetValue in interface IItemResultSetcolumn - the column for which to return the value.ItemResultSetException - if there was a problem reading the value, such as the cursor not being at a
value, the column not existing etc.private int getNoOfColumns()
public java.util.Map<java.lang.String,ColumnInfo> getColumnMetadata()
IItemResultSetgetColumnMetadata in interface IItemResultSetpublic boolean next()
IItemResultSetnext in interface IItemResultSet