Package org.eclipse.emf.cdo.view
Interface CDOQuery
- All Superinterfaces:
CDOQueryInfo
Provides access to the information that specifies a query from a
view
to a
repository
and to the results of the remote query execution;- Since:
- 2.0
- Author:
- Simon McDuff
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Field Summary
Fields inherited from interface org.eclipse.emf.cdo.common.util.CDOQueryInfo
PARAM_DISABLE_RESPONSE_FLUSHING, PARAM_DISABLE_RESPONSE_TIMEOUT, UNLIMITED_RESULTS
-
Method Summary
Modifier and TypeMethodDescription<T> List<T>
Same asgetResult(Class)
but tries to infer the return type from the static context.<T> List<T>
Sends this query to the server and returns a typedlist
containing the query result.<T> org.eclipse.net4j.util.collection.CloseableIterator<T>
Same asgetResultAsync(Class)
but tries to infer the return type from the static context.<T> org.eclipse.net4j.util.collection.CloseableIterator<T>
getResultAsync
(Class<T> classObject) Sends this query to the server and returns a typediterator
over the query result.<T> T
<T> T
getResultValue
(Class<T> type) getView()
Returns theview
this query was created by and is associated with.setContext
(Object object) Binds an object as the context for this query.setMaxResults
(int maxResults) Sets the maximum number of results to retrieve from the server.setParameter
(String name, Object value) Binds an argument value to a named parameter.unsetParameter
(String name) Removes the value of a named parameter.Methods inherited from interface org.eclipse.emf.cdo.common.util.CDOQueryInfo
getChangeSetData, getContext, getMaxResults, getParameter, getParameters, getQueryLanguage, getQueryString, isLegacyModeEnabled
-
Method Details
-
getView
CDOView getView()Returns theview
this query was created by and is associated with.- Returns:
- Never
null
.
-
getResultAsync
Sends this query to the server and returns a typediterator
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. -
getResultAsync
<T> org.eclipse.net4j.util.collection.CloseableIterator<T> getResultAsync()Same asgetResultAsync(Class)
but tries to infer the return type from the static context.- Since:
- 4.0
-
getResult
Sends this query to the server and returns a typedlist
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. -
getResult
Same asgetResult(Class)
but tries to infer the return type from the static context.- Since:
- 4.0
-
getResultValue
- Since:
- 4.2
-
getResultValue
<T> T getResultValue()- Since:
- 4.2
-
setMaxResults
Sets the maximum number of results to retrieve from the server.- Parameters:
maxResults
- the maximum number of results to retrieve orCDOQueryInfo.UNLIMITED_RESULTS
for no limitation.- Returns:
- the same query instance.
-
setParameter
Binds an argument value to a named parameter.- Parameters:
name
- the parameter namevalue
- the value to bind- Returns:
- the same query instance
- Throws:
IllegalArgumentException
- if the parameter name does not correspond to a parameter in the query string or if the argument value is of incorrect type
-
unsetParameter
Removes the value of a named parameter.- Parameters:
name
- the parameter name- Returns:
- the same query instance
- Since:
- 4.6
-
setContext
Binds an object as the context for this query.- Since:
- 4.0
-