// Create action.
DeleteUserTeamAssociations action = new DeleteUserTeamAssociations();
// Perform action.
UpdateResult result =
userTeamAssociationService.performUserTeamAssociationAction(action, filterStatement);
// Display results.
if (result != null && result.getNumChanges() > 0) {
System.out.println("Number of teams that the user was removed from: "
+ result.getNumChanges());
} else {
System.out.println("No user team associations were deleted.");
}
}
} catch (Exception e) {