Interface EntityConditionModel

All Superinterfaces:
TableConditionModel<Attribute<?>>

public interface EntityConditionModel extends TableConditionModel<Attribute<?>>
  • Method Details

    • entityType

      EntityType entityType()
      Returns:
      the type of the entity this table condition model is based on
    • connectionProvider

      EntityConnectionProvider connectionProvider()
      Returns:
      the connection provider
    • setEqualOperand

      <T> boolean setEqualOperand(Attribute<T> attribute, T operand)
      Sets the EQUAL condition operand of the condition model associated with attribute. Enables the condition model in case operand is non-empty or disables it if operand is empty.
      Type Parameters:
      T - the operand type
      Parameters:
      attribute - the attribute
      operand - the search condition operand
      Returns:
      true if the search state changed as a result of this method call, false otherwise
    • setInOperands

      <T> boolean setInOperands(Attribute<T> attribute, Collection<T> operands)
      Sets the IN condition operands of the condition model associated with attribute. Enables the condition model in case operands is non-empty or disables it if operands is empty.
      Type Parameters:
      T - the value type
      Parameters:
      attribute - the attribute
      operands - the search condition operands, an empty Collection for none
      Returns:
      true if the search state changed as a result of this method call, false otherwise
    • where

      Condition where(Conjunction conjunction)
      Returns a WHERE condition based on enabled condition models which are based on non-aggregate function columns.
      Parameters:
      conjunction - the conjunction to use in case of multiple enabled conditions
      Returns:
      the current WHERE condition based on the state of the underlying condition models
    • having

      Condition having(Conjunction conjunction)
      Returns a HAVING condition based on enabled condition models which are based on aggregate function columns.
      Parameters:
      conjunction - the conjunction to use in case of multiple enabled conditions
      Returns:
      the current HAVING condition based on the state of the underlying condition models
    • attribute

      <T> ConditionModel<T> attribute(Attribute<T> attribute)
      Returns the ConditionModel associated with the given attribute.
      Type Parameters:
      T - the column value type
      Parameters:
      attribute - the attribute for which to retrieve the ConditionModel
      Returns:
      the ConditionModel associated with attribute
      Throws:
      IllegalArgumentException - in case no condition model exists for the given attribute
    • entityConditionModel

      static EntityConditionModel entityConditionModel(EntityType entityType, EntityConnectionProvider connectionProvider)
      Creates a new EntityConditionModel
      Parameters:
      entityType - the underlying entity type
      connectionProvider - a EntityConnectionProvider instance
      Returns:
      a new EntityConditionModel instance
    • entityConditionModel

      static EntityConditionModel entityConditionModel(EntityType entityType, EntityConnectionProvider connectionProvider, TableConditionModel.ConditionModelFactory<Attribute<?>> conditionModelFactory)
      Creates a new EntityConditionModel
      Parameters:
      entityType - the underlying entity type
      connectionProvider - a EntityConnectionProvider instance
      conditionModelFactory - provides the column condition models for this table condition model
      Returns:
      a new EntityConditionModel instance