Interface EntityGraphProvider
-
- All Known Implementing Classes:
EntityGraphProviderImpl
@Contract public interface EntityGraphProvider
Providesentity graph
andobject graph
instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsEntityGraph(java.lang.Class<?> entityClass, boolean forWriter)
Determine whether an entity graph for given entity class has been created by this provider.ObjectGraph
createObjectGraph(java.lang.Class<?> entityClass, java.util.Set<java.lang.String> filteringScopes, boolean forWriter)
Create anObjectGraph
for given parameters.EntityGraph
getOrCreateEmptyEntityGraph(java.lang.Class<?> entityClass, boolean forWriter)
Get an empty entity graph for given class.EntityGraph
getOrCreateEntityGraph(java.lang.Class<?> entityClass, boolean forWriter)
Get an entity graph for given class.
-
-
-
Method Detail
-
getOrCreateEntityGraph
EntityGraph getOrCreateEntityGraph(java.lang.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(java.lang.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 bygetOrCreateEntityGraph(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(java.lang.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(java.lang.Class<?> entityClass, java.util.Set<java.lang.String> filteringScopes, boolean forWriter)
Create anObjectGraph
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.
-
-