Top Description Methods
javax.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
Java Persistence 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 javax.persistence.metamodel.Attribute:
getDeclaringTypegetJavaMembergetJavaTypegetNamegetPersistentAttributeTypeisAssociationisCollection
Inherited from javax.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 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.

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

isVersionback to summary
public boolean isVersion()

Is the attribute a version attribute.

Returns:boolean

boolean indicating whether the attribute is a version attribute