Class 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 Detail

      • Jooq

        public Jooq()
    • Method Detail

      • table

        public static String table​(Class<?> clazz)
      • pojo

        public static Class<?> pojo​(Class<?> clazz)
      • 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
      • isEmpty

        public static boolean isEmpty​(io.vertx.core.json.JsonObject condition)