Package ddf.catalog.operation.impl
Class SourceResponseImpl
java.lang.Object
ddf.catalog.operation.impl.OperationImpl
ddf.catalog.operation.impl.ResponseImpl<ddf.catalog.operation.QueryRequest>
ddf.catalog.operation.impl.SourceResponseImpl
- All Implemented Interfaces:
ddf.catalog.operation.Operation,ddf.catalog.operation.Response<ddf.catalog.operation.QueryRequest>,ddf.catalog.operation.SourceResponse,Serializable
public class SourceResponseImpl
extends ResponseImpl<ddf.catalog.operation.QueryRequest>
implements ddf.catalog.operation.SourceResponse
The SourceResponseImpl represents a default implementation of the
SourceResponse.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected Set<ddf.catalog.operation.SourceProcessingDetails>Fields inherited from class ddf.catalog.operation.impl.ResponseImpl
request -
Constructor Summary
ConstructorsConstructorDescriptionSourceResponseImpl(ddf.catalog.operation.QueryRequest request, List<ddf.catalog.data.Result> results) Instantiates a new SourceResponseImpl with the original query request and results from the query being executed.SourceResponseImpl(ddf.catalog.operation.QueryRequest request, List<ddf.catalog.data.Result> results, Long totalHits) Instantiates a new SourceResponseImpl.SourceResponseImpl(ddf.catalog.operation.QueryRequest request, Map<String, Serializable> properties, List<ddf.catalog.data.Result> results) Instantiates a new SourceResponseImpl with properties.SourceResponseImpl(ddf.catalog.operation.QueryRequest request, Map<String, Serializable> properties, List<ddf.catalog.data.Result> results, long totalHits) Instantiates a new SourceResponseImpl with properties and the total number of hitsSourceResponseImpl(ddf.catalog.operation.QueryRequest request, Map<String, Serializable> properties, List<ddf.catalog.data.Result> results, long totalHits, Set<ddf.catalog.operation.SourceProcessingDetails> sourceProcessingDetails) Instantiates a new SourceResponseImpl with properties, the total number of hits, and details. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsPropertyName(String name) longgetHits()Set<ddf.catalog.operation.SourceProcessingDetails>List<ddf.catalog.data.Result>voidsetHits(long hits) Sets the hits.voidsetWarnings(List<String> warnings) Sets the warnings associated with theSource.Methods inherited from class ddf.catalog.operation.impl.ResponseImpl
getRequestMethods inherited from class ddf.catalog.operation.impl.OperationImpl
getProperties, getPropertyNames, getPropertyValue, hasProperties, setPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ddf.catalog.operation.Operation
getProperties, getPropertyNames, getPropertyValue, hasPropertiesMethods inherited from interface ddf.catalog.operation.Response
getProcessingErrors, getRequest
-
Field Details
-
hits
protected long hits -
sourceProcessingDetails
-
-
Constructor Details
-
SourceResponseImpl
public SourceResponseImpl(ddf.catalog.operation.QueryRequest request, List<ddf.catalog.data.Result> results) Instantiates a new SourceResponseImpl with the original query request and results from the query being executed.- Parameters:
request- the original requestresults- the results associated with the query
-
SourceResponseImpl
public SourceResponseImpl(ddf.catalog.operation.QueryRequest request, List<ddf.catalog.data.Result> results, Long totalHits) Instantiates a new SourceResponseImpl. Use when the total amount of hits is known.- Parameters:
request- the original requestresults- the hits associated with the querytotalHits- the total results associated with the query.
-
SourceResponseImpl
public SourceResponseImpl(ddf.catalog.operation.QueryRequest request, Map<String, Serializable> properties, List<ddf.catalog.data.Result> results) Instantiates a new SourceResponseImpl with properties.- Parameters:
request- the original requestproperties- the properties associated with the operationresults- the results associated with the query
-
SourceResponseImpl
public SourceResponseImpl(ddf.catalog.operation.QueryRequest request, Map<String, Serializable> properties, List<ddf.catalog.data.Result> results, long totalHits) Instantiates a new SourceResponseImpl with properties and the total number of hits- Parameters:
request- the original requestproperties- the properties associated with the operationresults- the results associated with the querytotalHits- the total hits
-
SourceResponseImpl
public SourceResponseImpl(ddf.catalog.operation.QueryRequest request, Map<String, Serializable> properties, List<ddf.catalog.data.Result> results, long totalHits, Set<ddf.catalog.operation.SourceProcessingDetails> sourceProcessingDetails) Instantiates a new SourceResponseImpl with properties, the total number of hits, and details.- Parameters:
request- the original requestproperties- the properties associated with the operationresults- the results associated with the querytotalHits- the number of distinct results from the querysourceProcessingDetails- the set of details which contain applicable warnings about how the source processed the query
-
-
Method Details
-
containsPropertyName
- Specified by:
containsPropertyNamein interfaceddf.catalog.operation.Operation- Overrides:
containsPropertyNamein classOperationImpl
-
getHits
public long getHits()- Specified by:
getHitsin interfaceddf.catalog.operation.SourceResponse
-
setHits
public void setHits(long hits) Sets the hits.- Parameters:
hits- the new hits
-
getResults
- Specified by:
getResultsin interfaceddf.catalog.operation.SourceResponse
-
getProcessingDetails
- Specified by:
getProcessingDetailsin interfaceddf.catalog.operation.SourceResponse
-
setWarnings
Sets the warnings associated with theSource.- Parameters:
warnings- the new warnings associated with theSource.
-