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

io.continual.services.processor.library.jdbcio.DbService Maven / Gradle / Ivy

package io.continual.services.processor.library.jdbcio;

import java.sql.Connection;
import java.sql.SQLException;

import org.json.JSONObject;

import io.continual.builder.Builder.BuildFailure;
import io.continual.services.ServiceContainer;
import io.continual.services.SimpleService;

/**
 * A service wrapper over the db connection
 */
public class DbService extends SimpleService
{
	public DbService ( ServiceContainer sc, JSONObject config ) throws BuildFailure
	{
		fDb = new DbConnection ( config );
	}

	public DbConnection getConnectionWrapper ()
	{
		return fDb;
	}
	
	public Connection getConnection () throws SQLException
	{
		return getConnectionWrapper().getConnection ();
	}

	private final DbConnection fDb;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy