Class 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
    • 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:
        getPersistenceType in interface javax.persistence.metamodel.Type<X>
        Returns:
        persistence type
      • initialize

        protected void initialize()
        Description copied from class: ManagedTypeImpl
        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.

        Overrides:
        initialize in class ManagedTypeImpl<X>
      • isEntity

        public boolean isEntity()
        INTERNAL: Return whether this type is an Entity (true) or MappedSuperclass (false) or Embeddable (false)
        Specified by:
        isEntity in class TypeImpl<X>
        Returns:
      • isMappedSuperclass

        public boolean isMappedSuperclass()
        INTERNAL: Return whether this type is an MappedSuperclass (true) or Entity (false) or Embeddable (false)
        Specified by:
        isMappedSuperclass in class TypeImpl<X>
        Returns: