* безопастности либо произошла ошибка
*/
@Override
public ModificationInfo setAddress(AddressDetails details) throws ClipsServerException {
checkCommandAccessibility(COMMAND_MODIFY);
Client entity = getExistentEntity();
AuditDoc<Client> auditDoc = new AuditDoc<Client>(entity, getCollaborator());
Address addr = entity.getAddress();
boolean newAddr = false;
if (addr == null) {
addr = new Address();
newAddr = true;
}
addr.setBuilding(details.building);
addr.setFlat(details.flat);
addr.setAddressObject(findEntity(AddressObject.class, details.objectId));
// addr.setId(details.id);
saveEntity(addr);
if(newAddr) {
entity.setAddress(addr);
saveEntity(entity);
}
if (auditDoc.check(entity)) {
return new ModificationInfo(persistAudit(auditDoc));
} else {