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

org.hibernate.resource.jdbc.spi.JdbcSessionContext Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.resource.jdbc.spi;

import org.hibernate.ConnectionAcquisitionMode;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.service.ServiceRegistry;

/**
 * Provides the JdbcSession implementation with contextual information it needs during its lifecycle.
 *
 * @author Steve Ebersole
 */
public interface JdbcSessionContext {
	boolean isScrollableResultSetsEnabled();
	boolean isGetGeneratedKeysEnabled();
	int getFetchSize();

	PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode();

	boolean doesConnectionProviderDisableAutoCommit();

	/**
	 * @deprecated Use {@link #getPhysicalConnectionHandlingMode} instead
	 */
	@Deprecated
	ConnectionReleaseMode getConnectionReleaseMode();

	/**
	 * @deprecated Use {@link #getPhysicalConnectionHandlingMode} instead
	 */
	@Deprecated
	ConnectionAcquisitionMode getConnectionAcquisitionMode();

	StatementInspector getStatementInspector();

	JdbcObserver getObserver();

	/**
	* Retrieve the session factory for this environment.
	*
	* @return The session factory
	*/
	SessionFactoryImplementor getSessionFactory();

	ServiceRegistry getServiceRegistry();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy