Class Ux.Jooq

java.lang.Object
io.vertx.up.unity.Ux.Jooq
Enclosing class:
Ux

public static class Ux.Jooq extends Object
Inner class of `Jooq` tool of Jooq Engine operations based on pojo here. When developers want to access database and select zero default implementation.
Author:
lang


     public Future fetchAsync(final User user){
         return Ux.Jooq.on(UserDao.class)
                    .insertAsync(user)
                    .compose(Ux::fnJObject);
     }

 

Here you can do database access smartly and do nothing then.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static UxJooq
    on(Class<?> clazz)
    Get reference of UxJooq that bind to Dao class, this method access standard database, the configured position is `vertx-jooq.yml`
    static UxJooq
    on(Class<?> clazz, DataPool pool)
    The overloading method of above `on(Class<?>)` method here.
    static UxJooq
    on(Class<?> clazz, String key)
    The overloading method of above `on(Class<?>)` method here.
    static UxJooq
    ons(Class<?> clazz)
    Get reference of UxJooq that bind to Dao class, this method won't access standard database, instead it will access history database that has been configured in `vertx-jooq.yml` file.

    Methods inherited from class java.lang.Object

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

    • Jooq

      public Jooq()
  • Method Details

    • ons

      public static UxJooq ons(Class<?> clazz)
      Get reference of UxJooq that bind to Dao class, this method won't access standard database, instead it will access history database that has been configured in `vertx-jooq.yml` file.

      key = orbit

      
      
       jooq:
         orbit:
           driverClassName: "com.mysql.cj.jdbc.Driver"
           ......
      
       
      Parameters:
      clazz - The class of `VertxDao` that has been generated by jooq tool
      Returns:
      UxJooq reference that has been initialized
    • on

      public static UxJooq on(Class<?> clazz)
      Get reference of UxJooq that bind to Dao class, this method access standard database, the configured position is `vertx-jooq.yml`

      key = provider

      
       jooq:
         provider:
           driverClassName: "com.mysql.cj.jdbc.Driver"
       
      Parameters:
      clazz - The class of `VertxDao` that has been generated by jooq tool
      Returns:
      UxJooq reference that has been initialized
    • on

      public static UxJooq on(Class<?> clazz, DataPool pool)
      The overloading method of above `on(Class<?>)` method here.
      Parameters:
      clazz - The class of `VertxDao` that has been generated by jooq tool
      pool - Input data pool reference, it provide developers to access other database in one application.
      Returns:
      UxJooq reference that has been initialized
    • on

      public static UxJooq on(Class<?> clazz, String key)
      The overloading method of above `on(Class<?>)` method here.
      Parameters:
      clazz - The class of `VertxDao` that has been generated by jooq tool
      key - the key configuration in vertx-jooq.yml such as above "orbit", "provider"
      Returns:
      UxJooq reference that has been initialized