Class SingularAttributeImpl<X,T>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl<X,T>
-
- org.eclipse.persistence.internal.jpa.metamodel.SingularAttributeImpl<X,T>
-
- Type Parameters:
X- The type containing the represented attributeT- The type of the represented attribute
- All Implemented Interfaces:
java.io.Serializable,javax.persistence.metamodel.Attribute<X,T>,javax.persistence.metamodel.Bindable<T>,javax.persistence.metamodel.SingularAttribute<X,T>
public class SingularAttributeImpl<X,T> extends AttributeImpl<X,T> implements javax.persistence.metamodel.SingularAttribute<X,T>
Purpose: Provides the implementation for the SingularAttribute interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)
Description: Instances of the type SingularAttribute represents persistent single-valued properties or fields.
- Since:
- EclipseLink 1.2 - JPA 2.0
- Author:
- Michael O'Brien
- See Also:
SingularAttribute, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSingularAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.DatabaseMapping mapping)Create an instance of the AttributeprotectedSingularAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.DatabaseMapping 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 Concrete Methods Modifier and Type Method Description java.lang.Class<T>getBindableJavaType()Return the Java type of the represented object.javax.persistence.metamodel.Bindable.BindableTypegetBindableType()java.lang.Class<T>getJavaType()Return the Java type of the represented attribute.javax.persistence.metamodel.Type<T>getType()Return the type that represents the type of the attribute.booleanisId()Is the attribute an id attribute.booleanisOptional()Can the attribute be null.booleanisPlural()INTERNAL: Return whether the attribute is plural or singularbooleanisVersion()Is the attribute a version attribute.java.lang.StringtoString()Return the String representation of the receiver.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl
getDeclaringType, getDescriptor, getJavaMember, getManagedTypeImpl, getMapping, getMetamodel, getName, getPersistentAttributeType, isAssociation, isCollection
-
-
-
-
Constructor Detail
-
SingularAttributeImpl
protected SingularAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.DatabaseMapping mapping)
Create an instance of the Attribute- Parameters:
managedType-mapping-
-
SingularAttributeImpl
protected SingularAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.DatabaseMapping 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<T> 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
-
isId
public boolean isId()
Is the attribute an id attribute.
-
isOptional
public boolean isOptional()
Can the attribute be null.
-
isPlural
public boolean isPlural()
INTERNAL: Return whether the attribute is plural or singular- Specified by:
isPluralin classAttributeImpl<X,T>- Returns:
-
isVersion
public boolean isVersion()
Is the attribute a version attribute.
-
getBindableType
public javax.persistence.metamodel.Bindable.BindableType getBindableType()
- Specified by:
getBindableTypein interfacejavax.persistence.metamodel.Bindable<X>
-
getJavaType
public java.lang.Class<T> getJavaType()
Return the Java type of the represented attribute.- Specified by:
getJavaTypein interfacejavax.persistence.metamodel.Attribute<X,T>- Specified by:
getJavaTypein classAttributeImpl<X,T>- Returns:
- Java type
-
getType
public javax.persistence.metamodel.Type<T> getType()
Return the type that represents the type of the attribute.
-
toString
public java.lang.String toString()
Return the String representation of the receiver.- Overrides:
toStringin classjava.lang.Object
-
-