Class JpaEntityGraph
java.lang.Object
org.springframework.data.jpa.repository.query.JpaEntityGraph
EntityGraph configuration for JPA 2.1
EntityGraph
s.- Since:
- 1.6
- Author:
- Thomas Darimont, Mark Paluch, Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionJpaEntityGraph
(String name, EntityGraph.EntityGraphType type, String[] attributePaths) Creates anJpaEntityGraph
with the given name,EntityGraph.EntityGraphType
and attribute paths.JpaEntityGraph
(EntityGraph entityGraph, String nameFallback) Creates anJpaEntityGraph
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute node names to be used for thisJpaEntityGraph
.getName()
Returns the name of theEntityGraph
configuration to use.getType()
Returns theEntityGraph.EntityGraphType
of theEntityGraph
to use.boolean
Deprecated, for removal: This API element is subject to removal in a future version.toString()
-
Constructor Details
-
JpaEntityGraph
Creates anJpaEntityGraph
.- Parameters:
entityGraph
- must not be null.nameFallback
- must not be null or empty.
-
JpaEntityGraph
public JpaEntityGraph(String name, EntityGraph.EntityGraphType type, @Nullable String[] attributePaths) Creates anJpaEntityGraph
with the given name,EntityGraph.EntityGraphType
and attribute paths.- Parameters:
name
- must not be null or empty.type
- must not be null.attributePaths
- may be null.- Since:
- 1.9
-
-
Method Details
-
getName
Returns the name of theEntityGraph
configuration to use.- Returns:
-
getType
Returns theEntityGraph.EntityGraphType
of theEntityGraph
to use.- Returns:
-
getAttributePaths
Returns the attribute node names to be used for thisJpaEntityGraph
.- Returns:
- Since:
- 1.9
-
isAdHocEntityGraph
Deprecated, for removal: This API element is subject to removal in a future version.since 3.5 as the used evaluation does not represent whether aJpaEntityGraph
is dynamic or not.Return true if thisJpaEntityGraph
needs to be generated on-the-fly.- Returns:
- true if
attributePaths
is not empty. - Since:
- 1.9
-
toString
-
JpaEntityGraph
is dynamic or not.