// Create an object filter to represent each object the user has access
// to. Since this is an advertiser filter, an object filter represents an
// advertiser. The total of object filter objects will need to match the
// total of advertisers the user is assigned.
ObjectFilter allowedObject = new ObjectFilter();
// Insert the advertiser ID of an advertiser assigned to this user.
allowedObject.setId(advertiserId);
// Create any additional object filters that are needed, then create an
// array of all of the object filters for this filter.
ObjectFilter[] objectFilters = {allowedObject};
// Add these settings to the user filter
filterToAdd.setObjectFilters(objectFilters);