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

org.hibernate.boot.spi.SessionFactoryBuilderFactory 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.boot.spi;

import org.hibernate.boot.SessionFactoryBuilder;

/**
 * An extension point for integrators that wish to hook into the process of how a SessionFactory
 * is built.  Intended as a "discoverable service" ({@link java.util.ServiceLoader}).  There can
 * be at most one implementation discovered that returns a non-null SessionFactoryBuilder.
 *
 * @author Steve Ebersole
 */
public interface SessionFactoryBuilderFactory {
	/**
	 * The contract method.  Return the SessionFactoryBuilder.  May return {@code null}
	 *
	 * @param metadata The metadata from which we will be building a SessionFactory.
	 * @param defaultBuilder The default SessionFactoryBuilder instance.  If the SessionFactoryBuilder being built
	 * here needs to use this passed SessionFactoryBuilder instance it is the responsibility of the built
	 * SessionFactoryBuilder impl to delegate configuration calls to the passed default impl.
	 *
	 * @return The SessionFactoryBuilder, or {@code null}
	 */
	public SessionFactoryBuilder getSessionFactoryBuilder(MetadataImplementor metadata, SessionFactoryBuilderImplementor defaultBuilder);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy