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 Details

    • hits

      protected long hits
    • sourceProcessingDetails

      protected Set<ddf.catalog.operation.SourceProcessingDetails> 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 request
      results - 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 request
      results - the hits associated with the query
      totalHits - 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 request
      properties - the properties associated with the operation
      results - 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 request
      properties - the properties associated with the operation
      results - the results associated with the query
      totalHits - 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 request
      properties - the properties associated with the operation
      results - the results associated with the query
      totalHits - the number of distinct results from the query
      sourceProcessingDetails - the set of details which contain applicable warnings about how the source processed the query
  • Method Details

    • containsPropertyName

      public boolean containsPropertyName(String name)
      Specified by:
      containsPropertyName in interface ddf.catalog.operation.Operation
      Overrides:
      containsPropertyName in class OperationImpl
    • getHits

      public long getHits()
      Specified by:
      getHits in interface ddf.catalog.operation.SourceResponse
    • setHits

      public void setHits(long hits)
      Sets the hits.
      Parameters:
      hits - the new hits
    • getResults

      public List<ddf.catalog.data.Result> getResults()
      Specified by:
      getResults in interface ddf.catalog.operation.SourceResponse
    • getProcessingDetails

      public Set<ddf.catalog.operation.SourceProcessingDetails> getProcessingDetails()
      Specified by:
      getProcessingDetails in interface ddf.catalog.operation.SourceResponse
    • setWarnings

      public void setWarnings(List<String> warnings)
      Sets the warnings associated with the
      invalid reference
      Source
      .
      Parameters:
      warnings - the new warnings associated with the
      invalid reference
      Source
      .