Class JooqUtil
java.lang.Object
ch.martinelli.oss.vaadinjooq.util.JooqUtil
A utility class with helper methods that uses the jOOQ generate metamodel
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.jooq.OrderField<?>[]createOrderBy(org.jooq.Table<?> table, List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders) Converts a VaadinQuerySortOrderto an array of jOOQOrderFieldstatic org.jooq.Field<?>Returns theFieldbase from a table based on a property namestatic StringgetHeaderText(org.jooq.Field<?> field) Returns the header text based on a jOOQFieldConverts upper with _ delimiter to wordsstatic StringgetPropertyName(org.jooq.Field<?> field) Returns the property name base on a jOOQFieldConverts upper with _ delimiter to camel case
-
Method Details
-
getPropertyName
Returns the property name base on a jOOQFieldConverts upper with _ delimiter to camel case- Parameters:
field- The field- Returns:
- The property name
-
getHeaderText
Returns the header text based on a jOOQFieldConverts upper with _ delimiter to words- Parameters:
field- The field- Returns:
- The header text
-
getField
Returns theFieldbase from a table based on a property name- Parameters:
table- The tablepropertyName- The property name- Returns:
- The field
-
createOrderBy
public static org.jooq.OrderField<?>[] createOrderBy(org.jooq.Table<?> table, List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders) Converts a VaadinQuerySortOrderto an array of jOOQOrderField- Parameters:
table- The tablesortOrders- The sort orders- Returns:
- An array of order fields
-