Fast Object Database for Java - with JPA/JDO support

getSingularAttribute(name, type) - JPA ManagedType's method

Method
javax.persistence.metamodel.ManagedType
SingularAttribute<?,Y> getSingularAttribute(
  String name,
  Class<Y> type
)

Return the single-valued attribute of the managed type that corresponds to the specified name and Java type.
Parameters:
name - the name of the represented attribute
type - the type of the represented attribute
Returns:
single-valued attribute with given name and type
Throws:
IllegalArgumentException - if attribute of the given name and type is not present in the managed type
Since:
JPA 2.0