Class ApplicationDataProvider
- java.lang.Object
-
- com.vaadin.flow.data.provider.AbstractDataProvider<T,com.vaadin.flow.function.SerializablePredicate<T>>
-
- com.vaadin.flow.data.provider.ListDataProvider<Jobs>
-
- com.group21.jobTracker.ui.application.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 voiddelete(Jobs job)Delete given product from the backing data service.IntegergetId(Jobs job)Get jobid based on job objectvoidsave(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
-
-
-
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 fileNumberFormatException- 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
-
-