
com.github.fluent.hibernate.cfg.SessionControlHibernate5 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-hibernate-core Show documentation
Show all versions of fluent-hibernate-core Show documentation
A library to work with Hibernate by fluent API. This library hasn't dependencies except Hibernate dependencies. It requires Java 1.6 and above.
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