Interface GraphImplementor<J>
- All Superinterfaces:
Graph<J>, Graph<J>, GraphNode<J>, GraphNodeImplementor<J>
- All Known Subinterfaces:
RootGraphImplementor<J>, SubGraphImplementor<J>
Integration version of the
Graph contract.-
Method Summary
Modifier and TypeMethodDescription<Y> AttributeNodeImplementor<Y, ?, ?> addAttributeNode(Attribute<? super J, Y> attribute) Add anAttributeNoderepresenting the givenAttributeto this node of the graph without creating any associatedSubGraph.<X> SubGraphImplementor<X> addKeySubgraph(String attributeName) <X> SubGraphImplementor<X> addKeySubgraph(String attributeName, Class<X> type) <X> SubGraphImplementor<X> addSubgraph(Attribute<? super J, X> attribute) <X> SubGraphImplementor<X> addSubgraph(String attributeName) <X> SubGraphImplementor<X> addSubgraph(String attributeName, Class<X> type) <AJ> SubGraph<AJ> addTreatedElementSubgraph(PluralAttribute<? super J, ?, ? super AJ> attribute, ManagedType<AJ> type) <E> SubGraphImplementor<E> addTreatedElementSubgraph(PluralAttribute<? super J, ?, ? super E> attribute, Class<E> type) <AJ> SubGraphImplementor<AJ> addTreatedMapKeySubgraph(MapAttribute<? super J, ? super AJ, ?> attribute, ManagedType<AJ> type) <K> SubGraphImplementor<K> addTreatedMapKeySubgraph(MapAttribute<? super J, ? super K, ?> attribute, Class<K> type) <AJ> SubGraphImplementor<AJ> addTreatedSubgraph(Attribute<? super J, ? super AJ> attribute, ManagedType<AJ> type) <Y> SubGraphImplementor<Y> addTreatedSubgraph(Attribute<? super J, ? super Y> attribute, Class<Y> type) <Y extends J>
SubGraphImplementor<Y> addTreatedSubgraph(ManagedType<Y> type) <Y extends J>
SubGraphImplementor<Y> addTreatedSubgraph(Class<Y> type) AttributeNodeImplementor<?, ?, ?> Returns the named node associated with the graph, if one, including checks into treated subgraphs.AttributeNodeImplementor<?, ?, ?> <Y> AttributeNodeImplementor<Y, ?, ?> getAttributeNode(Attribute<? super J, Y> attribute) Find an existingAttributeNodeby corresponding attribute reference, within this container.<Y> AttributeNodeImplementor<Y, ?, ?> getAttributeNode(String attributeName) Find an existingAttributeNodeby name within this container.List<? extends AttributeNodeImplementor<?, ?, ?>> All nodes belonging to this container.AttributeNodeImplementor<?, ?, ?> getExistingNode(String attributeName) Retrieve an already existing node, if one, from the graph excluding all other checks.AttributeNodeImplementor<?, ?, ?> getExistingNode(PersistentAttribute<?, ?> attribute) Retrieve an already existing node, if one, from the graph excluding all other checks.Map<PersistentAttribute<? super J, ?>, AttributeNodeImplementor<?, ?, ?>> getNodes()Map<Class<? extends J>, SubGraphImplementor<? extends J>> booleanhasAttributeNode(Attribute<? super J, ?> attribute) booleanhasAttributeNode(String attributeName) makeCopy(boolean mutable) Make a copy of this graph node, with the given mutability.voidmerge(GraphImplementor<J> other) voidmergeInternal(GraphImplementor<J> graph) Methods inherited from interface Graph
addAttributeNode, addAttributeNodes, addAttributeNodes, getAttributeNodes, removeAttributeNode, removeAttributeNode, removeAttributeNodesMethods inherited from interface Graph
addElementSubgraph, addElementSubgraph, addElementSubgraph, addMapKeySubgraph, getGraphedType
-
Method Details
-
findNode
Returns the named node associated with the graph, if one, including checks into treated subgraphs. Returns the node regardless of AttributeNode.isRemoved() which is important for actually implementing proper spec compliance with regard to impact of removed nodes.- Returns:
- The named node, or
null. - See Also:
-
getExistingNode
@Nullable AttributeNodeImplementor<?,?, getExistingNode?> (@Nonnull PersistentAttribute<?, ?> attribute) Retrieve an already existing node, if one, from the graph excluding all other checks. Used in implementing findNode(String) -
getExistingNode
Retrieve an already existing node, if one, from the graph excluding all other checks. Used in implementing findNode(String) -
makeCopy
Description copied from interface:GraphMake a copy of this graph node, with the given mutability.If this graph is immutable, and the argument is
false, simply return this instance. -
merge
-
mergeInternal
-
getAttributeNodeList
Description copied from interface:GraphAll nodes belonging to this container.- Specified by:
getAttributeNodeListin interfaceGraph<J>- See Also:
-
getNodes
-
getTreatedSubgraphs
-
getAttributeNode
Description copied from interface:GraphFind an existingAttributeNodeby name within this container.- Specified by:
getAttributeNodein interfaceGraph<J>- Specified by:
getAttributeNodein interfaceGraph<J>
-
getAttributeNode
@Nonnull <Y> AttributeNodeImplementor<Y,?, getAttributeNode?> (@Nonnull Attribute<? super J, Y> attribute) Description copied from interface:GraphFind an existingAttributeNodeby corresponding attribute reference, within this container.- Specified by:
getAttributeNodein interfaceGraph<J>- Specified by:
getAttributeNodein interfaceGraph<J>
-
findOrCreateAttributeNode
-
addAttributeNode
@Nonnull <Y> AttributeNodeImplementor<Y,?, addAttributeNode?> (@Nonnull Attribute<? super J, Y> attribute) Description copied from interface:GraphAdd anAttributeNoderepresenting the givenAttributeto this node of the graph without creating any associatedSubGraph.- Specified by:
addAttributeNodein interfaceGraph<J>- Specified by:
addAttributeNodein interfaceGraph<J>
-
addTreatedSubgraph
-
addTreatedSubgraph
-
addSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttribute, or return an existing suchSubGraphif there is one.- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraph<J>- Parameters:
attributeName- The name of an attribute of the represented type
-
addSubgraph
@Nonnull <X> SubGraphImplementor<X> addSubgraph(@Nonnull String attributeName, @Nonnull Class<X> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraph<J>- Parameters:
attributeName- The name of an attribute of the represented typetype- A subtype of the attribute type
-
addSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttributeof the represented type, or return an existing suchSubGraphif there is one.- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraph<J>- Parameters:
attribute- An attribute of the represented type- See Also:
-
addTreatedSubgraph
@Nonnull <Y> SubGraphImplementor<Y> addTreatedSubgraph(@Nonnull Attribute<? super J, ? super Y> attribute, @Nonnull Class<Y> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Parameters:
attribute- An attribute of the represented typetype- A subtype of the attribute type
-
addTreatedSubgraph
@Nonnull <AJ> SubGraphImplementor<AJ> addTreatedSubgraph(@Nonnull Attribute<? super J, ? super AJ> attribute, @Nonnull ManagedType<AJ> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Parameters:
attribute- An attribute of the represented typetype- A subtype of the attribute type
-
addTreatedElementSubgraph
@Nonnull <E> SubGraphImplementor<E> addTreatedElementSubgraph(@Nonnull PluralAttribute<? super J, ?, ? super E> attribute, @Nonnull Class<E> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the given collection, and with the given type, which may be a subtype of the element type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the element type, the result is a treated subgraph.
- Specified by:
addTreatedElementSubgraphin interfaceGraph<J>- Specified by:
addTreatedElementSubgraphin interfaceGraph<J>- Parameters:
attribute- A collection-valued attribute of the represented typetype- A subtype of the element type
-
addTreatedElementSubgraph
@Nonnull <AJ> SubGraph<AJ> addTreatedElementSubgraph(@Nonnull PluralAttribute<? super J, ?, ? super AJ> attribute, @Nonnull ManagedType<AJ> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the given collection, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the element type, the result is a treated subgraph.
- Specified by:
addTreatedElementSubgraphin interfaceGraph<J>- Parameters:
attribute- A collection-valued attribute of the represented typetype- A subtype of the element type
-
addKeySubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map or return an existing suchSubGraphif there is one.- Specified by:
addKeySubgraphin interfaceGraph<J>- Specified by:
addKeySubgraphin interfaceGraph<J>- Parameters:
attributeName- The name of an attribute of the represented type
-
addKeySubgraph
@Nonnull <X> SubGraphImplementor<X> addKeySubgraph(@Nonnull String attributeName, @Nonnull Class<X> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.- Specified by:
addKeySubgraphin interfaceGraph<J>- Specified by:
addKeySubgraphin interfaceGraph<J>- Parameters:
attributeName- The name of a map-valued attribute of the represented typetype- A subtype of the key type
-
addTreatedMapKeySubgraph
@Nonnull <K> SubGraphImplementor<K> addTreatedMapKeySubgraph(@Nonnull MapAttribute<? super J, ? super K, ?> attribute, @Nonnull Class<K> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Specified by:
addTreatedMapKeySubgraphin interfaceGraph<J>- Specified by:
addTreatedMapKeySubgraphin interfaceGraph<J>- Parameters:
attribute- A map-valued attribute of the represented typetype- A subtype of the key type
-
addTreatedMapKeySubgraph
@Nonnull <AJ> SubGraphImplementor<AJ> addTreatedMapKeySubgraph(@Nonnull MapAttribute<? super J, ? super AJ, ?> attribute, @Nonnull ManagedType<AJ> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Specified by:
addTreatedMapKeySubgraphin interfaceGraph<J>- Parameters:
attribute- A map-valued attribute of the represented typetype- A subtype of the key type
-
hasAttributeNode
- Specified by:
hasAttributeNodein interfaceGraph<J>
-
hasAttributeNode
-