Class JooqRepository

java.lang.Object
ch.martinelli.oss.vaadinjooq.repository.JooqRepository

public class JooqRepository extends Object
Convenience methods using DSLContext
  • Constructor Summary

    Constructors
    Constructor
    Description
    JooqRepository(org.jooq.DSLContext dslContext)
    Requires DSLContext
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends org.jooq.Record>
    int
    count(org.jooq.Table<T> table, org.jooq.Condition condition)
    Count method similar to @see findAll
    <T extends org.jooq.Record>
    List<T>
    findAll(org.jooq.Table<T> table, org.jooq.Condition condition, Map<org.jooq.Field<?>,com.vaadin.flow.data.provider.SortDirection> orderBy, int offset, int limit)
    Convenience findAll

    Methods inherited from class java.lang.Object

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

    • JooqRepository

      public JooqRepository(org.jooq.DSLContext dslContext)
      Requires DSLContext
      Parameters:
      dslContext - The DSLContext to use
  • Method Details

    • findAll

      public <T extends org.jooq.Record> List<T> findAll(org.jooq.Table<T> table, org.jooq.Condition condition, Map<org.jooq.Field<?>,com.vaadin.flow.data.provider.SortDirection> orderBy, int offset, int limit)
      Convenience findAll
      Type Parameters:
      T - The Record type
      Parameters:
      table - The table to select from
      condition - A condition for the where clause
      orderBy - A map fields for sorting
      offset - The start offset
      limit - The number of records to return
      Returns:
      List of Records
    • count

      public <T extends org.jooq.Record> int count(org.jooq.Table<T> table, org.jooq.Condition condition)
      Count method similar to @see findAll
      Type Parameters:
      T - The Record type
      Parameters:
      table - The table to count the records
      condition - A condition for the where clause
      Returns:
      Number of records