public interface CDOQuery extends CDOQueryInfo
view
to a
repository
and to the results of the remote query execution;Object
oneway - - contextList
- - result, CloseableIterator
- - resultAsyncMap.Entry
- - parametersPARAM_DISABLE_RESPONSE_FLUSHING, UNLIMITED_RESULTS
Modifier and Type | Method and Description |
---|---|
<T> List<T> |
getResult()
Same as
getResult(Class) but tries to infer the return type from the static context. |
<T> List<T> |
getResult(Class<T> type)
Sends this query to the server and returns a typed
list containing the query result. |
<T> CloseableIterator<T> |
getResultAsync()
Same as
getResultAsync(Class) but tries to infer the return type from the static context. |
<T> CloseableIterator<T> |
getResultAsync(Class<T> classObject)
Sends this query to the server and returns a typed
iterator over the query result. |
<T> T |
getResultValue() |
<T> T |
getResultValue(Class<T> type) |
CDOView |
getView()
Returns the
view this query was created by and is associated with. |
CDOQuery |
setContext(Object object)
Binds an object as the context for this query.
|
CDOQuery |
setMaxResults(int maxResults)
Sets the maximum number of results to retrieve from the server.
|
CDOQuery |
setParameter(String name,
Object value)
Binds an argument value to a named parameter.
|
CDOQuery |
unsetParameter(String name)
Removes the value of a named parameter.
|
getChangeSetData, getContext, getMaxResults, getParameter, getParameters, getQueryLanguage, getQueryString, isLegacyModeEnabled
CDOView getView()
view
this query was created by and is associated with.null
.<T> CloseableIterator<T> getResultAsync(Class<T> classObject)
iterator
over the query result.
As opposed to the getResult(Class)
method, this method asynchronously communicates with the server.
In other words, the returned iterator can be used immediately, even if the server is still about to send pending
result elements.
<T> CloseableIterator<T> getResultAsync()
getResultAsync(Class)
but tries to infer the return type from the static context.<T> List<T> getResult(Class<T> type)
list
containing the query result.
As opposed to the getResultAsync(Class)
method, this method synchronously communicates with the
server. In other words, the result list is only returned after all result elements have been received by the
client.
<T> List<T> getResult()
getResult(Class)
but tries to infer the return type from the static context.<T> T getResultValue(Class<T> type)
<T> T getResultValue()
CDOQuery setMaxResults(int maxResults)
maxResults
- the maximum number of results to retrieve or CDOQueryInfo.UNLIMITED_RESULTS
for no limitation.CDOQuery setParameter(String name, Object value)
name
- the parameter namevalue
- the value to bindIllegalArgumentException
- if the parameter name does not correspond to a parameter in the query string or if the argument value is
of incorrect typeCDOQuery unsetParameter(String name)
name
- the parameter nameCopyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html