generator.setParameter(HostIPAddressConstants.IP_ADDRESS, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
HostIPAddress hostIPAddress = (HostIPAddress) result;
HostIPAddressResource hostIPAddressResource =
(HostIPAddressResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.HOST_IPADDRESS, hostIPAddress);
hostIPAddressResources.add(hostIPAddressResource);
}
}
} else if (fieldName.equals(HostIPAddressConstants.RESOURCE_ID)) {
generator.setParameter(HostIPAddressConstants.RESOURCE_ID, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
HostIPAddress hostIPAddress = (HostIPAddress) result;
HostIPAddressResource hostIPAddressResource =
(HostIPAddressResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.HOST_IPADDRESS, hostIPAddress);
hostIPAddressResources.add(hostIPAddressResource);
}
}