Jakarta Persistence (JPA) Method

SingularAttribute<X,Y> getDeclaredSingularAttribute(
  String name,
  Class<Y> type
)


Return the single-valued attribute declared by 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:
declared single-valued attribute of the given name and type.
Throws:
IllegalArgumentException - if attribute of the given name and type is not declared in the managed type.
Since:
Jakarta Persistence (JPA) 1.0