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

org.hibernate.graph.AttributeNode 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;

import java.util.Map;
import javax.persistence.Subgraph;
import javax.persistence.metamodel.Attribute;

/**
 * Hibernate extension to the JPA entity-graph AttributeNode contract.
 *
 * @author Strong Liu 
 * @author Steve Ebersole
 * @author Andrea Boriero
 */
public interface AttributeNode extends GraphNode, javax.persistence.AttributeNode {
	Attribute getAttributeDescriptor();

	Map, SubGraph> getSubGraphs();
	Map, SubGraph> getKeySubGraphs();

	@Override
	@SuppressWarnings("unchecked")
	default Map getSubgraphs() {
		return (Map) getSubGraphs();
	}

	@Override
	@SuppressWarnings("unchecked")
	default Map getKeySubgraphs() {
		return (Map) getKeySubGraphs();
	}

	 void addSubGraph(Class subType, SubGraph subGraph);
	 void addKeySubGraph(Class subType, SubGraph subGraph);

	SubGraph makeSubGraph();
	SubGraph makeKeySubGraph();

	 SubGraph makeSubGraph(Class subtype);
	 SubGraph makeKeySubGraph(Class subtype);
}