getCollection(name, elementType) - JPA ManagedType's method
Method javax.persistence.metamodel.ManagedType
CollectionAttribute<?,E> getCollection(
String name,
Class<E> elementType
)
Return the Collection-valued attribute of the managed type that corresponds to the specified name and Java element type.
- Parameters:
-
name
- the name of the represented attributeelementType
- the element type of the represented attribute
- Returns:
- CollectionAttribute of the given name and element type
- Throws:
-
IllegalArgumentException
- if attribute of the given name and type is not present in the managed type
- Since:
- JPA 2.0