Class PluralAttributeImpl<X,C,V>

java.lang.Object
org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl<X,C>
org.eclipse.persistence.internal.jpa.metamodel.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:
Attribute<X,C>, Bindable<V>, PluralAttribute<X,C,V>, Serializable
Direct Known Subclasses:
CollectionAttributeImpl, ListAttributeImpl, MapAttributeImpl, SetAttributeImpl

public abstract class PluralAttributeImpl<X,C,V> extends AttributeImpl<X,C> implements 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:
  • Constructor Details

    • PluralAttributeImpl

      protected PluralAttributeImpl(ManagedTypeImpl<X> managedType, CollectionMapping mapping, boolean validationEnabled)
      INTERNAL: Create an Attribute instance with a passed in validation flag (usually set to true only during Metamodel initialization)
  • Method Details

    • getBindableJavaType

      public 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 Bindable<X>
      Returns:
      Java type
    • getBindableType

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

      public CollectionMapping getCollectionMapping()
      INTERNAL: Return the mapping associated with this PluralAttribute.
    • getCollectionType

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

      public Type<V> getElementType()
      Return the type representing the element type of the collection.
      Specified by:
      getElementType in interface 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>
    • toString

      public String toString()
      Overrides:
      toString in class Object