org.hibernate.graph.spi.SubGraphImplementor 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 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;
}
}