Class CardinalityResponseImplWithoutCardinality

java.lang.Object
se.liu.ida.hefquin.engine.federation.access.impl.response.CardinalityResponseImpl
se.liu.ida.hefquin.engine.federation.access.impl.response.CardinalityResponseImplWithoutCardinality
All Implemented Interfaces:
CardinalityResponse, DataRetrievalResponse<Integer>

public class CardinalityResponseImplWithoutCardinality extends CardinalityResponseImpl
A subclass of CardinalityResponseImpl representing a response where the cardinality is not available. This implementation wraps a DataRetrievalResponse and a DataRetrievalRequest and captures the exception that occurred, while assigning Integer.MAX_VALUE as a placeholder for the unknown cardinality.
  • Field Details

    • exception

      protected final Exception exception
  • Constructor Details

    • CardinalityResponseImplWithoutCardinality

      public CardinalityResponseImplWithoutCardinality(Exception exception, DataRetrievalResponse<?> wrappedResponse, DataRetrievalRequest request)
      Constructs a CardinalityResponseImplWithoutCardinality with the given exception.
      Parameters:
      exception - the exception that caused the absence of cardinality/cardinality estimate
      wrappedResponse - the original data retrieval response
      request - the original data retrieval request
  • Method Details

    • getException

      public Exception getException()
      Returns the exception that caused the absence of cardinality/cardinality estimate.
      Returns:
      the associated exception