Interface EntityTableConditionModel

    • Method Detail

      • entityType

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

        EntityDefinition entityDefinition()
        Returns:
        the underlying entity definition
      • setEqualConditionValues

        <T> boolean setEqualConditionValues​(Attribute<T> attribute,
                                            Collection<T> values)
        Sets the search condition values of the condition model associated with attribute.
        Type Parameters:
        T - the value type
        Parameters:
        attribute - the attribute
        values - the search condition values
        Returns:
        true if the search state changed as a result of this method call, false otherwise
      • setEqualFilterValue

        <T> void setEqualFilterValue​(Attribute<T> attribute,
                                     Comparable<T> value)
        Sets the condition value of the filter model associated with attribute.
        Type Parameters:
        T - the value type
        Parameters:
        attribute - the attribute
        value - the condition value
      • condition

        Condition condition()
        Returns:
        the current condition based on the state of the underlying condition models
      • getAdditionalConditionSupplier

        Supplier<Condition> getAdditionalConditionSupplier()
        Returns:
        supplies any additional search condition, not based on any individual property condition
      • setAdditionalConditionSupplier

        void setAdditionalConditionSupplier​(Supplier<Condition> additionalConditionSupplier)
        Sets the additional condition supplier, one not based on any individual property condition. This condition supplier may return null in case of no condition.
        Parameters:
        additionalConditionSupplier - the condition supplier
      • isConditionEnabled

        boolean isConditionEnabled()
        Returns:
        true if any of the underlying condition models are enabled
      • isConditionEnabled

        boolean isConditionEnabled​(Attribute<?> attribute)
        Parameters:
        attribute - the column attribute
        Returns:
        true if the ColumnConditionModel associated with the given attribute is enabled
      • getConjunction

        Conjunction getConjunction()
        Returns:
        the conjunction to be used when multiple column condition are active, the default is Conjunction.AND
        See Also:
        Conjunction
      • setConjunction

        void setConjunction​(Conjunction conjunction)
        Parameters:
        conjunction - the conjunction to be used when more than one column search condition is active
        See Also:
        Conjunction
      • clearConditions

        void clearConditions()
        Clears the search state of all the condition models, disables them and resets the operator to Operator.EQUAL
      • filterModels

        Map<Attribute<?>,​ColumnFilterModel<Entity,​Attribute<?>,​?>> filterModels()
        Returns:
        a Map containing the filter models available in this table condition model, mapped to their respective attributes
      • clearFilters

        void clearFilters()
        Clears the search state of all the filter models, disables them and resets the operator to Operator.EQUAL
      • isFilterEnabled

        boolean isFilterEnabled()
        Returns:
        true if any of the underlying filter models are enabled
      • isFilterEnabled

        boolean isFilterEnabled​(Attribute<?> attribute)
        Parameters:
        attribute - column attribute
        Returns:
        true if the filter model behind column with index columnIndex is enabled
      • refresh

        void refresh()
        Refreshes any data bound models in this table condition model
      • addConditionChangedListener

        void addConditionChangedListener​(EventDataListener<Condition> listener)
        Parameters:
        listener - a listener notified each time the search condition changes
      • removeConditionChangedListener

        void removeConditionChangedListener​(EventDataListener<Condition> listener)
        Parameters:
        listener - the listener to remove