public class SourceResponseImpl extends ResponseImpl<QueryRequest> implements SourceResponse
SourceResponse.| Modifier and Type | Field and Description |
|---|---|
protected long |
hits |
protected Set<SourceProcessingDetails> |
sourceProcessingDetails |
request| Constructor and Description |
|---|
SourceResponseImpl(QueryRequest request,
List<Result> results)
Instantiates a new SourceResponseImpl with the original query request and results from the
query being executed.
|
SourceResponseImpl(QueryRequest request,
List<Result> results,
Long totalHits)
Instantiates a new SourceResponseImpl.
|
SourceResponseImpl(QueryRequest request,
Map<String,Serializable> properties,
List<Result> results)
Instantiates a new SourceResponseImpl with properties.
|
SourceResponseImpl(QueryRequest request,
Map<String,Serializable> properties,
List<Result> results,
long totalHits)
Instantiates a new SourceResponseImpl with properties and when the total number of hits is
known.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsPropertyName(String name) |
long |
getHits()
|
Set<SourceProcessingDetails> |
getProcessingDetails()
Get any specific details about the execution of the
QueryRequest associated with this
SourceResponse. |
List<Result> |
getResults()
Get the
Results of the associated QueryRequest |
void |
setHits(long hits)
Sets the hits.
|
void |
setWarnings(List<String> warnings)
Sets the warnings associated with the
Source. |
getRequestgetProperties, getPropertyNames, getPropertyValue, hasProperties, setPropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessingErrors, getRequestgetProperties, getPropertyNames, getPropertyValue, hasPropertiesprotected long hits
protected Set<SourceProcessingDetails> sourceProcessingDetails
public SourceResponseImpl(QueryRequest request, List<Result> results)
request - the original requestresults - the results associated with the querypublic SourceResponseImpl(QueryRequest request, List<Result> results, Long totalHits)
request - the original requestresults - the hits associated with the querytotalHits - the total results associated with the query.public SourceResponseImpl(QueryRequest request, Map<String,Serializable> properties, List<Result> results)
request - the original requestproperties - the properties associated with the operationresults - the results associated with the querypublic SourceResponseImpl(QueryRequest request, Map<String,Serializable> properties, List<Result> results, long totalHits)
request - the original requestproperties - the properties associated with the operationresults - the results associated with the querytotalHits - the total hitspublic boolean containsPropertyName(String name)
containsPropertyName in interface OperationcontainsPropertyName in class OperationImplpublic long getHits()
SourceResponseQuery for the associated Source, -1 if unknown. This is typically more than the number of Results returned from SourceResponse.getResults().getHits in interface SourceResponseQuery, -1 if unknown.public void setHits(long hits)
hits - the new hitspublic List<Result> getResults()
SourceResponseResults of the associated QueryRequestgetResults in interface SourceResponsepublic Set<SourceProcessingDetails> getProcessingDetails()
SourceResponseQueryRequest associated with this
SourceResponse. Must not be null.getProcessingDetails in interface SourceResponseThis work is licensed under a Creative Commons Attribution 4.0 International License.