Class RecordGrid.Builder<R extends org.jooq.Record>

java.lang.Object
ch.martinelli.oss.vaadinjooq.ui.RecordGrid.Builder<R>
Type Parameters:
R - The type of the jOOQ Record to use
Enclosing class:
RecordGrid<R extends org.jooq.Record>

public static class RecordGrid.Builder<R extends org.jooq.Record> extends Object
Builder to create the RecordGrid
  • Constructor Details

    • Builder

      public Builder(org.jooq.Table<R> table, org.jooq.DSLContext dslContext)
      Creates the builder
      Parameters:
      table - The jOOQ Table
      dslContext - The jOOQ DSLContext
  • Method Details

    • withColumns

      public RecordGrid.Builder<R> withColumns(org.jooq.TableField<?,?>... columns)
      Specify the columns to display in the grid
      Parameters:
      columns - Grid columns
      Returns:
      The builder
    • withHeaders

      public RecordGrid.Builder<R> withHeaders(String... headers)
      Set the header texts
      Parameters:
      headers - Header texts
      Returns:
      The builder
    • withIdColumns

      public RecordGrid.Builder<R> withIdColumns(org.jooq.TableField<?,?>... idColumns)
      Optional. Set the columns that form the primary key. This is necessary if the Table is a view or has no primary key
      Parameters:
      idColumns - Id columns
      Returns:
      The builder
    • withCondition

      public RecordGrid.Builder<R> withCondition(org.jooq.Condition condition)
      Define a initial filter condition
      Parameters:
      condition - Initial Condition
      Returns:
      The builder
    • withSort

      public RecordGrid.Builder<R> withSort(Map<org.jooq.Field<?>,com.vaadin.flow.data.provider.SortDirection> sort)
      Set the initial sort order
      Parameters:
      sort - Initial sort order
      Returns:
      The builder
    • build

      public RecordGrid<R> build()
      Builds the RecordGrid
      Returns:
      RecordGrid