Interface EntityTableConditionModel

All Superinterfaces:
TableConditionModel<Attribute<?>>

public interface EntityTableConditionModel extends TableConditionModel<Attribute<?>>
This interface defines filtering functionality, which refers to showing/hiding entities already available in a table model and searching functionality, which refers to configuring the underlying query, which then needs to be re-run.
Factory for EntityTableConditionModel instances via entityTableConditionModel(EntityType, EntityConnectionProvider, ColumnConditionModel.Factory)
  • 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
    • setEqualConditionValue

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

      <T> boolean setInConditionValues(Attribute<T> attribute, Collection<T> values)
      Sets the IN condition values of the condition model associated with attribute. Enables the condition model in case value is non-empty or disables it if values is empty.
      Type Parameters:
      T - the value type
      Parameters:
      attribute - the attribute
      values - the search condition values, 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
    • additionalWhere

      Value<Supplier<Condition>> additionalWhere()
      Controls the additional where condition. The condition supplier may return null in case of no condition.
      Returns:
      the value controlling the additional where condition
    • additionalHaving

      Value<Supplier<Condition>> additionalHaving()
      Controls the additional having condition. The condition supplier may return null in case of no condition.
      Returns:
      the value controlling the additional having condition
    • attributeModel

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

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

      static EntityTableConditionModel entityTableConditionModel(EntityType entityType, EntityConnectionProvider connectionProvider, ColumnConditionModel.Factory<Attribute<?>> conditionModelFactory)
      Parameters:
      entityType - the underlying entity type
      connectionProvider - a EntityConnectionProvider instance
      conditionModelFactory - provides the column condition models for this table condition model
      Returns:
      a new EntityTableConditionModel instance