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

com.digitolio.jdbi.StrategyAwareDBI Maven / Gradle / Ivy

There is a newer version: 0.6.8.2
Show newest version
package com.digitolio.jdbi;

import com.digitolio.jdbi.strategy.TranslatingStrategyAware;
import org.skife.jdbi.v2.DBI;
import org.skife.jdbi.v2.tweak.ConnectionFactory;

import javax.sql.DataSource;
import java.util.Properties;

public class StrategyAwareDBI extends DBI {

    public static final String TRANSLATING_STRATEGY = "TRANSLATING_STRATEGY";

    public StrategyAwareDBI(DataSource dataSource, TranslatingStrategyAware translater) {
        super(dataSource);
        define(TRANSLATING_STRATEGY,translater);
    }

    public StrategyAwareDBI(ConnectionFactory connectionFactory, TranslatingStrategyAware translater) {
        super(connectionFactory);
        define(TRANSLATING_STRATEGY,translater);
    }

    public StrategyAwareDBI(String url, TranslatingStrategyAware translater) {
        super(url);
        define(TRANSLATING_STRATEGY,translater);
    }

    public StrategyAwareDBI(String url, Properties props, TranslatingStrategyAware translater) {
        super(url, props);
        define(TRANSLATING_STRATEGY,translater);
    }

    public StrategyAwareDBI(String url, String username, String password, TranslatingStrategyAware translater) {
        super(url, username, password);
        define(TRANSLATING_STRATEGY,translater);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy