|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.clients.web.servlet.PlotServlet.CFResultIterator
private static class PlotServlet.CFResultIterator
Special implementation of a SqlResultIterator
that combines the result from the parent and child into
one virtual iterator. The parent iterator must select
the following columns in this order: postion, parent M, parent A.
The child iterator must selected the following columns in this order:
position, child M.
The we map our own columns like this: a --> parent A, m --> parent M, cf --> parent M - child M
Field Summary | |
---|---|
private SqlResultIterator |
child
|
private PlotServlet.CFSqlResult |
next
|
private SqlResultIterator |
parent
|
Constructor Summary | |
---|---|
PlotServlet.CFResultIterator(SqlResultIterator parent,
SqlResultIterator child)
|
Method Summary | |
---|---|
void |
close()
Close the iterator and immediately release all resources associated with it. |
int |
getIndex(String name)
Get the index number of a selected column. |
long |
getTotalCount()
Get the total number of items returned by the query, ignoring any limits set by Query.setFirstResult(int) and
Query.setMaxResults(int) . |
boolean |
hasNext()
|
boolean |
isClosed()
Check if the iterator has been closed. |
SqlResult |
next()
|
void |
remove()
Not supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final SqlResultIterator parent
private final SqlResultIterator child
private final PlotServlet.CFSqlResult next
Constructor Detail |
---|
PlotServlet.CFResultIterator(SqlResultIterator parent, SqlResultIterator child)
Method Detail |
---|
public boolean hasNext()
hasNext
in interface Iterator<SqlResult>
public SqlResult next()
next
in interface Iterator<SqlResult>
public void remove()
remove
in interface Iterator<SqlResult>
UnsupportedOperationException
- Alwayspublic long getTotalCount()
QueryResult
Query.setFirstResult(int)
and
Query.setMaxResults(int)
. If the
Query.setReturnTotalCount(boolean)
hasn't been enabled this method may
not return a correct value.
getTotalCount
in interface QueryResult
Query.setReturnTotalCount(boolean)
public void close()
ResultIterator
close
in interface ResultIterator<SqlResult>
public boolean isClosed()
ResultIterator
isClosed
in interface ResultIterator<SqlResult>
public int getIndex(String name) throws SQLException
SqlResultIterator
SqlResult.getXxx(index)
methods to get the value of that column.
getIndex
in interface SqlResultIterator
name
- The name of a selected column
SQLException
- If there is an error
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |