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

org.hibernate.sql.results.spi.Fetchable Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha3
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 http://www.gnu.org/licenses/lgpl-2.1.html
 */
package org.hibernate.sql.results.spi;

import org.hibernate.LockMode;
import org.hibernate.engine.FetchStrategy;
import org.hibernate.engine.FetchTiming;
import org.hibernate.metamodel.mapping.ModelPart;
import org.hibernate.query.NavigablePath;
import org.hibernate.sql.ast.spi.SqlAstProcessingState;

/**
 * @author Steve Ebersole
 */
public interface Fetchable extends ModelPart {
	String getFetchableName();

	FetchStrategy getMappedFetchStrategy();

	// todo (6.0) : all we need here is (1) FetchTiming and (2) whether the values are available in the current JdbcValuesSource
	//		Having to instantiate new FetchStrategy potentially multiple times
	// 		per Fetch generation is performance drain.  Would be better to
	// 		simply pass these 2 pieces of information

	Fetch generateFetch(
			FetchParent fetchParent,
			NavigablePath fetchablePath,
			FetchTiming fetchTiming,
			boolean selected,
			LockMode lockMode,
			String resultVariable,
			DomainResultCreationState creationState);

	default boolean isCircular(FetchParent fetchParent, SqlAstProcessingState creationState){
		return false;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy