void setInstanceId(int id)
None.
RelationshipRuntimeException - See Handling exceptions.
One use of setInstanceId() is to remove the relationship instance ID when you want to pass a participant instance as a parameter to the Participant() or create() methods. In this case, you set the instance ID to the constant INVALID_INSTANCE_ID.
// wipe out the relationship instance ID myParticipant.setInstanceId(Participant.INVALID_INSTANCE_ID); // pass the participant instance to the create() method int newRelId = create(myParticipant);