if (adUnitIds.size() > 0) {
// Modify statement for action.
filterStatement.setQuery("WHERE id IN (" + StringUtils.join(adUnitIds, ",") + ")");
// Create action.
DeactivateAdUnits action = new DeactivateAdUnits();
// Perform action.
UpdateResult result = inventoryService.performAdUnitAction(action, filterStatement);
// Display results.