Interface EntityGraphProvider

All Known Implementing Classes:
EntityGraphProviderImpl

@Contract public interface EntityGraphProvider
Provides entity graph and object graph instances.
  • Method Details

    • getOrCreateEntityGraph

      EntityGraph getOrCreateEntityGraph(Class<?> entityClass, boolean forWriter)
      Get an entity graph for given class. New graph is created if no graph exists for given class.
      Parameters:
      entityClass - entity class the graph should be created for.
      forWriter - flag determining whether the graph should be created for writer/reader.
      Returns:
      an entity graph.
    • getOrCreateEmptyEntityGraph

      EntityGraph getOrCreateEmptyEntityGraph(Class<?> entityClass, boolean forWriter)
      Get an empty entity graph for given class. New graph is created if the stored one is not an empty entity graph or no graph exists for given class. This method overrides the graph created by getOrCreateEntityGraph(Class, boolean) method.
      Parameters:
      entityClass - entity class the graph should be created for.
      forWriter - flag determining whether the graph should be created for writer/reader.
      Returns:
      an empty entity graph.
    • containsEntityGraph

      boolean containsEntityGraph(Class<?> entityClass, boolean forWriter)
      Determine whether an entity graph for given entity class has been created by this provider.
      Parameters:
      entityClass - entity class for which the graph should be checked.
      forWriter - flag determining whether the check should be in writer/reader graphs.
      Returns:
      true if the entity graph already exists, false otherwise.
    • createObjectGraph

      ObjectGraph createObjectGraph(Class<?> entityClass, Set<String> filteringScopes, boolean forWriter)
      Create an ObjectGraph for given parameters. Every time this method is called a new instance of object graph is created.
      Parameters:
      entityClass - entity class which the object graph should be created for.
      filteringScopes - entity-filtering scopes the graph should be created for.
      forWriter - flag determining whether the graph should be created for writer/reader.
      Returns:
      an entity-filtering object graph instance.