Class DynamicEntityGraph
java.lang.Object
com.cosium.spring.data.jpa.entity.graph.domain2.DynamicEntityGraph
- All Implemented Interfaces:
EntityGraph
Allows to create on-the-fly generated
EntityGraph by defining its attribute paths.- Author:
- Réda Housni Alaoui
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.cosium.spring.data.jpa.entity.graph.domain2.EntityGraph
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicEntityGraph.Builderbuilder(EntityGraphType type) buildQueryHint(javax.persistence.EntityManager entityManager, Class<?> entityType) booleanstatic DynamicEntityGraph.Builderfetching()When the javax.persistence.fetchgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated as FetchType.LAZYstatic DynamicEntityGraphWhen the javax.persistence.fetchgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated as FetchType.LAZYinthashCode()static DynamicEntityGraph.Builderloading()When the javax.persistence.loadgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated according to their specified or default FetchType.static DynamicEntityGraphWhen the javax.persistence.loadgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated according to their specified or default FetchType.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cosium.spring.data.jpa.entity.graph.domain2.EntityGraph
execute
-
Constructor Details
-
DynamicEntityGraph
- Parameters:
attributePaths- The paths of attributes of this EntityGraph. You can refer to direct properties of the entity or nested properties via aproperty.nestedProperty. e.g. for a product entity:["brand", "supplier.address"]
-
-
Method Details
-
loading
When the javax.persistence.loadgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated according to their specified or default FetchType. -
loading
When the javax.persistence.loadgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated according to their specified or default FetchType.- Parameters:
attributePaths- The paths of attributes of this EntityGraph. You can refer to direct properties of the entity or nested properties via aproperty.nestedProperty. e.g. for a product entity:["brand", "supplier.address"]- See Also:
-
fetching
When the javax.persistence.fetchgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated as FetchType.LAZY -
fetching
When the javax.persistence.fetchgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated as FetchType.LAZY- Parameters:
attributePaths- The paths of attributes of this EntityGraph. You can refer to direct properties of the entity or nested properties via aproperty.nestedProperty. e.g. for a product entity:["brand", "supplier.address"]- See Also:
-
builder
-
buildQueryHint
public Optional<EntityGraphQueryHint> buildQueryHint(javax.persistence.EntityManager entityManager, Class<?> entityType) - Specified by:
buildQueryHintin interfaceEntityGraph- Returns:
- A query hint to apply to a query. If empty, the entity graph will be ignored and therefore not applied to the query.
-
equals
-
hashCode
public int hashCode()
-