outputBulkAdGroups(Arrays.asList((BulkAdGroup) entity) );
((BulkAdGroup)entity).getAdGroup().setStatus(AdGroupStatus.PAUSED);
uploadEntities.add(entity);
}
}
<BUG>entities.close();
outputStatusMessage("Changed local status of all Active ad groups to Paused. Ready for upload.\n");</BUG>
EntityUploadParameters entityUploadParameters = new EntityUploadParameters();
entityUploadParameters.setEntities(uploadEntities);
entityUploadParameters.setResponseMode(ResponseMode.ERRORS_AND_RESULTS);

outputBulkAdGroups(Arrays.asList((BulkAdGroup) entity) );
((BulkAdGroup)entity).getAdGroup().setStatus(AdGroupStatus.PAUSED);
uploadEntities.add(entity);
}
}
entities.close();
if (!uploadEntities.isEmpty()){
outputStatusMessage("Changed local status of all Active ad groups to Paused. Ready for upload.\n");
EntityUploadParameters entityUploadParameters = new EntityUploadParameters();
entityUploadParameters.setEntities(uploadEntities);
entityUploadParameters.setResponseMode(ResponseMode.ERRORS_AND_RESULTS);
