code: private static OptionalEntity<SynonymItem> getEntity(final CreateForm form) {
          switch (form.crudMode) {
          case CrudMode.CREATE:
              final SynonymItem entity = new SynonymItem(0, StringUtil.EMPTY_STRINGS, StringUtil.EMPTY_STRINGS);
              return OptionalEntity.of(entity);
          case CrudMode.EDIT:
              if (form instanceof EditForm) {
                  return ComponentUtil.getComponent(SynonymService.class).getSynonymItem(form.dictId, ((EditForm) form).id);
              }
              break;
          default:
              break;
          }
          return OptionalEntity.empty();
      }
docs: ============