Top Description Inners Methods
javax.persistence.metamodel

public Interface Attribute<X, Y>

Known Direct Subinterfaces
javax.persistence.metamodel.PluralAttribute, javax.persistence.metamodel.SingularAttribute
Type Parameters
<X>
The represented type that contains the attribute
<Y>
The type of the represented attribute

Represents an attribute of a Java type.
Since
Java Persistence 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public ManagedType<X>

Returns:

declaring type
getDeclaringType
()

Return the managed type representing the type in which the attribute was declared.

public Member

Returns:

corresponding java.lang.reflect.Member
getJavaMember
()

Return the java.lang.reflect.Member for the represented attribute.

public Class<Y>

Returns:

Java type
getJavaType
()

Return the Java type of the represented attribute.

public String

Returns:

name
getName
()

Return the name of the attribute.

public Attribute.PersistentAttributeType

Returns:

persistent attribute type
getPersistentAttributeType
()

Return the persistent attribute type for the attribute.

public boolean

Returns:

boolean indicating whether the attribute corresponds to an association
isAssociation
()

Is the attribute an association.

public boolean

Returns:

boolean indicating whether the attribute is collection-valued
isCollection
()

Is the attribute collection-valued (represents a Collection, Set, List, or Map).

Method Detail

getDeclaringTypeback to summary
public ManagedType<X> getDeclaringType()

Return the managed type representing the type in which the attribute was declared.

Returns:ManagedType<X>

declaring type

getJavaMemberback to summary
public Member getJavaMember()

Return the java.lang.reflect.Member for the represented attribute.

Returns:Member

corresponding java.lang.reflect.Member

getJavaTypeback to summary
public Class<Y> getJavaType()

Return the Java type of the represented attribute.

Returns:Class<Y>

Java type

getNameback to summary
public String getName()

Return the name of the attribute.

Returns:String

name

getPersistentAttributeTypeback to summary
public Attribute.PersistentAttributeType getPersistentAttributeType()

Return the persistent attribute type for the attribute.

Returns:Attribute.PersistentAttributeType

persistent attribute type

isAssociationback to summary
public boolean isAssociation()

Is the attribute an association.

Returns:boolean

boolean indicating whether the attribute corresponds to an association

isCollectionback to summary
public boolean isCollection()

Is the attribute collection-valued (represents a Collection, Set, List, or Map).

Returns:boolean

boolean indicating whether the attribute is collection-valued

javax.persistence.metamodel back to summary

public final Enum Attribute.PersistentAttributeType

extends Enum<Attribute.PersistentAttributeType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Attribute.PersistentAttributeType
BASIC

Basic attribute

public static final Attribute.PersistentAttributeType
ELEMENT_COLLECTION

Element collection

public static final Attribute.PersistentAttributeType
EMBEDDED

Embeddable class attribute

public static final Attribute.PersistentAttributeType
MANY_TO_MANY

Many-to-many association

public static final Attribute.PersistentAttributeType
MANY_TO_ONE

Many-to-one association

public static final Attribute.PersistentAttributeType
ONE_TO_MANY

One-to-many association

public static final Attribute.PersistentAttributeType
ONE_TO_ONE

One-to-one association

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Attribute.PersistentAttributeType
public static Attribute.PersistentAttributeType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BASICback to summary
public static final Attribute.PersistentAttributeType BASIC

Basic attribute

ELEMENT_COLLECTIONback to summary
public static final Attribute.PersistentAttributeType ELEMENT_COLLECTION

Element collection

EMBEDDEDback to summary
public static final Attribute.PersistentAttributeType EMBEDDED

Embeddable class attribute

MANY_TO_MANYback to summary
public static final Attribute.PersistentAttributeType MANY_TO_MANY

Many-to-many association

MANY_TO_ONEback to summary
public static final Attribute.PersistentAttributeType MANY_TO_ONE

Many-to-one association

ONE_TO_MANYback to summary
public static final Attribute.PersistentAttributeType ONE_TO_MANY

One-to-many association

ONE_TO_ONEback to summary
public static final Attribute.PersistentAttributeType ONE_TO_ONE

One-to-one association

Constructor Detail

PersistentAttributeTypeback to summary
private PersistentAttributeType()

Method Detail

valueOfback to summary
public static Attribute.PersistentAttributeType valueOf(String name)
valuesback to summary
public static Attribute.PersistentAttributeType[] values()