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