-
- Type Parameters:
X
- The represented type that contains the attributeY
- The type of the represented attribute
- All Known Subinterfaces:
- CollectionAttribute<X,E>, ListAttribute<X,E>, MapAttribute<X,K,V>, PluralAttribute<X,C,E>, SetAttribute<X,E>, SingularAttribute<X,T>
public interface Attribute<X,Y>
Represents an attribute of a Java type.- Since:
- Java Persistence 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static class
Attribute.PersistentAttributeType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description ManagedType<X>
getDeclaringType()
Return the managed type representing the type in which the attribute was declared.Member
getJavaMember()
Return thejava.lang.reflect.Member
for the represented attribute.Class<Y>
getJavaType()
Return the Java type of the represented attribute.String
getName()
Return the name of the attribute.Attribute.PersistentAttributeType
getPersistentAttributeType()
Return the persistent attribute type for the attribute.boolean
isAssociation()
Is the attribute an association.boolean
isCollection()
Is the attribute collection-valued (represents a Collection, Set, List, or Map).
-
-
-
Method Detail
-
getName
String getName()
Return the name of the attribute.- Returns:
- name
-
getPersistentAttributeType
Attribute.PersistentAttributeType getPersistentAttributeType()
Return the persistent attribute type for the attribute.- Returns:
- persistent attribute type
-
getDeclaringType
ManagedType<X> getDeclaringType()
Return the managed type representing the type in which the attribute was declared.- Returns:
- declaring type
-
getJavaType
Class<Y> getJavaType()
Return the Java type of the represented attribute.- Returns:
- Java type
-
getJavaMember
Member getJavaMember()
Return thejava.lang.reflect.Member
for the represented attribute.- Returns:
- corresponding
java.lang.reflect.Member
-
isAssociation
boolean isAssociation()
Is the attribute an association.- Returns:
- boolean indicating whether the attribute corresponds to an association
-
isCollection
boolean isCollection()
Is the attribute collection-valued (represents a Collection, Set, List, or Map).- Returns:
- boolean indicating whether the attribute is collection-valued
-
-
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
07/10/2025 04:12:00 Cette version de la page est en cache (à la date du 07/10/2025 04:12:00) 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/Attribute.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
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.