Top Description Methods
jakarta.persistence.metamodel

public Interface SingularAttribute<X, T>

extends Attribute<X, T>, Bindable<T>
Type Parameters
<X>
The type containing the represented attribute
<T>
The type of the represented attribute

Instances of the type SingularAttribute represents persistent single-valued properties or fields.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public Type<T>

Returns:

type of attribute
getType
()

Return the type that represents the type of the attribute.

public boolean

Returns:

boolean indicating whether the attribute is an id
isId
()

Is the attribute an id attribute?

public boolean

Returns:

boolean indicating whether the attribute can be null
isOptional
()

Can the attribute be null?

public boolean

Returns:

boolean indicating whether the attribute is a version attribute
isVersion
()

Is the attribute a version attribute?

Inherited from jakarta.persistence.metamodel.Attribute:
getDeclaringTypegetJavaMembergetJavaTypegetNamegetPersistentAttributeTypeisAssociationisCollection
Inherited from jakarta.persistence.metamodel.Bindable:
getBindableJavaTypegetBindableType

Method Detail

getTypeback to summary
public Type<T> getType()

Return the type that represents the type of the attribute.

Returns:Type<T>

type of attribute

isIdback to summary
public 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

boolean indicating whether the attribute is an id

isOptionalback to summary
public boolean isOptional()

Can the attribute be null?

Returns:boolean

boolean indicating whether the attribute can be null

See Also
jakarta.persistence.Basic#optional
isVersionback to summary
public boolean isVersion()

Is the attribute a version attribute?

Returns:boolean

boolean indicating whether the attribute is a version attribute