generator.setParameter(HostAliasConstants.ALIAS, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
HostAlias hostAlias = (HostAlias) result;
HostAliasResource hostAliasResource =
(HostAliasResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.HOST_ALIAS, hostAlias);
hostAliasResources.add(hostAliasResource);
}
}
} else if (fieldName.equals(HostAliasConstants.RESOURCE_ID)) {
generator.setParameter(HostAliasConstants.RESOURCE_ID, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
HostAlias hostAlias = (HostAlias) result;
HostAliasResource hostAliasResource =
(HostAliasResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.HOST_ALIAS, hostAlias);
hostAliasResources.add(hostAliasResource);
}
}