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

io.seventytwo.vaadinjooq.RecordGrid Maven / Gradle / Ivy

The newest version!
package io.seventytwo.vaadinjooq;

import com.vaadin.flow.component.grid.Grid;
import org.jooq.Record;
import org.jooq.TableField;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class RecordGrid extends Grid {

    public RecordGrid(Class clazz) {
        super(clazz);
    }

    public void setColumns(TableField... fields) {
        List propertyNames = Arrays.stream(fields).map(field -> JooqUtil.getPropertyName(field)).collect(Collectors.toList());
        super.setColumns(propertyNames.toArray(new String[propertyNames.size()]));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy