private Object fromString(Attribute attribute, EntityResolver resolver, String value) throws EntityNotFoundException, IllegalStateException { Class<? extends Entity> refType = attribute.getRefType(); if (refType != null) { Entity resolved = resolver.resolve(value, refType); return resolved; } try { Object result = AttributeImpl.parseAttributeValueWithoutRef(attribute, value); return result; } catch (RaplaException exception) { throw new IllegalStateException(exception.getMessage(), exception); } }