@Override
public ModificationInfo setCommitteeResolution(CommitteeResolutionDetails details) throws ClipsServerException {
checkCommandAccessibility(COMMAND_MODIFY);
checkEntityExist();
CommitteeResolution resolution = null;
AuditDoc<CommitteeResolution> auditDoc;
if(details.id != 0) {
resolution = findEntity(CommitteeResolution.class, details.id);
auditDoc = new AuditDoc<CommitteeResolution>(resolution, getCollaborator());
checkTheSame(resolution.getDirection().getCommittee());
} else {
resolution = new CommitteeResolution();
auditDoc = new AuditDoc<CommitteeResolution>(resolution, getCollaborator());
CommitteeDirection comDir = findEntity(CommitteeDirection.class, details.directionID);
resolution.setDirection(comDir);
}
resolution.setType(findEntity(CommitteeResolutionType.class, details.typeID));
resolution.setCollaborator(findEntity(Collaborator.class, details.collaboratorID));
resolution.setDescription(details.description);
resolution.setMkb10(details.mkb10 != 0 ? findEntity(Mkb10.class, details.mkb10) : null);
resolution.setRendered(details.rendered);
int id = saveEntity(resolution);
return new ModificationInfo(id, persistAudit(auditDoc));
}