Package ch.martinelli.oss.vaadinjooq.ui
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>
Builder to create the
RecordGrid-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theRecordGridwithColumns(org.jooq.TableField<?, ?>... columns) Specify the columns to display in the gridwithCondition(org.jooq.Condition condition) Define a initial filter conditionwithHeaders(String... headers) Set the header textswithIdColumns(org.jooq.TableField<?, ?>... idColumns) Optional.Set the initial sort order
-
Constructor Details
-
Builder
Creates the builder- Parameters:
table- The jOOQTabledslContext- The jOOQDSLContext
-
-
Method Details
-
withColumns
Specify the columns to display in the grid- Parameters:
columns- Grid columns- Returns:
- The builder
-
withHeaders
Set the header texts- Parameters:
headers- Header texts- Returns:
- The builder
-
withIdColumns
Optional. Set the columns that form the primary key. This is necessary if theTableis a view or has no primary key- Parameters:
idColumns- Id columns- Returns:
- The builder
-
withCondition
Define a initial filter condition- Parameters:
condition- InitialCondition- 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
Builds theRecordGrid- Returns:
- RecordGrid
-