JPA Interface

SingularAttribute

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

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

Public 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.
Return:
Java type
Inherited from:
Bindable<T>
Since:
JPA 2.0
Return the bindable type of the represented object.
Return:
bindable type
Inherited from:
Bindable<T>
Since:
JPA 2.0
Type<T> getType()
Return the type that represents the type of the attribute.
Return:
type of attribute
Since:
JPA 2.0
boolean isId()
Is the attribute an id attribute.
This method will return true if the attribute is an attribute that corresponds to a simple id, an embedded id, or an attribute of an id class.
Return:
boolean indicating whether the attribute is an id
Since:
JPA 2.0
boolean isOptional()
Can the attribute be null.
Return:
boolean indicating whether the attribute can be null
Since:
JPA 2.0
boolean isVersion()
Is the attribute a version attribute.
Return:
boolean indicating whether the attribute is a version attribute
Since:
JPA 2.0