org.hibernate.metamodel.RuntimeModel 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.metamodel;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import org.hibernate.EntityNameResolver;
import org.hibernate.graph.RootGraph;
import org.hibernate.metamodel.model.domain.NavigableRole;
import org.hibernate.metamodel.model.domain.spi.EmbeddedTypeDescriptor;
import org.hibernate.metamodel.model.domain.spi.EntityHierarchy;
import org.hibernate.metamodel.model.domain.spi.EntityTypeDescriptor;
import org.hibernate.metamodel.model.domain.spi.MappedSuperclassTypeDescriptor;
import org.hibernate.metamodel.model.domain.spi.PersistentCollectionDescriptor;
/**
* @author Steve Ebersole
*/
public interface RuntimeModel {
void visitEntityHierarchies(Consumer action);
EntityTypeDescriptor getEntityDescriptor(NavigableRole name) throws NotNavigableException;
EntityTypeDescriptor getEntityDescriptor(Class javaType) throws NotNavigableException;
EntityTypeDescriptor getEntityDescriptor(String name) throws NotNavigableException;
EntityTypeDescriptor findEntityDescriptor(Class javaType);
EntityTypeDescriptor findEntityDescriptor(String name);
void visitEntityDescriptors(Consumer> action);
MappedSuperclassTypeDescriptor getMappedSuperclassDescriptor(NavigableRole name) throws NotNavigableException;
MappedSuperclassTypeDescriptor getMappedSuperclassDescriptor(Class javaType) throws NotNavigableException;
MappedSuperclassTypeDescriptor getMappedSuperclassDescriptor(String name) throws NotNavigableException;
MappedSuperclassTypeDescriptor findMappedSuperclassDescriptor(Class javaType);
MappedSuperclassTypeDescriptor findMappedSuperclassDescriptor(String name);
void visitMappedSuperclassDescriptors(Consumer> action);
EmbeddedTypeDescriptor findEmbeddedDescriptor(Class javaType);
EmbeddedTypeDescriptor findEmbeddedDescriptor(NavigableRole name);
EmbeddedTypeDescriptor findEmbeddedDescriptor(String name);
void visitEmbeddedDescriptors(Consumer> action);
PersistentCollectionDescriptor getCollectionDescriptor(NavigableRole name) throws NotNavigableException;
PersistentCollectionDescriptor getCollectionDescriptor(String name) throws NotNavigableException;
PersistentCollectionDescriptor findCollectionDescriptor(NavigableRole name);
PersistentCollectionDescriptor findCollectionDescriptor(String name);
void visitCollectionDescriptors(Consumer> action);
RootGraph findRootGraph(String name);
List> findRootGraphsForType(Class baseType);
List> findRootGraphsForType(String baseTypeName);
void visitRootGraphs(Consumer> action);
// todo (6.0) : default-for-type as well?
// aka:
// EntityGraphImplementor defaultGraph(Class entityJavaType);
String getImportedName(String name);
Set getEntityNameResolvers();
void visitEntityNameResolvers(Consumer action);
}