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

com.github.fluent.hibernate.cfg.SessionControlHibernate5 Maven / Gradle / Ivy

Go to download

A library to work with Hibernate by fluent API. This library hasn't dependencies except Hibernate dependencies. It requires Java 1.6 and above.

There is a newer version: 0.3.1
Show newest version
package com.github.fluent.hibernate.cfg;

import org.hibernate.Session;
import org.hibernate.StatelessSession;

/**
 *
 * @author V.Ladynev
 */
class SessionControlHibernate5 implements ISessionControl {

    @Override
    public void close(Session session) {
        if (session == null || !session.isOpen()) {
            return;
        }

        session.close();
    }

    @Override
    public void close(StatelessSession session) {
        if (session == null) {
            return;
        }

        session.close();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy