public static class CMISQLtoNXQL.NXQLtoCMISIterableQueryResult extends Object implements IterableQueryResult, Iterator<Map<String,Serializable>>
| Modifier and Type | Field and Description |
|---|---|
protected IterableQueryResult |
it |
protected Iterator<Map<String,Serializable>> |
iter |
protected Map<String,String> |
realColumns |
protected NuxeoCmisService |
service |
protected Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> |
virtualColumns |
| Constructor and Description |
|---|
NXQLtoCMISIterableQueryResult(IterableQueryResult it,
Map<String,String> realColumns,
Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns,
NuxeoCmisService service) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the query result and releases the underlying resources held by the cursor.
|
boolean |
hasNext() |
boolean |
isLife()
Indicates if the query result has not been closed
|
Iterator<Map<String,Serializable>> |
iterator() |
boolean |
mustBeClosed()
Indicates if the query result must be closed (because it holds resources).
|
Map<String,Serializable> |
next() |
long |
pos()
Gets the current position in the iterator.
|
void |
remove() |
long |
size()
Gets the total size of the query result.
|
void |
skipTo(long pos)
Skips to a given position in the iterator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemainingprotected IterableQueryResult it
protected Iterator<Map<String,Serializable>> iter
protected Map<String,String> realColumns
protected Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns
protected NuxeoCmisService service
public NXQLtoCMISIterableQueryResult(IterableQueryResult it, Map<String,String> realColumns, Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns, NuxeoCmisService service)
public Iterator<Map<String,Serializable>> iterator()
iterator in interface Iterable<Map<String,Serializable>>public void close()
IterableQueryResultThis MUST be called when the query result is no more needed, otherwise underlying resources will be leaked. There is no auto-closing at the end of the iteration.
close in interface Closeableclose in interface AutoCloseableclose in interface IterableQueryResultpublic boolean isLife()
IterableQueryResultisLife in interface IterableQueryResultpublic boolean mustBeClosed()
IterableQueryResultmustBeClosed in interface IterableQueryResulttrue if the query result must be closed, false otherwisepublic long size()
IterableQueryResult
Note that this may be costly, and that some backends may not be able to do this operation, in which case
-1 will be returned.
size in interface IterableQueryResult-1 for an unknown sizepublic long pos()
IterableQueryResult
Positions start at 0.
pos in interface IterableQueryResultpublic void skipTo(long pos)
IterableQueryResult
Positions start at 0.
skipTo in interface IterableQueryResultpublic boolean hasNext()
hasNext in interface Iterator<Map<String,Serializable>>public Map<String,Serializable> next()
next in interface Iterator<Map<String,Serializable>>Copyright © 2019 Nuxeo. All rights reserved.