376 words

javax.persistence.metamodel.SingularAttribute - JPA interface

javax.persistence.metamodel
Interface SingularAttribute<X,T>

Superinterfaces:
Attribute<X,T>, Bindable<T>
Instances of the type SingularAttribute represents persistent single-valued properties or fields.
Since:
JPA 2.0
Return the Java type of the represented object.
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.
Returns:
Java type
Since:
JPA 2.0
Return the bindable type of the represented object.
Return the bindable type of the represented object.
Returns:
bindable type
Since:
JPA 2.0
Return the managed type representing the type in which the attribute was declared.
Return the managed type representing the type in which the attribute was declared.
Returns:
declaring type
Since:
JPA 2.0
Member getJavaMember()
Return the java.lang.reflect.Member for the represented attribute.
Return the java.lang.reflect.Member for the represented attribute.
Returns:
corresponding java.lang.reflect.Member
Since:
JPA 2.0
Class<Y> getJavaType()
Return the Java type of the represented attribute.
Return the Java type of the represented attribute.
Returns:
Java type
Since:
JPA 2.0
String getName()
Return the name of the attribute.
Return the name of the attribute.
Returns:
name
Since:
JPA 2.0
Return the persistent attribute type for the attribute.
Return the persistent attribute type for the attribute.
Returns:
persistent attribute type
Since:
JPA 2.0
Return the type that represents the type of the attribute.
Return the type that represents the type of the attribute.
Returns:
type of attribute
Since:
JPA 2.0
boolean isAssociation()
Is the attribute an association.
Is the attribute an association.
Returns:
boolean indicating whether the attribute corresponds to an association
Since:
JPA 2.0
boolean isCollection()
Is the attribute collection-valued (represents a Collection, Set, List, or Map).
Is the attribute collection-valued (represents a Collection, Set, List, or Map).
Returns:
boolean indicating whether the attribute is collection-valued
Since:
JPA 2.0
boolean isId()
Is the attribute an id attribute.
Is the attribute an id attribute. This method will return true if the attribute is an attribute that corresponds to a simple id, an embedded id, or an attribute of an id class.
Returns:
boolean indicating whether the attribute is an id
Since:
JPA 2.0
boolean isOptional()
Can the attribute be null.
Can the attribute be null.
Returns:
boolean indicating whether the attribute can be null
Since:
JPA 2.0
boolean isVersion()
Is the attribute a version attribute.
Is the attribute a version attribute.
Returns:
boolean indicating whether the attribute is a version attribute
Since:
JPA 2.0

This documentation page is derived (with some adjustments) from the open source JPA 2 RI (EclipseLink)
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
Object Relational Mapping (ORM) JPA 2 providers include Hibernate, EclipseLink, TopLink, OpenJPA and DataNucleus.
Object DB is not an ORM JPA implementation but an Object Database for Java with built in JPA 2 support.