Committee entity = getExistentEntity();
Collaborator coll = findEntity(Collaborator.class, details.collaboratorID);
coll.checkNotFired();
CommitteeMember member = null;
AuditDoc<CommitteeMember> auditDoc;
if(details.id != 0) {
member = findEntity(CommitteeMember.class, details.id);
auditDoc = new AuditDoc<CommitteeMember>(member, getCollaborator());
checkTheSame(member.getCommittee());
} else {
member = new CommitteeMember();
auditDoc = new AuditDoc<CommitteeMember>(member, getCollaborator());
member.setCommittee(entity);
}
member.setCollaborator(coll);
int id = saveEntity(member);
auditDoc.check(member);
return new ModificationInfo(id, persistAudit(auditDoc));
}