diff options
author | Leif Åstrand <legioth@gmail.com> | 2017-01-19 09:12:24 +0200 |
---|---|---|
committer | Denis <denis@vaadin.com> | 2017-01-19 09:12:24 +0200 |
commit | dafc8310259a2e79bb203c7f786c9aba5354937b (patch) | |
tree | fb79a51b356e867f405238ec013faa58c6861930 /documentation | |
parent | 67d69c8d5d6bb066c792cfaa65f2b68f6ec8cc2b (diff) | |
download | vaadin-framework-dafc8310259a2e79bb203c7f786c9aba5354937b.tar.gz vaadin-framework-dafc8310259a2e79bb203c7f786c9aba5354937b.zip |
Change BackEndDataProvider into an interface (#8268)
* Change BackEndDataProvider into an interface
BackEndDataProvider is now an interface with methods for setting
sorting options based on SortOrder instances.
AbstractBackEndDataProvider stores sorting options, combines them with
the sorting provided in the query and invokes its own abstract fetch and
size methods.
CallbackDataProvider implements a BackEndDataProvider based on two
lambdas.
This is one of many steps towards #8245
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/datamodel/datamodel-providers.asciidoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/documentation/datamodel/datamodel-providers.asciidoc b/documentation/datamodel/datamodel-providers.asciidoc index a7acc1e10e..cff31f6b0e 100644 --- a/documentation/datamodel/datamodel-providers.asciidoc +++ b/documentation/datamodel/datamodel-providers.asciidoc @@ -215,7 +215,7 @@ The sorting options set through the component will be available through [interfa [source, java] ---- -DataProvider<Person, Void> dataProvider = new BackEndDataProvider<>( +DataProvider<Person, Void> dataProvider = new CallbackDataProvider<>( query -> { List<PersonSort> sortOrders = new ArrayList<>(); for(SortOrder<String> queryOrder : query.getSortOrders()) { @@ -362,7 +362,7 @@ It would then look for a string to filter by in the query and pass it to the ser [source, java] ---- -DataProvider<Person, String> dataProvider = new BackEndDataProvider<>( +DataProvider<Person, String> dataProvider = new CallbackDataProvider<>( query -> { // getFilter returns Optional<String> String filter = query.getFilter().orElse(null); |