Пример #1
0
 @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);
   }
 }
Пример #2
0
 @Override
 public boolean isAssignableTo(Class<?> type) {
   return entityDescriptor.isAssignableTo(type);
 }