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

org.hibernate.graph.spi.SubGraphImplementor 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 http://www.gnu.org/licenses/lgpl-2.1.html
 */
package org.hibernate.graph.spi;

import javax.persistence.metamodel.Attribute;

import org.hibernate.graph.CannotBecomeEntityGraphException;
import org.hibernate.graph.CannotContainSubGraphException;
import org.hibernate.graph.SubGraph;
import org.hibernate.metamodel.model.domain.spi.PersistentAttributeDescriptor;

/**
 * Integration version of the SubGraph contract
 *
 * @author Steve Ebersole
 */
public interface SubGraphImplementor extends SubGraph, GraphImplementor {
	@Override
	SubGraphImplementor makeCopy(boolean mutable);

	@Override
	default SubGraphImplementor makeSubGraph(boolean mutable) {
		if ( ! mutable && ! isMutable() ) {
			return this;
		}

		return makeCopy( mutable );
	}

	@Override
	RootGraphImplementor makeRootGraph(String name, boolean mutable) throws CannotBecomeEntityGraphException;

	@Override
	 SubGraphImplementor addKeySubGraph(String attributeName);

	@Override
	 AttributeNodeImplementor addAttributeNode(Attribute attribute);

	@Override
	default  SubGraphImplementor addKeySubGraph(
			PersistentAttributeDescriptor attribute, Class subType)
			throws CannotContainSubGraphException {
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy