Uses of Interface
jakarta.persistence.EntityGraph
Packages that use EntityGraph
Package
Description
Jakarta Persistence is the API for the management for persistence and object/relational mapping.
Jakarta Persistence Metamodel API
-
Uses of EntityGraph in jakarta.persistence
Methods in jakarta.persistence that return EntityGraphModifier and TypeMethodDescription<T> EntityGraph<T> EntityHandler.createEntityGraph(Class<T> rootType) Create a new mutableEntityGraph, allowing programmatic definition of the graph.EntityGraph<?> EntityManager.createEntityGraph(String graphName) Deprecated, for removal: This API element is subject to removal in a future version.<T> EntityGraph<T> EntityHandler.getEntityGraph(Class<T> rootType, String graphName) Obtain a mutable copy of the namedEntityGraphwhose root type is exactly the given entity type.EntityGraph<?> EntityHandler.getEntityGraph(String graphName) Obtain a mutable copy of the namedEntityGraph.EntityGraph<? super X> TypedQuery.getEntityGraph()Retrieve theEntityGraphto be applied to the entity returned by the query, ornullif no entity graph was specified viaTypedQuery.setEntityGraph(EntityGraph)orNamedQuery.entityGraph().Methods in jakarta.persistence that return types with arguments of type EntityGraphModifier and TypeMethodDescription<T> List<EntityGraph<? super T>> EntityHandler.getEntityGraphs(Class<T> entityClass) Return all namedEntityGraphs that are defined for the given entity class type.<E> Map<String, EntityGraph<? extends E>> EntityManagerFactory.getNamedEntityGraphs(Class<E> entityType) A map keyed by graph name, containing every named entity graph whose entity type is assignable to the given Java type.Methods in jakarta.persistence with parameters of type EntityGraphModifier and TypeMethodDescription<T> voidEntityManagerFactory.addNamedEntityGraph(String graphName, EntityGraph<T> entityGraph) Add a named copy of the givenEntityGraphto thisEntityManagerFactory.<T> TypedQuery<T> EntityHandler.createQuery(String qlString, EntityGraph<T> resultGraph) Create an instance ofTypedQueryfor executing a Jakarta Persistence query languageSELECTstatement, specifying anEntityGraphwhich is interpreted as a load graph.<T> TEntityHandler.find(EntityGraph<T> graph, Object id, FindOption... options) Retrieve an instance of the root entity of the givenEntityGraphrepresenting the record with the given identifier, or returnnullif there is no such record in the database, using the specified options and interpreting theEntityGraphas a load graph.<T> List<T> EntityHandler.findMultiple(EntityGraph<T> graph, List<?> ids, FindOption... options) Retrieve entity instances representing the records with the given identifiers of the root entity of the givenEntityGraph, using the specified options and interpreting theEntityGraphas a load graph, returning entity instances in a list where the position of an instance in the list matches the position of its identifier in the given array, and the list contains a null value if there is no record matching a given identifier.<T> TEntityHandler.get(EntityGraph<T> graph, Object id, FindOption... options) Retrieve an entity representing the record with the given identifier, fetching associations specified by the given load graph, and using the specified options.<T> List<T> EntityHandler.getMultiple(EntityGraph<T> graph, List<?> ids, FindOption... options) Retrieve entity instances representing the records with the given identifiers of the root entity of the given load graph, using the specified options, and returning the instances in a list where the position of an instance in the list matches the position of its identifier in the given array, and fetching associations specified by the load graph.TypedQuery.setEntityGraph(EntityGraph<? super X> entityGraph) Specify anEntityGraphto be applied to the entity returned by the Jakarta Persistence query.<R> TypedQuery<R> Query.withEntityGraph(EntityGraph<R> graph) Obtain aTypedQuerywith the given entity graph, which must be rooted at a supertype of the result type of this query. -
Uses of EntityGraph in jakarta.persistence.metamodel
Methods in jakarta.persistence.metamodel that return EntityGraphModifier and TypeMethodDescriptionEntityType.createEntityGraph()Create a new mutableEntityGraphwith this given root entity type, allowing programmatic definition of the graph.Methods in jakarta.persistence.metamodel that return types with arguments of type EntityGraphModifier and TypeMethodDescriptionMap<String, EntityGraph<X>> EntityType.getNamedEntityGraphs()A map keyed by graph name, containing every named entity graph whose root entity type is exactly this type.
EntityHandler.getEntityGraph(String)instead.