final class EntityGraphProviderImpl extends java.lang.Object implements EntityGraphProvider
entity graph
and object graph
instances.Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentMap<java.lang.Class<?>,EntityGraph> |
readerClassToGraph |
private java.util.concurrent.ConcurrentMap<java.lang.Class<?>,EntityGraph> |
writerClassToGraph |
Constructor and Description |
---|
EntityGraphProviderImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Class<?>,EntityGraph> |
asMap(boolean forWriter)
Return an unmodifiable map of entity graphs for reader/writer.
|
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 an
ObjectGraph 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.
|
private final java.util.concurrent.ConcurrentMap<java.lang.Class<?>,EntityGraph> writerClassToGraph
private final java.util.concurrent.ConcurrentMap<java.lang.Class<?>,EntityGraph> readerClassToGraph
public EntityGraph getOrCreateEntityGraph(java.lang.Class<?> entityClass, boolean forWriter)
EntityGraphProvider
getOrCreateEntityGraph
in interface EntityGraphProvider
entityClass
- entity class the graph should be created for.forWriter
- flag determining whether the graph should be created for writer/reader.public EntityGraph getOrCreateEmptyEntityGraph(java.lang.Class<?> entityClass, boolean forWriter)
EntityGraphProvider
EntityGraphProvider.getOrCreateEntityGraph(Class, boolean)
method.getOrCreateEmptyEntityGraph
in interface EntityGraphProvider
entityClass
- entity class the graph should be created for.forWriter
- flag determining whether the graph should be created for writer/reader.public java.util.Map<java.lang.Class<?>,EntityGraph> asMap(boolean forWriter)
forWriter
- flag determining whether the returned map should be for writer/reader.public boolean containsEntityGraph(java.lang.Class<?> entityClass, boolean forWriter)
EntityGraphProvider
containsEntityGraph
in interface EntityGraphProvider
entityClass
- entity class for which the graph should be checked.forWriter
- flag determining whether the check should be in writer/reader graphs.true
if the entity graph already exists, false
otherwise.public ObjectGraph createObjectGraph(java.lang.Class<?> entityClass, java.util.Set<java.lang.String> filteringScopes, boolean forWriter)
EntityGraphProvider
ObjectGraph
for given parameters. Every time this method is called a new instance of object graph is
created.createObjectGraph
in interface EntityGraphProvider
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.