private void onRemoveSurname(DirectoryEntity entity) throws ClipsServerException {
//Client
Class <? extends GenericEntity> checked = Client.class;
Field f[] = { new Field("surname", entity) };
int count = getEntityCount(checked, f);
if (count > 0) throw new EDataIntegrity("На элемент '" + entity.getTitle()
+ "' ссылаются " + count + " элементов из таблицы " + getEntityHumanName(checked));
}