generator.setParameter(AppModuleMappingConstants.INTERFACE_ID, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
AppModuleMapping moduleMapping = (AppModuleMapping) result;
AppModuleMappingResource resource =
(AppModuleMappingResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APP_MODULE_MAPPING, moduleMapping);
resourceList.add(resource);
}
}
} else if (fieldName.equals(AppModuleMappingConstants.MODULE_ID)) {
generator.setParameter(AppModuleMappingConstants.MODULE_ID, value);
q = generator.selectQuery(em);
results = q.getResultList();
if (results.size() != 0) {
for (Object result : results) {
AppModuleMapping moduleMapping = (AppModuleMapping) result;
AppModuleMappingResource resource =
(AppModuleMappingResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.APP_MODULE_MAPPING, moduleMapping);
resourceList.add(resource);
}
}