@Test(expected = EntityProviderException.class) public void complexPropertyMetadataInvalidTag() throws Exception { String complexPropertyJson = "{\"__metadata\":{\"invalid\":\"RefScenario.c_City\"}," + "\"PostalCode\":\"69124\",\"CityName\":\"Heidelberg\"}"; JsonReader reader = prepareReader(complexPropertyJson); final EdmProperty property = (EdmProperty) MockFacade.getMockEdm().getComplexType ("RefScenario", "c_Location").getProperty("City"); EntityComplexPropertyInfo entityPropertyInfo = (EntityComplexPropertyInfo) EntityInfoAggregator.create(property); new JsonPropertyDeserializer().readPropertyValue(reader, entityPropertyInfo, null, null); }
protected Object readPropertyValue(final JsonReader reader, final EntityPropertyInfo entityPropertyInfo, final Object typeMapping, final DeserializerProperties readProperties) throws EntityProviderException { try { return entityPropertyInfo.isComplex() ? readComplexProperty(reader, (EntityComplexPropertyInfo) entityPropertyInfo, typeMapping, readProperties) : readSimpleProperty(reader, entityPropertyInfo, typeMapping, readProperties); } catch (final EdmException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } catch (final IOException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }
JsonPropertyDeserializer { protected Object readPropertyValue(final JsonReader reader, final EntityPropertyInfo entityPropertyInfo, final Object typeMapping, final DeserializerProperties readProperties) throws EntityProviderException { try { return entityPropertyInfo.isComplex() ? readComplexProperty(reader, (EntityComplexPropertyInfo) entityPropertyInfo, typeMapping, readProperties) : readSimpleProperty(reader, entityPropertyInfo, typeMapping, readProperties); } catch (final EdmException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } catch (final IOException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } }
JsonPropertyDeserializer { protected Object readPropertyValue(final JsonReader reader, final EntityPropertyInfo entityPropertyInfo, final Object typeMapping, final DeserializerProperties readProperties) throws EntityProviderException { try { return entityPropertyInfo.isComplex() ? readComplexProperty(reader, (EntityComplexPropertyInfo) entityPropertyInfo, typeMapping, readProperties) : readSimpleProperty(reader, entityPropertyInfo, typeMapping, readProperties); } catch (final EdmException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } catch (final IOException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  }
JsonPropertyDeserializer { protected Object readPropertyValue(final JsonReader reader, final EntityPropertyInfo entityPropertyInfo, final Object typeMapping, final DeserializerProperties readProperties) throws EntityProviderException { try { return entityPropertyInfo.isComplex() ? readComplexProperty(reader, (EntityComplexPropertyInfo) entityPropertyInfo, typeMapping, readProperties) : readSimpleProperty(reader, entityPropertyInfo, typeMapping, readProperties); } catch (final EdmException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } catch (final IOException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,
      final DeserializerProperties readProperties); Map<String, Object> readPropertyStandalone(final JsonReader reader, final EntityPropertyInfo propertyInfo,
      final DeserializerProperties readProperties); List<?> readCollection(JsonReader reader, final EntityPropertyInfo propertyInfo,
        final DeserializerProperties readProperties); }
JsonPropertyDeserializer { protected Object readPropertyValue(final JsonReader reader, final EntityPropertyInfo entityPropertyInfo, final Object typeMapping, final DeserializerProperties readProperties) throws EntityProviderException { try { return entityPropertyInfo.isComplex() ? readComplexProperty(reader, (EntityComplexPropertyInfo) entityPropertyInfo, typeMapping, readProperties) : readSimpleProperty(reader, entityPropertyInfo, typeMapping, readProperties); } catch (final EdmException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } catch (final IOException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,
      final DeserializerProperties readProperties); Map<String, Object> readPropertyStandalone(final JsonReader reader, final EntityPropertyInfo propertyInfo,
      final DeserializerProperties readProperties); List<?> readCollection(JsonReader reader, final EntityPropertyInfo propertyInfo,
        final DeserializerProperties readProperties);  }