All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bklab.flow.base.HasLazyDataViewFactory Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
package org.bklab.flow.base;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.data.provider.BackEndDataProvider;
import com.vaadin.flow.data.provider.CallbackDataProvider;
import com.vaadin.flow.data.provider.HasLazyDataView;
import com.vaadin.flow.data.provider.LazyDataView;
import org.bklab.flow.IFlowFactory;

@SuppressWarnings("unchecked")
public interface HasLazyDataViewFactory,
        C extends Component & HasLazyDataView,
        E extends HasLazyDataViewFactory> extends IFlowFactory {

    default E items(CallbackDataProvider.FetchCallback fetchCallback) {
        get().setItems(fetchCallback);
        return (E) this;
    }

    default E items(CallbackDataProvider.FetchCallback fetchCallback,
                    CallbackDataProvider.CountCallback countCallback) {
        get().setItems(fetchCallback, countCallback);
        return (E) this;
    }

    default E items(BackEndDataProvider backEndDataProvider) {
        get().setItems(backEndDataProvider);
        return (E) this;
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy