java.lang.Object
com.cosium.spring.data.jpa.entity.graph.domain2.NamedEntityGraph
All Implemented Interfaces:
EntityGraph

public class NamedEntityGraph extends Object implements EntityGraph
Refers to a registered EntityGraph by its name.
Author:
Réda Housni Alaoui
  • Constructor Details

    • NamedEntityGraph

      public NamedEntityGraph(String name)
    • NamedEntityGraph

      public NamedEntityGraph(EntityGraphType type, String name)
  • Method Details

    • loading

      public static NamedEntityGraph loading(String name)
      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.
      See Also:
    • fetching

      public static NamedEntityGraph fetching(String name)
      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
      See Also:
    • buildQueryHint

      public Optional<EntityGraphQueryHint> buildQueryHint(javax.persistence.EntityManager entityManager, Class<?> entityType)
      Specified by:
      buildQueryHint in interface EntityGraph
      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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object