org.hibernate.graph.spi.RootGraphImplementor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* 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.graph.spi;
import org.hibernate.graph.RootGraph;
import org.hibernate.metamodel.model.domain.spi.EntityTypeDescriptor;
import org.hibernate.metamodel.model.domain.spi.ManagedTypeDescriptor;
/**
* Integration version of the RootGraph contract
*
* @author Steve Ebersole
*/
public interface RootGraphImplementor extends RootGraph, GraphImplementor {
boolean appliesTo(EntityTypeDescriptor entityType);
@Override
@SuppressWarnings("unchecked")
default boolean appliesTo(ManagedTypeDescriptor managedType) {
assert managedType instanceof EntityTypeDescriptor;
return appliesTo( (EntityTypeDescriptor) managedType );
}
@Override
RootGraphImplementor makeRootGraph(String name, boolean mutable);
@Override
SubGraphImplementor makeSubGraph(boolean mutable);
/**
* Make an immutable copy of this entity graph, using the given name.
*
* @param name The name to apply to the immutable copy
*
* @return The immutable copy
*/
default RootGraphImplementor makeImmutableCopy(String name) {
return makeRootGraph( name, false );
}
}