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

org.hibernate.engine.spi.AbstractDelegatingSessionBuilderImplementor 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.engine.spi;

/**
 * Base class for {@link SessionBuilderImplementor} implementations that wish to implement only parts of that contract
 * themselves while forwarding other method invocations to a delegate instance.
 *
 * @author Gunnar Morling
 */
public abstract class AbstractDelegatingSessionBuilderImplementor
		extends AbstractDelegatingSessionBuilder
		implements SessionBuilderImplementor {

	public AbstractDelegatingSessionBuilderImplementor(SessionBuilderImplementor delegate) {
		super( delegate );
	}

	protected SessionBuilderImplementor delegate() {
		return (SessionBuilderImplementor) super.delegate();
	}

	@SuppressWarnings({ "unchecked", "deprecation" })
	@Override
	public T owner(SessionOwner sessionOwner) {
		delegate().owner( sessionOwner );
		return (T) this;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy