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

com.ibm.fhir.persistence.jdbc.dao.api.FHIRDbDAO Maven / Gradle / Ivy

There is a newer version: 4.11.1
Show newest version
/*
 * (C) Copyright IBM Corp. 2017, 2020
 *
 * SPDX-License-Identifier: Apache-2.0
 */

package com.ibm.fhir.persistence.jdbc.dao.api;

import java.sql.Connection;

import com.ibm.fhir.persistence.jdbc.connection.FHIRDbFlavor;
import com.ibm.fhir.persistence.jdbc.exception.FHIRPersistenceDBConnectException;

/**
 * This is a root interface for child Data Access Object interfaces.
 */
public interface FHIRDbDAO {

    /**
     * Obtains a database connection. Connection is configured and ready to use.
     * If multi-tenant, the tenant session variable will have been set.
     * 
     * @return Connection - A connection to the FHIR database.
     * @throws FHIRPersistenceDBConnectException
     */
    Connection getConnection() throws FHIRPersistenceDBConnectException;

    /**
     * @return true if this DAO is connected to a DB2 database.
     */
    boolean isDb2Database();

    /**
     * Get the database flavor, which describes the database type and
     * its capabilities (e.g. is it multi-tenant?)
     * @return
     */
    public FHIRDbFlavor getFlavor();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy