Jakarta Persistence (JPA) Interface

jakarta.persistence.metamodel.SingularAttribute<X,T>

Type Parameters:
<X> - The type containing the represented attribute
<T> - The type of the represented attribute
Super Interfaces:
Attribute<X,Y>, Bindable<T>

Instances of the type SingularAttribute represents persistent single-valued properties or fields.
Since:
Jakarta Persistence (JPA) 2.0

Public Instance Methods

Return the Java type of the represented object.
If the bindable type of the object is PLURAL_ATTRIBUTE, the Java element type is returned. If the bindable type is SINGULAR_ATTRIBUTE or ENTITY_TYPE, the Java type of the represented entity or attribute is returned.
Inherited from Bindable<T>
Returns:
Java type.
Since:
Jakarta Persistence (JPA) 1.0
Return the bindable type of the represented object.
Inherited from Bindable<T>
Returns:
bindable type.
Since:
Jakarta Persistence (JPA) 1.0
Return the managed type representing the type in which the attribute was declared.
Inherited from Attribute<X,Y>
Returns:
declaring type.
Since:
Jakarta Persistence (JPA) 1.0
Member getJavaMember()
Return the Member for the represented attribute.
Inherited from Attribute<X,Y>
Returns:
corresponding Member.
Since:
Jakarta Persistence (JPA) 1.0
Class<Y> getJavaType()
Return the Java type of the represented attribute.
Inherited from Attribute<X,Y>
Returns:
Java type.
Since:
Jakarta Persistence (JPA) 1.0
String getName()
Return the name of the attribute.
Inherited from Attribute<X,Y>
Returns:
name.
Since:
Jakarta Persistence (JPA) 1.0
Return the persistent attribute type for the attribute.
Inherited from Attribute<X,Y>
Returns:
persistent attribute type.
Since:
Jakarta Persistence (JPA) 1.0
Return the type that represents the type of the attribute.
Returns:
type of attribute.
Since:
Jakarta Persistence (JPA) 1.0
boolean isAssociation()
Is the attribute an association.
Inherited from Attribute<X,Y>
Returns:
boolean indicating whether the attribute corresponds to an association.
Since:
Jakarta Persistence (JPA) 1.0
boolean isCollection()
Is the attribute collection-valued (represents a Collection, Set, List, or Map).
Inherited from Attribute<X,Y>
Returns:
boolean indicating whether the attribute is collection-valued.
Since:
Jakarta Persistence (JPA) 1.0
boolean isId()
Is the attribute an id attribute? This method returns true if the attribute is a simple id, an embedded id, or an attribute of an id class.
Returns:
boolean indicating whether the attribute is an id.
Since:
Jakarta Persistence (JPA) 1.0
boolean isOptional()
Can the attribute be null?
Returns:
boolean indicating whether the attribute can be null.
See Also:
Since:
Jakarta Persistence (JPA) 1.0
boolean isVersion()
Is the attribute a version attribute?
Returns:
boolean indicating whether the attribute is a version attribute.
Since:
Jakarta Persistence (JPA) 1.0