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
Class<T> getBindableJavaType()
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
Type<T> getType()
- Return:
- type of attribute
- Since:
- JPA 2.0
boolean isId()
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()
- Return:
- boolean indicating whether the attribute can be null
- Since:
- JPA 2.0
boolean isVersion()
- Return:
- boolean indicating whether the attribute is a version attribute
- Since:
- JPA 2.0