generator.setParameter(AppEnvironmentConstants.DEPLOYMENT_ID, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
AppEnvironment appEnvironment = (AppEnvironment) result;
AppEnvironmentResource resource =
(AppEnvironmentResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APP_ENVIRONMENT, appEnvironment);
appEnvironmentList.add(resource);
}
}
} else if (fieldName.equals(AppEnvironmentConstants.NAME)) {
generator.setParameter(AppEnvironmentConstants.NAME, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
AppEnvironment appEnvironment = (AppEnvironment) result;
AppEnvironmentResource resource =
(AppEnvironmentResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APP_ENVIRONMENT, appEnvironment);
appEnvironmentList.add(resource);
}
}