Examples of DBIFactory


Examples of com.yammer.dropwizard.jdbi.DBIFactory

        super(new PizzaService(), "seeder", "data seeding");
    }

    @Override
    protected void run(Environment environment, Namespace namespace, PizzaConfiguration config) throws Exception {
        final DBIFactory factory = new DBIFactory();
        final DBI jdbi = factory.build(environment, config.getDatabaseConfiguration(), "postgresql");
        final ToppingDAO dao = jdbi.onDemand(ToppingDAO.class);
        final PizzaDAO pizza_dao = jdbi.onDemand(PizzaDAO.class);

        // toppings
        dao.deleteAll();
View Full Code Here

Examples of com.yammer.dropwizard.jdbi.DBIFactory

        bootstrap.addCommand(new Seeder());
    }

    @Override
    public void run(PizzaConfiguration config, Environment environment) throws ClassNotFoundException {
        final DBIFactory factory = new DBIFactory();
        final DBI jdbi = factory.build(environment, config.getDatabaseConfiguration(), "postgresql");
        final ToppingDAO dao = jdbi.onDemand(ToppingDAO.class);
        final PizzaDAO pizza_dao = jdbi.onDemand(PizzaDAO.class);
        environment.addResource(new ToppingResource(dao));
        environment.addResource(new PizzaResource(pizza_dao));
    }
View Full Code Here

Examples of io.dropwizard.jdbi.DBIFactory

public class FiberDBIFactory {
    private final ExecutorService es;
    private final DBIFactory builder;

    public FiberDBIFactory(final ExecutorService es) {
        this.builder = new DBIFactory();
        this.es = es;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.