Class CustomWrapperConditionHolder

java.lang.Object
com.denodo.vdb.engine.customwrapper.condition.CustomWrapperConditionHolder

public final class CustomWrapperConditionHolder extends Object
Encapsulates a CustomWrapperCondition and its representation as a Map<CustomWrapperFieldExpression, Object>. This is a simplified version of the condition defined by the CustomWrapperCondition instance, available to the users for convenience. For a CustomWrapperCondition to be available as a Map, it must comply with the following requirements:
  • The CustomWrapperCondition is either a simple condition or an AND condition which encapsulates either simple conditions or AND conditions.
  • Any simple condition encapsulated by the CustomWrapperCondition must comply with this pattern: FIELD = value.
Users may call getConditionMap(boolean) (with true as a parameter) to obtain a Map even if the CustomWrapperCondition does not comply with the explained requirements. Note that, in this case, information loss may occur.
  • Constructor Details

    • CustomWrapperConditionHolder

      public CustomWrapperConditionHolder(CustomWrapperCondition complexCondition)
      Creates an instance of CustomWrapperConditionHolder encapsulating a condition and generates its Map<CustomWrapperFieldExpression, Object> version.

      Users do not need to instantiate this class.

      Parameters:
      complexCondition - the encapsulated condition
  • Method Details

    • getComplexCondition

      public CustomWrapperCondition getComplexCondition()
      Returns:
      the encapsulated CustomWrapperCondition.
    • getConditionMap

      public Map<CustomWrapperFieldExpression,Object> getConditionMap()
      Returns:
      the Map version of the encapsulated CustomWrapperCondition, or null if the condition does not comply with the requirements (see CustomWrapperConditionHolder).
    • getConditionMap

      public Map<CustomWrapperFieldExpression,Object> getConditionMap(boolean force)
      Parameters:
      force - true if the conversion is going to be forced, false otherwise. Note that if this parameter is true, the returned Map may not be equivalent to the encapsulated CustomWrapperCondition.
      Returns:
      the Map version of the encapsulated CustomWrapperCondition, or null if the condition does not comply with the requirements (see CustomWrapperConditionHolder), unless force is set to true.