Class MappedSuperclassTypeImpl<X>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metamodel.TypeImpl<X>
-
- org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl<X>
-
- org.eclipse.persistence.internal.jpa.metamodel.IdentifiableTypeImpl<X>
-
- org.eclipse.persistence.internal.jpa.metamodel.MappedSuperclassTypeImpl<X>
-
- Type Parameters:
X- The represented entity type
- All Implemented Interfaces:
java.io.Serializable,javax.persistence.metamodel.IdentifiableType<X>,javax.persistence.metamodel.ManagedType<X>,javax.persistence.metamodel.MappedSuperclassType<X>,javax.persistence.metamodel.Type<X>
public class MappedSuperclassTypeImpl<X> extends IdentifiableTypeImpl<X> implements javax.persistence.metamodel.MappedSuperclassType<X>
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:
MappedSuperclassType, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl
descriptor, metamodel
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMappedSuperclassTypeImpl(MetamodelImpl metamodel, org.eclipse.persistence.descriptors.ClassDescriptor relationalDescriptor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddInheritingType(IdentifiableTypeImpl identifiableType)INTERNAL: Add an inheriting subclass to the map of Identifiable types that inherit from this mappedSuperclass.protected static MappedSuperclassTypeImpl<?>create(MetamodelImpl metamodel, org.eclipse.persistence.descriptors.ClassDescriptor relationalDescriptor)INTERNAL: Return an instance of a MappedSuperclassType based on the RelationalDescriptor.AttributeImplgetMemberFromInheritingType(java.lang.String name)INTERNAL: MappedSuperclasses need special handling to get their type from an inheriting subclass.javax.persistence.metamodel.Type.PersistenceTypegetPersistenceType()Return the persistence type.protected voidinitialize()INTERNAL: Initialize the members of this ManagedType based on the mappings defined on the descriptor.booleanisEntity()INTERNAL: Return whether this type is an Entity (true) or MappedSuperclass (false) or Embeddable (false)booleanisMappedSuperclass()INTERNAL: Return whether this type is an MappedSuperclass (true) or Entity (false) or Embeddable (false)-
Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.IdentifiableTypeImpl
getDeclaredId, getDeclaredVersion, getId, getIdClassAttributes, getIdType, getSupertype, getVersion, hasSingleIdAttribute, hasVersionAttribute, initializeIdAttributes, isIdentifiableType, setSupertype
-
Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getDescriptor, getList, getList, getMap, getMap, getMembers, getMetamodel, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes, getTypeClassFromAttributeOrMethodLevelAccessor, isManagedType, toStringHelper
-
Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.TypeImpl
getJavaType, getJavaType, getJavaTypeName, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.persistence.metamodel.IdentifiableType
getDeclaredId, getDeclaredVersion, getId, getIdClassAttributes, getIdType, getSupertype, getVersion, hasSingleIdAttribute, hasVersionAttribute
-
Methods inherited from interface javax.persistence.metamodel.ManagedType
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes
-
-
-
-
Constructor Detail
-
MappedSuperclassTypeImpl
protected MappedSuperclassTypeImpl(MetamodelImpl metamodel, org.eclipse.persistence.descriptors.ClassDescriptor relationalDescriptor)
-
-
Method Detail
-
addInheritingType
protected void addInheritingType(IdentifiableTypeImpl identifiableType)
INTERNAL: Add an inheriting subclass to the map of Identifiable types that inherit from this mappedSuperclass.- Parameters:
identifiableType-
-
create
protected static MappedSuperclassTypeImpl<?> create(MetamodelImpl metamodel, org.eclipse.persistence.descriptors.ClassDescriptor relationalDescriptor)
INTERNAL: Return an instance of a MappedSuperclassType based on the RelationalDescriptor.- Parameters:
metamodel-relationalDescriptor-- Returns:
-
getMemberFromInheritingType
public AttributeImpl getMemberFromInheritingType(java.lang.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- Parameters:
name-- Returns:
-
getPersistenceType
public javax.persistence.metamodel.Type.PersistenceType getPersistenceType()
Return the persistence type.- Specified by:
getPersistenceTypein interfacejavax.persistence.metamodel.Type<X>- Returns:
- persistence type
-
initialize
protected void initialize()
Description copied from class:ManagedTypeImplINTERNAL: 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.
- Overrides:
initializein classManagedTypeImpl<X>
-
isEntity
public boolean isEntity()
INTERNAL: Return whether this type is an Entity (true) or MappedSuperclass (false) or Embeddable (false)
-
isMappedSuperclass
public boolean isMappedSuperclass()
INTERNAL: Return whether this type is an MappedSuperclass (true) or Entity (false) or Embeddable (false)- Specified by:
isMappedSuperclassin classTypeImpl<X>- Returns:
-
-