public List<PackageType> findPackageTypes(Subject subject, String resourceTypeName, String pluginName)
throws ResourceTypeNotFoundException {
ResourceType rt = resourceTypeManager.getResourceTypeByNameAndPlugin(subject, resourceTypeName, pluginName);
if (null == rt) {
throw new ResourceTypeNotFoundException(resourceTypeName);
}
Query query = entityManager.createNamedQuery(PackageType.QUERY_FIND_BY_RESOURCE_TYPE_ID);
query.setParameter("typeId", rt.getId());
List<PackageType> result = query.getResultList();