Interface Filterable<T extends Component<?>>

All Known Implementing Classes:
ActivityStream, ComboboxItem, DualListBox, ListGrid, RadioButtonItem, Timeline, Treeview

public interface Filterable<T extends Component<?>>

The interface specifies components that retrieve their value from a DataDescriptor and support filtering.

The interface implements methods which help developers set a filter criterion and perform a query from the database. You also have to implement get and set methods for automatic data query.

See interface method descriptions for more details.

Since:
4.0
Author:
JBStrap
  • Method Summary

    Modifier and Type
    Method
    Description
    Fetches data from the database.
    Gets the filter criteria used to query the component data.
    boolean
    Checks if the component automatically queries the data from the database upon being displayed.
    setAutoFetchData(boolean autoFetch)
    Sets if the component automatically queries the data from the database upon being displayed.
    Sets the simple filter criterion used to query the component data.
  • Method Details

    • getCriteria

      Criteria getCriteria()
      Gets the filter criteria used to query the component data. If the component uses default and custom criteria as well, the method returns the two criteria joined with an AND operator.
      Returns:
      Criterion used to filter data or null if data query is performed without filtering
    • fetchData

      T fetchData()
      Fetches data from the database. During the query, the previously set filter criteria will be used, that is, the criteria returned by the getCriteria() method has to be used.
      Returns:
      The filterable component
    • setFilterCriteria

      T setFilterCriteria(Criteria criteria)
      Sets the simple filter criterion used to query the component data.
      Parameters:
      criteria - Filter criterion used to query the data If null is set, the previous filter criterion is deleted.
      Returns:
      Filterable component
    • setAutoFetchData

      T setAutoFetchData(boolean autoFetch)
      Sets if the component automatically queries the data from the database upon being displayed.
      Parameters:
      autoFetch - If true is set, the component automatically performs data query upon being displayed If false is specified, data query is not performed automatically. It must be implemented by calling the fetchData() method.
      Returns:
      Filterable component
    • isAutoFetchData

      boolean isAutoFetchData()
      Checks if the component automatically queries the data from the database upon being displayed.
      Returns:
      If true is returned, the component automatically performs data query upon being displayed If false, the data query is not automatic; it must be implemented by calling the fetchData() method.