final class EmptyEntityGraphImpl extends java.lang.Object implements EntityGraph
EntityGraph implementation that does not contain any fields/subgraphs. Methods that are supposed to modify the graph
would throw an UnsupportedOperationException.| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<?> |
clazz |
| Constructor and Description |
|---|
EmptyEntityGraphImpl(java.lang.Class<?> clazz) |
| Modifier and Type | Method and Description |
|---|---|
EntityGraph |
addField(java.lang.String fieldName)
Add a field into this graph for all existing entity-filtering scopes.
|
EntityGraph |
addField(java.lang.String fieldName,
java.util.Set<java.lang.String> filteringScopes)
Add a field into this graph for given set of entity-filtering scopes.
|
EntityGraph |
addField(java.lang.String fieldName,
java.lang.String... filteringScopes)
Add a field into this graph for given list of entity-filtering scopes.
|
EntityGraph |
addFilteringScopes(java.util.Set<java.lang.String> filteringScopes)
Add a set of entity-filtering scopes to this graph.
|
EntityGraph |
addSubgraph(java.lang.String fieldName,
java.lang.Class<?> fieldClass)
Add a subgraph into this graph for all existing entity-filtering scopes.
|
EntityGraph |
addSubgraph(java.lang.String fieldName,
java.lang.Class<?> fieldClass,
java.util.Set<java.lang.String> filteringScopes)
Add a subgraph into this graph for given set of entity-filtering scopes.
|
EntityGraph |
addSubgraph(java.lang.String fieldName,
java.lang.Class<?> fieldClass,
java.lang.String... filteringScopes)
Add a subgraph into this graph for given list of entity-filtering scopes.
|
boolean |
equals(java.lang.Object o) |
java.util.Set<java.lang.String> |
getClassFilteringScopes()
Get all available entity-filtering scopes defined on a class.
|
java.lang.Class<?> |
getEntityClass()
Get an entity class this graph is created for.
|
java.util.Set<java.lang.String> |
getFields(java.util.Set<java.lang.String> filteringScopes)
Get fields for given entity-filtering scopes.
|
java.util.Set<java.lang.String> |
getFields(java.lang.String... filteringScopes)
Get fields for given entity-filtering scopes.
|
java.util.Set<java.lang.String> |
getFields(java.lang.String filteringScope)
Get fields for given entity-filtering scope.
|
java.util.Set<java.lang.String> |
getFilteringScopes()
Get all available entity-filtering scopes.
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getSubgraphs(java.util.Set<java.lang.String> filteringScopes)
Get subgraphs for given entity-filtering scopes.
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getSubgraphs(java.lang.String... filteringScopes)
Get subgraphs for given entity-filtering scopes.
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getSubgraphs(java.lang.String filteringScope)
Get subgraphs for given entity-filtering scope.
|
int |
hashCode() |
boolean |
presentInScope(java.lang.String field,
java.lang.String filteringScope)
Determines whether a field/subgraph is present in ANY of the given scopes.
|
boolean |
presentInScopes(java.lang.String field)
Determines whether a field/subgraph is present in ANY of the existing scopes.
|
EntityGraph |
remove(java.lang.String name)
Remove a field/subgraph from the graph (all entity-filtering scopes).
|
public EntityGraph addField(java.lang.String fieldName)
EntityGraphaddField in interface EntityGraphfieldName - name of the field to be added.public EntityGraph addField(java.lang.String fieldName, java.lang.String... filteringScopes)
EntityGraphaddField in interface EntityGraphfieldName - name of the field to be added.filteringScopes - entity-filtering scopes for the field.public EntityGraph addField(java.lang.String fieldName, java.util.Set<java.lang.String> filteringScopes)
EntityGraphaddField in interface EntityGraphfieldName - name of the field to be added.filteringScopes - entity-filtering scopes for the field.public EntityGraph addSubgraph(java.lang.String fieldName, java.lang.Class<?> fieldClass)
EntityGraphaddSubgraph in interface EntityGraphfieldName - name of the subgraph field to be added.fieldClass - entity class representing the subgraph.public EntityGraph addSubgraph(java.lang.String fieldName, java.lang.Class<?> fieldClass, java.lang.String... filteringScopes)
EntityGraphaddSubgraph in interface EntityGraphfieldName - name of the subgraph field to be added.fieldClass - entity class representing the subgraph.filteringScopes - entity-filtering scopes for the subgraph.public EntityGraph addSubgraph(java.lang.String fieldName, java.lang.Class<?> fieldClass, java.util.Set<java.lang.String> filteringScopes)
EntityGraphaddSubgraph in interface EntityGraphfieldName - name of the subgraph field to be added.fieldClass - entity class representing the subgraph.filteringScopes - entity-filtering scopes for the subgraph.public java.lang.Class<?> getEntityClass()
EntityGraphgetEntityClass in interface EntityGraphpublic java.util.Set<java.lang.String> getFields(java.lang.String filteringScope)
EntityGraphgetFields in interface EntityGraphfilteringScope - scope the returned fields have to be in.public java.util.Set<java.lang.String> getFields(java.lang.String... filteringScopes)
EntityGraphgetFields in interface EntityGraphfilteringScopes - scopes the returned fields have to be in.public java.util.Set<java.lang.String> getFields(java.util.Set<java.lang.String> filteringScopes)
EntityGraphgetFields in interface EntityGraphfilteringScopes - scopes the returned fields have to be in.public java.util.Map<java.lang.String,java.lang.Class<?>> getSubgraphs(java.lang.String filteringScope)
EntityGraphgetSubgraphs in interface EntityGraphfilteringScope - scope the returned subgraphs have to be in.public java.util.Map<java.lang.String,java.lang.Class<?>> getSubgraphs(java.lang.String... filteringScopes)
EntityGraphgetSubgraphs in interface EntityGraphfilteringScopes - scopes the returned subgraphs have to be in.public java.util.Map<java.lang.String,java.lang.Class<?>> getSubgraphs(java.util.Set<java.lang.String> filteringScopes)
EntityGraphgetSubgraphs in interface EntityGraphfilteringScopes - scopes the returned subgraphs have to be in.public boolean presentInScopes(java.lang.String field)
EntityGraphpresentInScopes in interface EntityGraphfield - field to be checked.true if field is present in ANY of the existing scopes, false otherwise.public boolean presentInScope(java.lang.String field,
java.lang.String filteringScope)
EntityGraphpresentInScope in interface EntityGraphfield - field to be checked.filteringScope - entity-filtering scope.true if field is present in the given scope, false otherwise.public EntityGraph remove(java.lang.String name)
EntityGraphremove in interface EntityGraphname - name of the field/subgraph to be removed.public java.util.Set<java.lang.String> getFilteringScopes()
EntityGraphgetFilteringScopes in interface EntityGraphpublic java.util.Set<java.lang.String> getClassFilteringScopes()
EntityGraphgetClassFilteringScopes in interface EntityGraphpublic EntityGraph addFilteringScopes(java.util.Set<java.lang.String> filteringScopes)
EntityGraphaddFilteringScopes in interface EntityGraphfilteringScopes - entity-filtering scopes to be added.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object