Class ApplicationDataProvider

  • All Implemented Interfaces:
    com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<Jobs,​com.vaadin.flow.function.SerializablePredicate<Jobs>,​com.vaadin.flow.function.SerializablePredicate<Jobs>>, com.vaadin.flow.data.provider.DataProvider<Jobs,​com.vaadin.flow.function.SerializablePredicate<Jobs>>, com.vaadin.flow.data.provider.InMemoryDataProvider<Jobs>, Serializable

    public class ApplicationDataProvider
    extends com.vaadin.flow.data.provider.ListDataProvider<Jobs>
    This class provides filtering and other "CRUD" operations for Jobs objects on the "My Application" page.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ApplicationDataProvider()
      Constructor to pull a list of job objects to the data service.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(Jobs job)
      Delete given product from the backing data service.
      Integer getId​(Jobs job)
      Get jobid based on job object
      void save​(Jobs job)
      Store given product to the backing data service.
      List<Jobs> updateList​(String filterText)
      Filters the data for the specific filter text
      • Methods inherited from class com.vaadin.flow.data.provider.ListDataProvider

        fetch, getFilter, getItems, getSortComparator, setFilter, setSortComparator, size
      • Methods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider

        addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem, refreshItem
      • Methods inherited from interface com.vaadin.flow.data.provider.DataProvider

        addDataProviderListener, refreshAll, refreshItem, refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
      • Methods inherited from interface com.vaadin.flow.data.provider.InMemoryDataProvider

        addFilter, addFilter, addFilterByValue, addSortComparator, addSortOrder, clearFilters, filteringBy, filteringBy, filteringByEquals, filteringByPrefix, filteringByPrefix, filteringBySubstring, filteringBySubstring, isInMemory, setFilter, setFilterByValue, setSortOrder
    • Constructor Detail

      • ApplicationDataProvider

        public ApplicationDataProvider()
        Constructor to pull a list of job objects to the data service.
    • Method Detail

      • save

        public void save​(Jobs job)
        Store given product to the backing data service.
        Parameters:
        job - the updated or new product
        Throws:
        IllegalArgumentException - thrown if there is a format issue parsing the CSV files for the user
      • delete

        public void delete​(Jobs job)
        Delete given product from the backing data service.
        Parameters:
        job - the job to be deleted
        Throws:
        IllegalArgumentException - thrown if the data cannot be stored to the CSV file
        NumberFormatException - thrown if the data cannot be stored to the CSV file
      • updateList

        public List<Jobs> updateList​(String filterText)
        Filters the data for the specific filter text
        Parameters:
        filterText - string to filter by
        Returns:
        list of jobs that match the filter text
      • getId

        public Integer getId​(Jobs job)
        Get jobid based on job object
        Parameters:
        job - object