Class PluralAttributeImpl<X,​C,​V>

  • Type Parameters:
    X - The type the represented collection belongs to
    C - The type of the represented collection
    V - The element type of the represented collection
    All Implemented Interfaces:
    java.io.Serializable, javax.persistence.metamodel.Attribute<X,​C>, javax.persistence.metamodel.Bindable<V>, javax.persistence.metamodel.PluralAttribute<X,​C,​V>
    Direct Known Subclasses:
    CollectionAttributeImpl, ListAttributeImpl, MapAttributeImpl, SetAttributeImpl

    public abstract class PluralAttributeImpl<X,​C,​V>
    extends AttributeImpl<X,​C>
    implements javax.persistence.metamodel.PluralAttribute<X,​C,​V>

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

    Description: Instances of the type PluralAttribute represent persistent collection-valued attributes.

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

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

        javax.persistence.metamodel.Attribute.PersistentAttributeType
      • Nested classes/interfaces inherited from interface javax.persistence.metamodel.Bindable

        javax.persistence.metamodel.Bindable.BindableType
      • Nested classes/interfaces inherited from interface javax.persistence.metamodel.PluralAttribute

        javax.persistence.metamodel.PluralAttribute.CollectionType
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PluralAttributeImpl​(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.CollectionMapping mapping, boolean validationEnabled)
      INTERNAL: Create an Attribute instance with a passed in validation flag (usually set to true only during Metamodel initialization)
    • Constructor Detail

      • PluralAttributeImpl

        protected PluralAttributeImpl​(ManagedTypeImpl<X> managedType,
                                      org.eclipse.persistence.mappings.CollectionMapping mapping,
                                      boolean validationEnabled)
        INTERNAL: Create an Attribute instance with a passed in validation flag (usually set to true only during Metamodel initialization)
        Parameters:
        managedType -
        mapping -
        validationEnabled -
    • Method Detail

      • getBindableJavaType

        public java.lang.Class<V> 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.
        Specified by:
        getBindableJavaType in interface javax.persistence.metamodel.Bindable<X>
        Returns:
        Java type
      • getBindableType

        public javax.persistence.metamodel.Bindable.BindableType getBindableType()
        Return the bindable type of the represented object.
        Specified by:
        getBindableType in interface javax.persistence.metamodel.Bindable<X>
        Returns:
        bindable type
      • getCollectionMapping

        public org.eclipse.persistence.mappings.CollectionMapping getCollectionMapping()
        INTERNAL: Return the mapping associated with this PluralAttribute.
        Returns:
      • getCollectionType

        public abstract javax.persistence.metamodel.PluralAttribute.CollectionType getCollectionType()
        Return the collection type.
        Specified by:
        getCollectionType in interface javax.persistence.metamodel.PluralAttribute<X,​C,​V>
        Returns:
        collection type
      • getElementType

        public javax.persistence.metamodel.Type<V> getElementType()
        Return the type representing the element type of the collection.
        Specified by:
        getElementType in interface javax.persistence.metamodel.PluralAttribute<X,​C,​V>
        Returns:
        element type
      • isPlural

        public boolean isPlural()
        Description copied from class: AttributeImpl
        INTERNAL: Return whether the attribute is plural or singular
        Specified by:
        isPlural in class AttributeImpl<X,​C>
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object