@Override public Class<ID> getIdType() { return delegate.getIdType(); } }
public Class<ID> getIdType() { return delegate.getIdType(); } }
/** * Returns the actual typed id. Looks up an available customly registered {@link PropertyEditor} from the * {@link PropertyEditorRegistry} before falling back on a {@link SimpleTypeConverter} to translate the {@link String} * id into the type one. * * @param idAsString * @return */ @SuppressWarnings("unchecked") private ID getId(String idAsString) { Class<ID> idClass = information.getIdType(); PropertyEditor idEditor = registry.findCustomEditor(idClass, null); if (idEditor != null) { idEditor.setAsText(idAsString); return (ID) idEditor.getValue(); } return new SimpleTypeConverter().convertIfNecessary(idAsString, idClass); }