Class JooqUtil

java.lang.Object
ch.martinelli.oss.vaadinjooq.util.JooqUtil

public class JooqUtil extends Object
A utility class with helper methods that uses the jOOQ generate metamodel
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.jooq.OrderField<?>[]
    createOrderBy(org.jooq.Table<?> table, List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders)
    Converts a Vaadin QuerySortOrder to an array of jOOQ OrderField
    static org.jooq.Field<?>
    getField(org.jooq.Table<?> table, String propertyName)
    Returns the Field base from a table based on a property name
    static String
    getHeaderText(org.jooq.Field<?> field)
    Returns the header text based on a jOOQ Field Converts upper with _ delimiter to words
    static String
    getPropertyName(org.jooq.Field<?> field)
    Returns the property name base on a jOOQ Field Converts upper with _ delimiter to camel case

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getPropertyName

      public static String getPropertyName(org.jooq.Field<?> field)
      Returns the property name base on a jOOQ Field Converts upper with _ delimiter to camel case
      Parameters:
      field - The field
      Returns:
      The property name
    • getHeaderText

      public static String getHeaderText(org.jooq.Field<?> field)
      Returns the header text based on a jOOQ Field Converts upper with _ delimiter to words
      Parameters:
      field - The field
      Returns:
      The header text
    • getField

      public static org.jooq.Field<?> getField(org.jooq.Table<?> table, String propertyName)
      Returns the Field base from a table based on a property name
      Parameters:
      table - The table
      propertyName - 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 Vaadin QuerySortOrder to an array of jOOQ OrderField
      Parameters:
      table - The table
      sortOrders - The sort orders
      Returns:
      An array of order fields