@Override public Object propertyValueOf(QualifiedName stateName) { try { Object json = state.getJSONObject(JSONKeys.PROPERTIES).opt(stateName.name()); if (JSONObject.NULL.equals(json)) { return null; } else { PropertyDescriptor descriptor = entityDescriptor.state().findPropertyModelByQualifiedName(stateName); if (descriptor == null) { return null; } return valueSerialization.deserialize(descriptor.valueType(), json.toString()); } } catch (ValueSerializationException | JSONException e) { throw new EntityStoreException(e); } }
@Override public boolean isAssignableTo(Class<?> type) { return entityDescriptor.isAssignableTo(type); }