Class ManagedTypeImpl<X>

  • Type Parameters:
    X - The represented type.
    All Implemented Interfaces:
    java.io.Serializable, javax.persistence.metamodel.ManagedType<X>, javax.persistence.metamodel.Type<X>
    Direct Known Subclasses:
    EmbeddableTypeImpl, IdentifiableTypeImpl

    public abstract class ManagedTypeImpl<X>
    extends TypeImpl<X>
    implements javax.persistence.metamodel.ManagedType<X>

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

    Description: Instances of the type ManagedType represent entities, mapped superclasses and embeddable types.

    Since:
    EclipseLink 1.2 - JPA 2.0
    See Also:
    ManagedType, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type

        javax.persistence.metamodel.Type.PersistenceType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.persistence.descriptors.ClassDescriptor descriptor
      Native RelationalDescriptor that contains all the mappings of this type
      protected MetamodelImpl metamodel
      Reference to the metamodel that this managed type belongs to
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ManagedTypeImpl​(MetamodelImpl metamodel, org.eclipse.persistence.descriptors.ClassDescriptor descriptor)
      INTERNAL: This constructor will create a ManagedType but will not initialize its member mappings.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static ManagedTypeImpl<?> create​(MetamodelImpl metamodel, org.eclipse.persistence.descriptors.ClassDescriptor descriptor)
      INTERNAL: Return an instance of a ManagedType based on the RelationalDescriptor parameter
      javax.persistence.metamodel.Attribute<X,​?> getAttribute​(java.lang.String name)
      Return the attribute of the managed type that corresponds to the specified name.
      java.util.Set<javax.persistence.metamodel.Attribute<? super X,​?>> getAttributes()
      Return the attributes of the managed type.
      javax.persistence.metamodel.CollectionAttribute<? super X,​?> getCollection​(java.lang.String name)
      Return the Collection-valued attribute of the managed type that corresponds to the specified name.
      <E> javax.persistence.metamodel.CollectionAttribute<? super X,​E> getCollection​(java.lang.String name, java.lang.Class<E> elementType)
      Return the Collection-valued attribute of the managed type that corresponds to the specified name and Java element type.
      javax.persistence.metamodel.Attribute<X,​?> getDeclaredAttribute​(java.lang.String name)
      Return the declared attribute of the managed type that corresponds to the specified name.
      protected javax.persistence.metamodel.Attribute<X,​?> getDeclaredAttribute​(java.lang.String name, boolean attributeKnownToExistOnLeafTarget)
      INTERNAL: Return the declared attribute of the managed type that corresponds to the specified name.
      java.util.Set<javax.persistence.metamodel.Attribute<X,​?>> getDeclaredAttributes()
      Return the attributes declared by the managed type.
      javax.persistence.metamodel.CollectionAttribute<X,​?> getDeclaredCollection​(java.lang.String name)
      Return the Collection-valued attribute declared by the managed type that corresponds to the specified name.
      <E> javax.persistence.metamodel.CollectionAttribute<X,​E> getDeclaredCollection​(java.lang.String name, java.lang.Class<E> elementType)
      Return the Collection-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
      javax.persistence.metamodel.ListAttribute<X,​?> getDeclaredList​(java.lang.String name)
      Return the List-valued attribute declared by the managed type that corresponds to the specified name.
      <E> javax.persistence.metamodel.ListAttribute<X,​E> getDeclaredList​(java.lang.String name, java.lang.Class<E> elementType)
      Return the List-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
      javax.persistence.metamodel.MapAttribute<X,​?,​?> getDeclaredMap​(java.lang.String name)
      Return the Map-valued attribute of the managed type that corresponds to the specified name.
      <K,​V>
      javax.persistence.metamodel.MapAttribute<X,​K,​V>
      getDeclaredMap​(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
      Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key and value types.
      java.util.Set<javax.persistence.metamodel.PluralAttribute<X,​?,​?>> getDeclaredPluralAttributes()
      Return all collection-valued attributes declared by the managed type.
      javax.persistence.metamodel.SetAttribute<X,​?> getDeclaredSet​(java.lang.String name)
      Return the Set-valued attribute declared by the managed type that corresponds to the specified name.
      <E> javax.persistence.metamodel.SetAttribute<X,​E> getDeclaredSet​(java.lang.String name, java.lang.Class<E> elementType)
      Return the Set-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
      javax.persistence.metamodel.SingularAttribute<X,​?> getDeclaredSingularAttribute​(java.lang.String name)
      Return the declared single-valued attribute of the managed type that corresponds to the specified name in the represented type.
      <Y> javax.persistence.metamodel.SingularAttribute<X,​Y> getDeclaredSingularAttribute​(java.lang.String name, java.lang.Class<Y> type)
      Return the declared single-valued attribute of the managed type that corresponds to the specified name and Java type in the represented type.
      java.util.Set<javax.persistence.metamodel.SingularAttribute<X,​?>> getDeclaredSingularAttributes()
      Return the single-valued attributes declared by the managed type.
      org.eclipse.persistence.descriptors.ClassDescriptor getDescriptor()
      INTERNAL: Return the RelationalDescriptor associated with this ManagedType
      javax.persistence.metamodel.ListAttribute<? super X,​?> getList​(java.lang.String name)
      Return the List-valued attribute of the managed type that corresponds to the specified name.
      <E> javax.persistence.metamodel.ListAttribute<? super X,​E> getList​(java.lang.String name, java.lang.Class<E> elementType)
      Return the List-valued attribute of the managed type that corresponds to the specified name and Java element type.
      javax.persistence.metamodel.MapAttribute<? super X,​?,​?> getMap​(java.lang.String name)
      Return the Map-valued attribute of the managed type that corresponds to the specified name.
      <K,​V>
      javax.persistence.metamodel.MapAttribute<? super X,​K,​V>
      getMap​(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
      Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key and value types.
      protected java.util.Map<java.lang.String,​javax.persistence.metamodel.Attribute<X,​?>> getMembers()
      INTERNAL: Return the Map of AttributeImpl members keyed by String.
      protected MetamodelImpl getMetamodel()
      INTERNAL: Return the Metamodel that this ManagedType is associated with.
      java.util.Set<javax.persistence.metamodel.PluralAttribute<? super X,​?,​?>> getPluralAttributes()
      Return all collection-valued attributes of the managed type.
      javax.persistence.metamodel.SetAttribute<? super X,​?> getSet​(java.lang.String name)
      Return the Set-valued attribute of the managed type that corresponds to the specified name.
      <E> javax.persistence.metamodel.SetAttribute<? super X,​E> getSet​(java.lang.String name, java.lang.Class<E> elementType)
      Return the Set-valued attribute of the managed type that corresponds to the specified name and Java element type.
      javax.persistence.metamodel.SingularAttribute<? super X,​?> getSingularAttribute​(java.lang.String name)
      Return the single-valued attribute of the managed type that corresponds to the specified name in the represented type.
      <Y> javax.persistence.metamodel.SingularAttribute<? super X,​Y> getSingularAttribute​(java.lang.String name, java.lang.Class<Y> type)
      Return the single-valued attribute of the managed type that corresponds to the specified name and Java type in the represented type.
      java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,​?>> getSingularAttributes()
      Return the single-valued attributes of the managed type.
      protected java.lang.Class getTypeClassFromAttributeOrMethodLevelAccessor​(org.eclipse.persistence.mappings.DatabaseMapping mapping)
      INTERNAL: Get the elementType directly from the class using a reflective method call directly on the containing java class associated with this managedType.
      protected void initialize()
      INTERNAL: Initialize the members of this ManagedType based on the mappings defined on the descriptor.
      protected boolean isIdentifiableType()
      INTERNAL: Return whether this type is identifiable.
      protected boolean isManagedType()
      INTERNAL: Return whether this type is identifiable.
      protected void toStringHelper​(java.lang.StringBuffer aBuffer)
      INTERNAL: Append the partial string representation of the receiver to the StringBuffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.persistence.metamodel.Type

        getJavaType, getPersistenceType
    • Field Detail

      • descriptor

        protected org.eclipse.persistence.descriptors.ClassDescriptor descriptor
        Native RelationalDescriptor that contains all the mappings of this type
      • metamodel

        protected MetamodelImpl metamodel
        Reference to the metamodel that this managed type belongs to
    • Constructor Detail

      • ManagedTypeImpl

        protected ManagedTypeImpl​(MetamodelImpl metamodel,
                                  org.eclipse.persistence.descriptors.ClassDescriptor descriptor)
        INTERNAL: This constructor will create a ManagedType but will not initialize its member mappings. This is accomplished by delayed initialization in MetamodelImpl.initialize() in order that we have access to all types when resolving relationships in mappings.
        Parameters:
        metamodel - - the metamodel that this managedType is associated with
        descriptor - - the RelationalDescriptor that defines this managedType
    • Method Detail

      • getAttribute

        public javax.persistence.metamodel.Attribute<X,​?> getAttribute​(java.lang.String name)
        Return the attribute of the managed type that corresponds to the specified name.
        Specified by:
        getAttribute in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        attribute with given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getAttributes

        public java.util.Set<javax.persistence.metamodel.Attribute<? super X,​?>> getAttributes()
        Return the attributes of the managed type.
        Specified by:
        getAttributes in interface javax.persistence.metamodel.ManagedType<X>
      • getCollection

        public javax.persistence.metamodel.CollectionAttribute<? super X,​?> getCollection​(java.lang.String name)
        Return the Collection-valued attribute of the managed type that corresponds to the specified name.
        Specified by:
        getCollection in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        CollectionAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getCollection

        public <E> javax.persistence.metamodel.CollectionAttribute<? super X,​E> getCollection​(java.lang.String name,
                                                                                                    java.lang.Class<E> elementType)
        Return the Collection-valued attribute of the managed type that corresponds to the specified name and Java element type.
        Specified by:
        getCollection in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        elementType - the element type of the represented attribute
        Returns:
        CollectionAttribute of the given name and element type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not present in the managed type
      • getPluralAttributes

        public java.util.Set<javax.persistence.metamodel.PluralAttribute<? super X,​?,​?>> getPluralAttributes()
        Return all collection-valued attributes of the managed type.
        Specified by:
        getPluralAttributes in interface javax.persistence.metamodel.ManagedType<X>
        Returns:
        collection valued attributes
      • getDeclaredAttribute

        protected javax.persistence.metamodel.Attribute<X,​?> getDeclaredAttribute​(java.lang.String name,
                                                                                        boolean attributeKnownToExistOnLeafTarget)
        INTERNAL: Return the declared attribute of the managed type that corresponds to the specified name.
        Parameters:
        name - the name of the represented attribute
        attributeKnownToExistOnLeafTarget - true if we already know the attribute exists on the leaf
        Returns:
        attribute with given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not declared in the managed type
      • getDeclaredAttribute

        public javax.persistence.metamodel.Attribute<X,​?> getDeclaredAttribute​(java.lang.String name)
        Return the declared attribute of the managed type that corresponds to the specified name.
        Specified by:
        getDeclaredAttribute in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        attribute with given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not declared in the managed type
      • getDeclaredAttributes

        public java.util.Set<javax.persistence.metamodel.Attribute<X,​?>> getDeclaredAttributes()
        Return the attributes declared by the managed type.
        Specified by:
        getDeclaredAttributes in interface javax.persistence.metamodel.ManagedType<X>
      • getDeclaredCollection

        public javax.persistence.metamodel.CollectionAttribute<X,​?> getDeclaredCollection​(java.lang.String name)
        Return the Collection-valued attribute declared by the managed type that corresponds to the specified name.
        Specified by:
        getDeclaredCollection in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        declared CollectionAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not declared in the managed type
      • getDeclaredCollection

        public <E> javax.persistence.metamodel.CollectionAttribute<X,​E> getDeclaredCollection​(java.lang.String name,
                                                                                                    java.lang.Class<E> elementType)
        Return the Collection-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
        Specified by:
        getDeclaredCollection in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        elementType - the element type of the represented attribute
        Returns:
        declared CollectionAttribute of the given name and element type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not declared in the managed type
      • getDeclaredPluralAttributes

        public java.util.Set<javax.persistence.metamodel.PluralAttribute<X,​?,​?>> getDeclaredPluralAttributes()
        Return all collection-valued attributes declared by the managed type.
        Specified by:
        getDeclaredPluralAttributes in interface javax.persistence.metamodel.ManagedType<X>
        Returns:
        declared collection valued attributes
      • create

        protected static ManagedTypeImpl<?> create​(MetamodelImpl metamodel,
                                                   org.eclipse.persistence.descriptors.ClassDescriptor descriptor)
        INTERNAL: Return an instance of a ManagedType based on the RelationalDescriptor parameter
        Parameters:
        metamodel -
        descriptor -
        Returns:
      • getDeclaredList

        public <E> javax.persistence.metamodel.ListAttribute<X,​E> getDeclaredList​(java.lang.String name,
                                                                                        java.lang.Class<E> elementType)
        Return the List-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
        Specified by:
        getDeclaredList in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        elementType - the element type of the represented attribute
        Returns:
        declared ListAttribute of the given name and element type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not declared in the managed type
      • getDeclaredList

        public javax.persistence.metamodel.ListAttribute<X,​?> getDeclaredList​(java.lang.String name)
        Return the List-valued attribute declared by the managed type that corresponds to the specified name.
        Specified by:
        getDeclaredList in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        declared ListAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not declared in the managed type
      • getDeclaredMap

        public javax.persistence.metamodel.MapAttribute<X,​?,​?> getDeclaredMap​(java.lang.String name)
        Return the Map-valued attribute of the managed type that corresponds to the specified name.
        Specified by:
        getDeclaredMap in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        MapAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getDeclaredMap

        public <K,​V> javax.persistence.metamodel.MapAttribute<X,​K,​V> getDeclaredMap​(java.lang.String name,
                                                                                                      java.lang.Class<K> keyType,
                                                                                                      java.lang.Class<V> valueType)
        Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key and value types.
        Specified by:
        getDeclaredMap in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        keyType - the key type of the represented attribute
        valueType - the value type of the represented attribute
        Returns:
        MapAttribute of the given name and key and value types
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not present in the managed type
      • getDeclaredSet

        public javax.persistence.metamodel.SetAttribute<X,​?> getDeclaredSet​(java.lang.String name)
        Return the Set-valued attribute declared by the managed type that corresponds to the specified name.
        Specified by:
        getDeclaredSet in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        declared SetAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not declared in the managed type
      • getDeclaredSet

        public <E> javax.persistence.metamodel.SetAttribute<X,​E> getDeclaredSet​(java.lang.String name,
                                                                                      java.lang.Class<E> elementType)
        Return the Set-valued attribute declared by the managed type that corresponds to the specified name and Java element type.
        Specified by:
        getDeclaredSet in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        elementType - the element type of the represented attribute
        Returns:
        declared SetAttribute of the given name and element type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not declared in the managed type
      • getDeclaredSingularAttribute

        public javax.persistence.metamodel.SingularAttribute<X,​?> getDeclaredSingularAttribute​(java.lang.String name)
        Return the declared single-valued attribute of the managed type that corresponds to the specified name in the represented type.
        Specified by:
        getDeclaredSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        declared single-valued attribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not declared in the managed type
      • getDeclaredSingularAttribute

        public <Y> javax.persistence.metamodel.SingularAttribute<X,​Y> getDeclaredSingularAttribute​(java.lang.String name,
                                                                                                         java.lang.Class<Y> type)
        Return the declared single-valued attribute of the managed type that corresponds to the specified name and Java type in the represented type.
        Specified by:
        getDeclaredSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        type - the type of the represented attribute
        Returns:
        declared single-valued attribute of the given name and type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not declared in the managed type
      • getDeclaredSingularAttributes

        public java.util.Set<javax.persistence.metamodel.SingularAttribute<X,​?>> getDeclaredSingularAttributes()
        Return the single-valued attributes declared by the managed type.
        Specified by:
        getDeclaredSingularAttributes in interface javax.persistence.metamodel.ManagedType<X>
        Returns:
        declared single-valued attributes
      • getDescriptor

        public org.eclipse.persistence.descriptors.ClassDescriptor getDescriptor()
        INTERNAL: Return the RelationalDescriptor associated with this ManagedType
        Returns:
      • getList

        public javax.persistence.metamodel.ListAttribute<? super X,​?> getList​(java.lang.String name)
        Return the List-valued attribute of the managed type that corresponds to the specified name.
        Specified by:
        getList in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        ListAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getList

        public <E> javax.persistence.metamodel.ListAttribute<? super X,​E> getList​(java.lang.String name,
                                                                                        java.lang.Class<E> elementType)
        Return the List-valued attribute of the managed type that corresponds to the specified name and Java element type.
        Specified by:
        getList in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        elementType - the element type of the represented attribute
        Returns:
        ListAttribute of the given name and element type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not present in the managed type
      • getMap

        public javax.persistence.metamodel.MapAttribute<? super X,​?,​?> getMap​(java.lang.String name)
        Return the Map-valued attribute of the managed type that corresponds to the specified name.
        Specified by:
        getMap in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        MapAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getMap

        public <K,​V> javax.persistence.metamodel.MapAttribute<? super X,​K,​V> getMap​(java.lang.String name,
                                                                                                      java.lang.Class<K> keyType,
                                                                                                      java.lang.Class<V> valueType)
        Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key and value types.
        Specified by:
        getMap in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        keyType - the key type of the represented attribute
        valueType - the value type of the represented attribute
        Returns:
        MapAttribute of the given name and key and value types
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not present in the managed type
      • getMembers

        protected java.util.Map<java.lang.String,​javax.persistence.metamodel.Attribute<X,​?>> getMembers()
        INTERNAL: Return the Map of AttributeImpl members keyed by String.
        Returns:
      • getMetamodel

        protected MetamodelImpl getMetamodel()
        INTERNAL: Return the Metamodel that this ManagedType is associated with.
        Returns:
      • getSet

        public javax.persistence.metamodel.SetAttribute<? super X,​?> getSet​(java.lang.String name)
        Return the Set-valued attribute of the managed type that corresponds to the specified name.
        Specified by:
        getSet in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        SetAttribute of the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getSet

        public <E> javax.persistence.metamodel.SetAttribute<? super X,​E> getSet​(java.lang.String name,
                                                                                      java.lang.Class<E> elementType)
        Return the Set-valued attribute of the managed type that corresponds to the specified name and Java element type.
        Specified by:
        getSet in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        elementType - the element type of the represented attribute
        Returns:
        SetAttribute of the given name and element type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not present in the managed type
      • getSingularAttribute

        public javax.persistence.metamodel.SingularAttribute<? super X,​?> getSingularAttribute​(java.lang.String name)
        Return the single-valued attribute of the managed type that corresponds to the specified name in the represented type.
        Specified by:
        getSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        Returns:
        single-valued attribute with the given name
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name is not present in the managed type
      • getSingularAttribute

        public <Y> javax.persistence.metamodel.SingularAttribute<? super X,​Y> getSingularAttribute​(java.lang.String name,
                                                                                                         java.lang.Class<Y> type)
        Return the single-valued attribute of the managed type that corresponds to the specified name and Java type in the represented type.
        Specified by:
        getSingularAttribute in interface javax.persistence.metamodel.ManagedType<X>
        Parameters:
        name - the name of the represented attribute
        type - the type of the represented attribute
        Returns:
        single-valued attribute with given name and type
        Throws:
        java.lang.IllegalArgumentException - if attribute of the given name and type is not present in the managed type
      • getSingularAttributes

        public java.util.Set<javax.persistence.metamodel.SingularAttribute<? super X,​?>> getSingularAttributes()
        Return the single-valued attributes of the managed type.
        Specified by:
        getSingularAttributes in interface javax.persistence.metamodel.ManagedType<X>
        Returns:
        single-valued attributes
      • initialize

        protected void 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.

      • getTypeClassFromAttributeOrMethodLevelAccessor

        protected java.lang.Class getTypeClassFromAttributeOrMethodLevelAccessor​(org.eclipse.persistence.mappings.DatabaseMapping mapping)
        INTERNAL: Get the elementType directly from the class using a reflective method call directly on the containing java class associated with this managedType.
        Parameters:
        mapping -
        Returns:
      • isIdentifiableType

        protected boolean isIdentifiableType()
        INTERNAL: Return whether this type is identifiable. This would be EntityType and MappedSuperclassType
        Specified by:
        isIdentifiableType in class TypeImpl<X>
        Returns:
      • isManagedType

        protected boolean isManagedType()
        INTERNAL: Return whether this type is identifiable. This would be EmbeddableType as well as EntityType and MappedSuperclassType
        Specified by:
        isManagedType in class TypeImpl<X>
        Returns:
      • toStringHelper

        protected void toStringHelper​(java.lang.StringBuffer aBuffer)
        INTERNAL: Append the partial string representation of the receiver to the StringBuffer.
        Specified by:
        toStringHelper in class TypeImpl<X>