-
- Type Parameters:
X
- The represented entity or mapped superclass type.
- All Superinterfaces:
- ManagedType<X>, Type<X>
- All Known Subinterfaces:
- EntityType<X>, MappedSuperclassType<X>
public interface IdentifiableType<X> extends ManagedType<X>
Instances of the typeIdentifiableType
represent entity or mapped superclass types.- Since:
- Java Persistence 2.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type
Type.PersistenceType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description <Y> SingularAttribute<X,Y>
getDeclaredId(Class<Y> type)
Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass.<Y> SingularAttribute<X,Y>
getDeclaredVersion(Class<Y> type)
Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass.<Y> SingularAttribute<? super X,Y>
getId(Class<Y> type)
Return the attribute that corresponds to the id attribute of the entity or mapped superclass.Set<SingularAttribute<? super X,?>>
getIdClassAttributes()
Return the attributes corresponding to the id class of the identifiable type.Type<?>
getIdType()
Return the type that represents the type of the id.IdentifiableType<? super X>
getSupertype()
Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.<Y> SingularAttribute<? super X,Y>
getVersion(Class<Y> type)
Return the attribute that corresponds to the version attribute of the entity or mapped superclass.boolean
hasSingleIdAttribute()
Whether the identifiable type has a single id attribute.boolean
hasVersionAttribute()
Whether the identifiable type has a version attribute.-
Methods inherited from interface javax.persistence.metamodel.ManagedType
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes
-
Methods inherited from interface javax.persistence.metamodel.Type
getJavaType, getPersistenceType
-
-
-
-
Method Detail
-
getId
<Y> SingularAttribute<? super X,Y> getId(Class<Y> type)
Return the attribute that corresponds to the id attribute of the entity or mapped superclass.- Parameters:
type
- the type of the represented id attribute- Returns:
- id attribute
- Throws:
IllegalArgumentException
- if id attribute of the given type is not present in the identifiable type or if the identifiable type has an id class
-
getDeclaredId
<Y> SingularAttribute<X,Y> getDeclaredId(Class<Y> type)
Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass.- Parameters:
type
- the type of the represented declared id attribute- Returns:
- declared id attribute
- Throws:
IllegalArgumentException
- if id attribute of the given type is not declared in the identifiable type or if the identifiable type has an id class
-
getVersion
<Y> SingularAttribute<? super X,Y> getVersion(Class<Y> type)
Return the attribute that corresponds to the version attribute of the entity or mapped superclass.- Parameters:
type
- the type of the represented version attribute- Returns:
- version attribute
- Throws:
IllegalArgumentException
- if version attribute of the given type is not present in the identifiable type
-
getDeclaredVersion
<Y> SingularAttribute<X,Y> getDeclaredVersion(Class<Y> type)
Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass.- Parameters:
type
- the type of the represented declared version attribute- Returns:
- declared version attribute
- Throws:
IllegalArgumentException
- if version attribute of the type is not declared in the identifiable type
-
getSupertype
IdentifiableType<? super X> getSupertype()
Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.- Returns:
- supertype of identifiable type or null if no such supertype
-
hasSingleIdAttribute
boolean hasSingleIdAttribute()
Whether the identifiable type has a single id attribute. Returns true for a simple id or embedded id; returns false for an idclass.- Returns:
- boolean indicating whether the identifiable type has a single id attribute
-
hasVersionAttribute
boolean hasVersionAttribute()
Whether the identifiable type has a version attribute.- Returns:
- boolean indicating whether the identifiable type has a version attribute
-
getIdClassAttributes
Set<SingularAttribute<? super X,?>> getIdClassAttributes()
Return the attributes corresponding to the id class of the identifiable type.- Returns:
- id attributes
- Throws:
IllegalArgumentException
- if the identifiable type does not have an id class
-
getIdType
Type<?> getIdType()
Return the type that represents the type of the id.- Returns:
- type of id
-
-
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/metamodel/identifiabletype.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.