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

com.notronix.hibermate.impl.DatabaseIntegrator Maven / Gradle / Ivy

package com.notronix.hibermate.impl;

import org.hibernate.boot.Metadata;
import org.hibernate.boot.model.relational.Database;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.integrator.spi.Integrator;
import org.hibernate.service.spi.SessionFactoryServiceRegistry;

final class DatabaseIntegrator implements Integrator
{
    private Database database;

    public Database getDatabase() {
        return database;
    }

    @Override
    public void integrate(Metadata metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) {
        database = metadata.getDatabase();
    }

    @Override
    public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) {
        database = null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy