-
- Type Parameters:
T
- The type of the attribute.
public interface Subgraph<T>
This type represents a subgraph for an attribute node that corresponds to a Managed Type. Using this class, an entity subgraph can be embedded within an EntityGraph.- Since:
- Java Persistence 2.1
- See Also:
EntityGraph
,AttributeNode
,NamedSubgraph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
addAttributeNodes(Attribute<T,?>... attribute)
Add one or more attribute nodes to the entity graph.void
addAttributeNodes(String... attributeName)
Add one or more attribute nodes to the entity graph.<X> Subgraph<X>
addKeySubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a map key that is a managed type.<X> Subgraph<? extends X>
addKeySubgraph(Attribute<T,X> attribute, Class<? extends X> type)
Add a node to the graph that corresponds to a map key that is a managed type with inheritance.<X> Subgraph<X>
addKeySubgraph(String attributeName)
Add a node to the graph that corresponds to a map key that is a managed type.<X> Subgraph<X>
addKeySubgraph(String attributeName, Class<X> type)
Add a node to the graph that corresponds to a map key that is a managed type with inheritance.<X> Subgraph<X>
addSubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a managed type.<X> Subgraph<? extends X>
addSubgraph(Attribute<T,X> attribute, Class<? extends X> type)
Add a node to the graph that corresponds to a managed type with inheritance.<X> Subgraph<X>
addSubgraph(String attributeName)
Add a node to the graph that corresponds to a managed type.<X> Subgraph<X>
addSubgraph(String attributeName, Class<X> type)
Add a node to the graph that corresponds to a managed type with inheritance.List<AttributeNode<?>>
getAttributeNodes()
Return the attribute nodes corresponding to the attributes of this managed type that are included in the subgraph.Class<T>
getClassType()
Return the type for which this subgraph was defined.
-
-
-
Method Detail
-
addAttributeNodes
void addAttributeNodes(String... attributeName)
Add one or more attribute nodes to the entity graph.- Parameters:
attributeName
- name of the attribute- Throws:
IllegalArgumentException
- if the attribute is not an attribute of this managed type.IllegalStateException
- if the EntityGraph has been statically defined
-
addAttributeNodes
void addAttributeNodes(Attribute<T,?>... attribute)
Add one or more attribute nodes to the entity graph.- Parameters:
attribute
- attribute- Throws:
IllegalStateException
- if this EntityGraph has been statically defined
-
addSubgraph
<X> Subgraph<X> addSubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a managed type. This allows for construction of multi-node entity graphs that include related managed types.- Parameters:
attribute
- attribute- Returns:
- subgraph for the attribute
- Throws:
IllegalArgumentException
- if the attribute's target type is not a managed typeIllegalStateException
- if the EntityGraph has been statically defined
-
addSubgraph
<X> Subgraph<? extends X> addSubgraph(Attribute<T,X> attribute, Class<? extends X> type)
Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs- Parameters:
attribute
- attributetype
- entity subclass- Returns:
- subgraph for the attribute
- Throws:
IllegalArgumentException
- if the attribute's target type is not a managed typeIllegalStateException
- if this EntityGraph has been statically defined
-
addSubgraph
<X> Subgraph<X> addSubgraph(String attributeName)
Add a node to the graph that corresponds to a managed type. This allows for construction of multi-node entity graphs that include related managed types.- Parameters:
attributeName
- name of the attribute- Returns:
- subgraph for the attribute
- Throws:
IllegalArgumentException
- if the attribute is not an attribute of this managed type.IllegalArgumentException
- if the attribute's target type is not a managed typeIllegalStateException
- if this EntityGraph has been statically defined
-
addSubgraph
<X> Subgraph<X> addSubgraph(String attributeName, Class<X> type)
Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs- Parameters:
attributeName
- name of the attributetype
- entity subclass- Returns:
- subgraph for the attribute
- Throws:
IllegalArgumentException
- if the attribute is not an attribute of this managed type.IllegalArgumentException
- if the attribute's target type is not a managed typeIllegalStateException
- if this EntityGraph has been statically defined
-
addKeySubgraph
<X> Subgraph<X> addKeySubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multinode entity graphs that include related managed types.- Parameters:
attribute
- attribute- Returns:
- subgraph for the key attribute
- Throws:
IllegalArgumentException
- if the attribute's target type is not a managed type entityIllegalStateException
- if this EntityGraph has been statically defined
-
addKeySubgraph
<X> Subgraph<? extends X> addKeySubgraph(Attribute<T,X> attribute, Class<? extends X> type)
Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs- Parameters:
attribute
- attributetype
- entity subclass- Returns:
- subgraph for the attribute
- Throws:
IllegalArgumentException
- if the attribute's target type is not a managed type entityIllegalStateException
- if this EntityGraph has been statically defined
-
addKeySubgraph
<X> Subgraph<X> addKeySubgraph(String attributeName)
Add a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multi-node entity graphs that include related managed types.- Parameters:
attributeName
- name of the attribute- Returns:
- subgraph for the key attribute
- Throws:
IllegalArgumentException
- if the attribute is not an attribute of this entity.IllegalArgumentException
- if the attribute's target type is not a managed typeIllegalStateException
- if this EntityGraph has been statically defined
-
addKeySubgraph
<X> Subgraph<X> addKeySubgraph(String attributeName, Class<X> type)
Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will include the specified attributes of superclass subgraphs- Parameters:
attributeName
- name of the attributetype
- entity subclass- Returns:
- subgraph for the attribute
- Throws:
IllegalArgumentException
- if the attribute is not an attribute of this entity.IllegalArgumentException
- if the attribute's target type is not a managed typeIllegalStateException
- if this EntityGraph has been statically defined
-
getAttributeNodes
List<AttributeNode<?>> getAttributeNodes()
Return the attribute nodes corresponding to the attributes of this managed type that are included in the subgraph.- Returns:
- list of attribute nodes included in the subgraph or empty List if none have been defined
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/persistence/Subgraph.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.