Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metamodel

public Class SingularAttributeImpl<X, T>

extends AttributeImpl<X, T>
implements SingularAttribute<X, T>
Class Inheritance
All Implemented Interfaces
jakarta.persistence.metamodel.SingularAttribute, jakarta.persistence.metamodel.Bindable, jakarta.persistence.metamodel.Attribute
Type Parameters
<X>
The type containing the represented attribute
<T>
The type of the represented attribute
Imports
java.lang.reflect.Field, jakarta.persistence.metamodel.Bindable, .SingularAttribute, .Type, org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy, org.eclipse.persistence.logging.AbstractSessionLog, .SessionLog, org.eclipse.persistence.mappings.AggregateMapping, .DatabaseMapping, .ForeignReferenceMapping, .VariableOneToOneMapping, org.eclipse.persistence.mappings.structures.ReferenceMapping

Purpose: Provides the implementation for the SingularAttribute interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)

Description: Instances of the type SingularAttribute represents persistent single-valued properties or fields.

Author
Michael O'Brien
Since
EclipseLink 1.2 - JPA 2.0
See Also
jakarta.persistence.metamodel.SingularAttribute

Field Summary

Modifier and TypeField and Description
private Type<T>
elementType

The Type representing this Entity or Basic type

private static final long
serialVersionUID

Item 54: DI 89: explicit UID will avoid performance hit runtime generation of one

Constructor Summary

AccessConstructor and Description
protected
SingularAttributeImpl(ManagedTypeImpl<X> managedType, DatabaseMapping mapping)

Create an instance of the Attribute

protected
SingularAttributeImpl(ManagedTypeImpl<X> managedType, DatabaseMapping mapping, boolean validationEnabled)

INTERNAL: Create an Attribute instance with a passed in validation flag (usually set to true only during Metamodel initialization)

Method Summary

Modifier and TypeMethod and Description
public Class<T>

Returns:

Java type
getBindableJavaType
()

Implements jakarta.persistence.metamodel.Bindable.getBindableJavaType.

Return the Java type of the represented object.
public Bindable.BindableType
getBindableType()

Implements jakarta.persistence.metamodel.Bindable.getBindableType.

Return the bindable type of the represented object.
public Class<T>

Returns:

Java type
getJavaType
()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl.getJavaType.

Implements jakarta.persistence.metamodel.Attribute.getJavaType.

Return the Java type of the represented attribute.
public Type<T>

Returns:

type of attribute
getType
()

Implements jakarta.persistence.metamodel.SingularAttribute.getType.

Return the type that represents the type of the attribute.
public boolean

Returns:

boolean indicating whether or not attribute is an id
isId
()

Implements jakarta.persistence.metamodel.SingularAttribute.isId.

Is the attribute an id attribute.
public boolean

Returns:

boolean indicating whether or not the attribute can be null
isOptional
()

Implements jakarta.persistence.metamodel.SingularAttribute.isOptional.

Can the attribute be null.
public boolean
isPlural()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl.isPlural.

INTERNAL: Return whether the attribute is plural or singular
public boolean

Returns:

boolean indicating whether or not attribute is a version attribute
isVersion
()

Implements jakarta.persistence.metamodel.SingularAttribute.isVersion.

Is the attribute a version attribute.
public String
toString()

Overrides java.lang.Object.toString.

Return the String representation of the receiver.
Inherited from org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl:
getDeclaringTypegetDescriptorgetJavaMembergetManagedTypeImplgetMappinggetMetamodelgetNamegetPersistentAttributeTypeisAssociationisCollection

Field Detail

elementTypeback to summary
private Type<T> elementType

The Type representing this Entity or Basic type

serialVersionUIDback to summary
private static final long serialVersionUID

Item 54: DI 89: explicit UID will avoid performance hit runtime generation of one

Constructor Detail

SingularAttributeImplback to summary
protected SingularAttributeImpl(ManagedTypeImpl<X> managedType, DatabaseMapping mapping)

Create an instance of the Attribute

SingularAttributeImplback to summary
protected SingularAttributeImpl(ManagedTypeImpl<X> managedType, DatabaseMapping mapping, boolean validationEnabled)

INTERNAL: Create an Attribute instance with a passed in validation flag (usually set to true only during Metamodel initialization)

Method Detail

getBindableJavaTypeback to summary
public Class<T> getBindableJavaType()

Implements jakarta.persistence.metamodel.Bindable.getBindableJavaType.

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.

Returns:Class<T>

Java type

Annotations
@Override
getBindableTypeback to summary
public Bindable.BindableType getBindableType()

Implements jakarta.persistence.metamodel.Bindable.getBindableType.

Doc from jakarta.persistence.metamodel.Bindable.getBindableType.

Return the bindable type of the represented object.

Returns:Bindable.BindableType

bindable type

Annotations
@Override
getJavaTypeback to summary
public Class<T> getJavaType()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl.getJavaType.

Implements jakarta.persistence.metamodel.Attribute.getJavaType.

Return the Java type of the represented attribute.

Returns:Class<T>

Java type

Annotations
@Override
@SuppressWarnings:unchecked
getTypeback to summary
public Type<T> getType()

Implements jakarta.persistence.metamodel.SingularAttribute.getType.

Return the type that represents the type of the attribute.

Returns:Type<T>

type of attribute

Annotations
@Override
isIdback to summary
public boolean isId()

Implements jakarta.persistence.metamodel.SingularAttribute.isId.

Is the attribute an id attribute.

Returns:boolean

boolean indicating whether or not attribute is an id

Annotations
@Override
isOptionalback to summary
public boolean isOptional()

Implements jakarta.persistence.metamodel.SingularAttribute.isOptional.

Can the attribute be null.

Returns:boolean

boolean indicating whether or not the attribute can be null

Annotations
@Override
isPluralback to summary
public boolean isPlural()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl.isPlural.

INTERNAL: Return whether the attribute is plural or singular

Annotations
@Override
isVersionback to summary
public boolean isVersion()

Implements jakarta.persistence.metamodel.SingularAttribute.isVersion.

Is the attribute a version attribute.

Returns:boolean

boolean indicating whether or not attribute is a version attribute

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return the String representation of the receiver.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override