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 toC- The type of the represented collectionV- 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPluralAttributeImpl(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)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Class<V>getBindableJavaType()Return the Java type of the represented object.javax.persistence.metamodel.Bindable.BindableTypegetBindableType()Return the bindable type of the represented object.org.eclipse.persistence.mappings.CollectionMappinggetCollectionMapping()INTERNAL: Return the mapping associated with this PluralAttribute.abstract javax.persistence.metamodel.PluralAttribute.CollectionTypegetCollectionType()Return the collection type.javax.persistence.metamodel.Type<V>getElementType()Return the type representing the element type of the collection.booleanisPlural()INTERNAL: Return whether the attribute is plural or singularjava.lang.StringtoString()-
Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl
getDeclaringType, getDescriptor, getJavaMember, getJavaType, getManagedTypeImpl, getMapping, getMetamodel, getName, getPersistentAttributeType, isAssociation, isCollection
-
-
-
-
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 isPLURAL_ATTRIBUTE, the Java element type is returned. If the bindable type isSINGULAR_ATTRIBUTEorENTITY_TYPE, the Java type of the represented entity or attribute is returned.- Specified by:
getBindableJavaTypein interfacejavax.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:
getBindableTypein interfacejavax.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.
-
getElementType
public javax.persistence.metamodel.Type<V> getElementType()
Return the type representing the element type of the collection.
-
isPlural
public boolean isPlural()
Description copied from class:AttributeImplINTERNAL: Return whether the attribute is plural or singular- Specified by:
isPluralin classAttributeImpl<X,C>- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-