Package net.hydromatic.quidem
Class ConnectionFactories
java.lang.Object
net.hydromatic.quidem.ConnectionFactories
Utilities for
Quidem.ConnectionFactory.-
Method Summary
Modifier and TypeMethodDescriptionstatic Quidem.ConnectionFactorychain(Iterable<? extends Quidem.ConnectionFactory> factories) Creates a connection factory that tries each of a list of factories in turn.static Quidem.ConnectionFactorychain(Quidem.ConnectionFactory... connectionFactories) Creates a connection factory that tries each of an array of factories in turn.static Quidem.ConnectionFactoryempty()Creates a connection factory that returnsnullfor any requested database.static Quidem.ConnectionFactoryCreates a connection factory that uses simple JDBC credentials.static Quidem.ConnectionFactorysimple(String name, String url, String user, String password, Predicate<Connection> verifier, Consumer<Connection> loader) Creates a connection factory that uses simple JDBC credentials and verifies/loads connections.static Quidem.ConnectionFactoryCreates a connection factory that always throws.
-
Method Details
-
unsupported
Creates a connection factory that always throws. -
simple
public static Quidem.ConnectionFactory simple(String name, String url, String user, String password) Creates a connection factory that uses simple JDBC credentials. -
simple
public static Quidem.ConnectionFactory simple(String name, String url, String user, String password, Predicate<Connection> verifier, Consumer<Connection> loader) Creates a connection factory that uses simple JDBC credentials and verifies/loads connections. -
chain
public static Quidem.ConnectionFactory chain(Iterable<? extends Quidem.ConnectionFactory> factories) Creates a connection factory that tries each of a list of factories in turn. -
chain
Creates a connection factory that tries each of an array of factories in turn. -
empty
Creates a connection factory that returnsnullfor any requested database.
-