All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.mutiny.db2client.DB2Builder Maven / Gradle / Ivy

There is a newer version: 3.17.1
Show newest version
package io.vertx.mutiny.db2client;

import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;
import io.vertx.core.Handler;

/**
 * Entry point for building DB2 clients.
 *
 * 

* NOTE: This class has been automatically generated from the {@link io.vertx.db2client.DB2Builder original} non Mutiny-ified interface using Vert.x codegen. */ @io.smallrye.mutiny.vertx.MutinyGen(io.vertx.db2client.DB2Builder.class) public class DB2Builder { public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new DB2Builder((io.vertx.db2client.DB2Builder) obj), DB2Builder::getDelegate ); private final io.vertx.db2client.DB2Builder delegate; public DB2Builder(io.vertx.db2client.DB2Builder delegate) { this.delegate = delegate; } public DB2Builder(Object delegate) { this.delegate = (io.vertx.db2client.DB2Builder)delegate; } /** * Empty constructor used by CDI, do not use this constructor directly. **/ DB2Builder() { this.delegate = null; } public io.vertx.db2client.DB2Builder getDelegate() { return delegate; } static final io.smallrye.mutiny.vertx.TypeArg TYPE_ARG_1 = new TypeArg(o1 -> io.vertx.mutiny.sqlclient.SqlClient.newInstance((io.vertx.sqlclient.SqlClient)o1), o1 -> o1.getDelegate()); static final io.smallrye.mutiny.vertx.TypeArg TYPE_ARG_0 = new TypeArg(o1 -> io.vertx.mutiny.sqlclient.Pool.newInstance((io.vertx.sqlclient.Pool)o1), o1 -> o1.getDelegate()); @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DB2Builder that = (DB2Builder) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } /** * @param block * @return the pool as configured by the code block */ private static io.vertx.mutiny.sqlclient.Pool __pool(Handler> block) { io.vertx.mutiny.sqlclient.Pool ret = io.vertx.mutiny.sqlclient.Pool.newInstance((io.vertx.sqlclient.Pool)io.vertx.db2client.DB2Builder.pool(new io.smallrye.mutiny.vertx.DelegatingHandler<>(block, event -> io.vertx.mutiny.sqlclient.ClientBuilder.newInstance((io.vertx.sqlclient.ClientBuilder)event, new TypeArg(o0 -> io.vertx.mutiny.sqlclient.Pool.newInstance((io.vertx.sqlclient.Pool)o0), o0 -> o0.getDelegate()))))); return ret; } /** * @param block * @return */ public static io.vertx.mutiny.sqlclient.Pool pool(java.util.function.Consumer> block) { return __pool(block != null ? new io.smallrye.mutiny.vertx.DelegatingConsumerHandler(block) : null); } /** * @return */ public static io.vertx.mutiny.sqlclient.ClientBuilder pool() { io.vertx.mutiny.sqlclient.ClientBuilder ret = io.vertx.mutiny.sqlclient.ClientBuilder.newInstance((io.vertx.sqlclient.ClientBuilder)io.vertx.db2client.DB2Builder.pool(), TYPE_ARG_0); return ret; } /** * @param handler * @return the client as configured by the code block */ private static io.vertx.mutiny.sqlclient.SqlClient __client(Handler> handler) { io.vertx.mutiny.sqlclient.SqlClient ret = io.vertx.mutiny.sqlclient.SqlClient.newInstance((io.vertx.sqlclient.SqlClient)io.vertx.db2client.DB2Builder.client(new io.smallrye.mutiny.vertx.DelegatingHandler<>(handler, event -> io.vertx.mutiny.sqlclient.ClientBuilder.newInstance((io.vertx.sqlclient.ClientBuilder)event, new TypeArg(o0 -> io.vertx.mutiny.sqlclient.SqlClient.newInstance((io.vertx.sqlclient.SqlClient)o0), o0 -> o0.getDelegate()))))); return ret; } /** * @param handler * @return */ public static io.vertx.mutiny.sqlclient.SqlClient client(java.util.function.Consumer> handler) { return __client(handler != null ? new io.smallrye.mutiny.vertx.DelegatingConsumerHandler(handler) : null); } /** * @return */ public static io.vertx.mutiny.sqlclient.ClientBuilder client() { io.vertx.mutiny.sqlclient.ClientBuilder ret = io.vertx.mutiny.sqlclient.ClientBuilder.newInstance((io.vertx.sqlclient.ClientBuilder)io.vertx.db2client.DB2Builder.client(), TYPE_ARG_1); return ret; } public static DB2Builder newInstance(io.vertx.db2client.DB2Builder arg) { return arg != null ? new DB2Builder(arg) : null; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy