em.getTransaction().begin();
AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
Query q;
if ((fieldName.equals(BatchQueueConstants.COMPUTE_RESOURCE_ID)) || (fieldName.equals(BatchQueueConstants.MAX_RUNTIME)) || (fieldName.equals(BatchQueueConstants.MAX_JOB_IN_QUEUE)) || (fieldName.equals(BatchQueueConstants.QUEUE_DESCRIPTION)) || (fieldName.equals(BatchQueueConstants.QUEUE_NAME)) || (fieldName.equals(BatchQueueConstants.MAX_PROCESSORS)) || (fieldName.equals(BatchQueueConstants.MAX_NODES))) {
generator.setParameter(fieldName, value);
q = generator.selectQuery(em);
List<?> results = q.getResultList();
for (Object result : results) {
BatchQueue batchQueue = (BatchQueue) result;
BatchQueueResource batchQueueResource = (BatchQueueResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.BATCH_QUEUE, batchQueue);
batchQueueResourceIDs.add(batchQueueResource.getComputeResourceId());