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

public Class MappedSuperclassTypeImpl<X>

extends IdentifiableTypeImpl<X>
implements MappedSuperclassType<X>
Class Inheritance
All Implemented Interfaces
jakarta.persistence.metamodel.MappedSuperclassType, jakarta.persistence.metamodel.IdentifiableType, jakarta.persistence.metamodel.ManagedType, jakarta.persistence.metamodel.Type
Type Parameters
<X>
The represented entity type
Imports
java.util.HashMap, .Map, jakarta.persistence.metamodel.MappedSuperclassType, org.eclipse.persistence.descriptors.ClassDescriptor

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

Description: Instances of the type MappedSuperclassType represent mapped superclass types.

Since
EclipseLink 1.2 - JPA 2.0
See Also
jakarta.persistence.metamodel.MappedSuperclassType

Field Summary

Modifier and TypeField and Description
private Map<Class<?>, IdentifiableTypeImpl<X>>
inheritingIdentifiableTypes

INTERNAL: The map of Identifiable types that inherit from this MappedSuperclass.

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
MappedSuperclassTypeImpl(MetamodelImpl metamodel, ClassDescriptor relationalDescriptor)

Method Summary

Modifier and TypeMethod and Description
protected void
addInheritingType(IdentifiableTypeImpl<X> identifiableType)

INTERNAL: Add an inheriting subclass to the map of Identifiable types that inherit from this mappedSuperclass.

protected static MappedSuperclassTypeImpl<?>
create(MetamodelImpl metamodel, ClassDescriptor relationalDescriptor)

Hides org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.create.

INTERNAL: Return an instance of a MappedSuperclassType based on the RelationalDescriptor.
public AttributeImpl<X, T>
getMemberFromInheritingType(String name)

INTERNAL: MappedSuperclasses need special handling to get their type from an inheriting subclass.

public Type.PersistenceType

Returns:

persistence type
getPersistenceType
()

Implements jakarta.persistence.metamodel.Type.getPersistenceType.

Return the persistence type.
protected void
initialize()

Overrides org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.initialize.

INTERNAL: Initialize the members of this ManagedType based on the mappings defined on the descriptor.
public boolean
isEntity()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.TypeImpl.isEntity.

INTERNAL: Return whether this type is an Entity (true) or MappedSuperclass (false) or Embeddable (false)
public boolean
isMappedSuperclass()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.TypeImpl.isMappedSuperclass.

INTERNAL: Return whether this type is an MappedSuperclass (true) or Entity (false) or Embeddable (false)
Inherited from org.eclipse.persistence.internal.jpa.metamodel.IdentifiableTypeImpl:
getDeclaredIdgetDeclaredVersiongetIdgetIdClassAttributesgetIdTypegetSupertypegetVersionhasSingleIdAttributehasVersionAttributeinitializeIdAttributesisIdentifiableTypesetSupertype

Field Detail

inheritingIdentifiableTypesback to summary
private Map<Class<?>, IdentifiableTypeImpl<X>> inheritingIdentifiableTypes

INTERNAL: The map of Identifiable types that inherit from this MappedSuperclass. The scope of this map is outside of the JPA 2.0 specification and is limited to MappedSuperclass types. The types in this map are keyed on the Java class of the inheriting type. This map acts as the reverse of all superType fields that point to "this" MappedSuperclass.

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

MappedSuperclassTypeImplback to summary
protected MappedSuperclassTypeImpl(MetamodelImpl metamodel, ClassDescriptor relationalDescriptor)

Method Detail

addInheritingTypeback to summary
protected void addInheritingType(IdentifiableTypeImpl<X> identifiableType)

INTERNAL: Add an inheriting subclass to the map of Identifiable types that inherit from this mappedSuperclass.

createback to summary
protected static MappedSuperclassTypeImpl<?> create(MetamodelImpl metamodel, ClassDescriptor relationalDescriptor)

Hides org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.create.

INTERNAL: Return an instance of a MappedSuperclassType based on the RelationalDescriptor.

getMemberFromInheritingTypeback to summary
public AttributeImpl<X, T> getMemberFromInheritingType(String name)

INTERNAL: MappedSuperclasses need special handling to get their type from an inheriting subclass. This function determines the type for an attribute by returning the same inherited attribute from a subclass

getPersistenceTypeback to summary
public Type.PersistenceType getPersistenceType()

Implements jakarta.persistence.metamodel.Type.getPersistenceType.

Return the persistence type.

Returns:Type.PersistenceType

persistence type

Annotations
@Override
initializeback to summary
protected void initialize()

Overrides org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.initialize.

Doc from org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.initialize.

INTERNAL: Initialize the members of this ManagedType based on the mappings defined on the descriptor. We process the appropriate Map, List, Set, Collection or Object/primitive types.

Initialization should occur after all types in the metamodel have been created already.

Annotations
@Override
isEntityback to summary
public boolean isEntity()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.TypeImpl.isEntity.

INTERNAL: Return whether this type is an Entity (true) or MappedSuperclass (false) or Embeddable (false)

Annotations
@Override
isMappedSuperclassback to summary
public boolean isMappedSuperclass()

Implements abstract org.eclipse.persistence.internal.jpa.metamodel.TypeImpl.isMappedSuperclass.

INTERNAL: Return whether this type is an MappedSuperclass (true) or Entity (false) or Embeddable (false)

Annotations
@Override