javax.persistence.metamodel

Interface IdentifiableType<X>

  • 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 type IdentifiableType represent entity or mapped superclass types.
    Since:
    Java Persistence 2.0
    • 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

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

22/08/2025 05:26:38 Cette version de la page est en cache (à la date du 22/08/2025 05:26:38) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/persistence/metamodel/identifiabletype.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.