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
Result s of the associated QueryRequest |
void |
setHits(long hits)
Sets the hits.
|
void |
setWarnings(List<String> warnings)
Sets the warnings associated with the
Source . |
getRequest
getProperties, getPropertyNames, getPropertyValue, hasProperties, setProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProcessingErrors, getRequest
getProperties, getPropertyNames, getPropertyValue, hasProperties
protected 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 Operation
containsPropertyName
in class OperationImpl
public long getHits()
SourceResponse
Query
for the associated Source
, -1 if unknown. This is typically more than the number of Result
s returned from SourceResponse.getResults()
.getHits
in interface SourceResponse
Query
, -1 if unknown.public void setHits(long hits)
hits
- the new hitspublic List<Result> getResults()
SourceResponse
Result
s of the associated QueryRequest
getResults
in interface SourceResponse
public Set<SourceProcessingDetails> getProcessingDetails()
SourceResponse
QueryRequest
associated with this
SourceResponse
. Must not be null.getProcessingDetails
in interface SourceResponse
This work is licensed under a Creative Commons Attribution 4.0 International License.