Class JpaEntityGraph
java.lang.Object
org.springframework.data.jpa.repository.query.JpaEntityGraph
EntityGraph configuration for JPA 2.1
EntityGraphs.- Since:
- 1.6
- Author:
- Thomas Darimont, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionJpaEntityGraph(String name, EntityGraph.EntityGraphType type, String[] attributePaths) Creates anJpaEntityGraphwith the given name,EntityGraph.EntityGraphTypeand 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 theEntityGraphconfiguration to use.getType()Returns theEntityGraph.EntityGraphTypeof theEntityGraphto use.booleanReturn true if thisJpaEntityGraphneeds to be generated on-the-fly.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 anJpaEntityGraphwith the given name,EntityGraph.EntityGraphTypeand 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 theEntityGraphconfiguration to use.- Returns:
-
getType
Returns theEntityGraph.EntityGraphTypeof theEntityGraphto use.- Returns:
-
getAttributePaths
Returns the attribute node names to be used for thisJpaEntityGraph.- Returns:
- Since:
- 1.9
-
isAdHocEntityGraph
public boolean isAdHocEntityGraph()Return true if thisJpaEntityGraphneeds to be generated on-the-fly.- Returns:
- Since:
- 1.9
-
toString
-