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

org.bklab.flow.base.HasDataProviderFactory 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.binder.HasDataProvider;
import com.vaadin.flow.data.binder.HasItems;
import com.vaadin.flow.data.provider.DataProvider;
import org.bklab.flow.IFlowFactory;

import java.util.Collection;
import java.util.List;
import java.util.Set;

@SuppressWarnings("unchecked")
public interface HasDataProviderFactory, E extends HasDataProviderFactory> extends IFlowFactory, HasItemsFactory {

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

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

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

    default E dataProvider(DataProvider dataProvider) {
        get().setDataProvider(dataProvider);
        return (E) this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy