/** * Check if jsonNode is not null or if null but nullable or collection navigationProperty * * @param jsonNode related json node * @param edmNavigationProperty related navigation property * @throws DeserializerException if jsonNode is not null or if null but nullable or collection navigationProperty */ private void checkNotNullOrValidNull(final JsonNode jsonNode, final EdmNavigationProperty edmNavigationProperty) throws DeserializerException { boolean isNullable = edmNavigationProperty.isNullable(); if ((jsonNode.isNull() && !isNullable) || (jsonNode.isNull() && edmNavigationProperty.isCollection())) { throw new DeserializerException("Property: " + edmNavigationProperty.getName() + " must not be null.", MessageKeys.INVALID_NULL_PROPERTY, edmNavigationProperty.getName()); } }
/** * Check if jsonNode is not null or if null but nullable or collection navigationProperty * * @param jsonNode related json node * @param edmNavigationProperty related navigation property * @throws DeserializerException if jsonNode is not null or if null but nullable or collection navigationProperty */ private void checkNotNullOrValidNull(final JsonNode jsonNode, final EdmNavigationProperty edmNavigationProperty) throws DeserializerException { boolean isNullable = edmNavigationProperty.isNullable(); if ((jsonNode.isNull() && !isNullable) || (jsonNode.isNull() && edmNavigationProperty.isCollection())) { throw new DeserializerException("Property: " + edmNavigationProperty.getName() + " must not be null.", MessageKeys.INVALID_NULL_PROPERTY, edmNavigationProperty.getName()); } }
/** * Check if jsonNode is not null or if null but nullable or collection * navigationProperty * * @param jsonNode * related json node * @param edmNavigationProperty * related navigation property * @throws DeserializerException * if jsonNode is not null or if null but nullable or collection * navigationProperty */ private void checkNotNullOrValidNull(final JsonNode jsonNode, final EdmNavigationProperty edmNavigationProperty) throws DeserializerException { boolean isNullable = edmNavigationProperty.isNullable(); if ((jsonNode.isNull() && !isNullable) || (jsonNode.isNull() && edmNavigationProperty.isCollection())) { throw new DeserializerException("Property: " + edmNavigationProperty.getName() + " must not be null.", MessageKeys.INVALID_NULL_PROPERTY, edmNavigationProperty.getName()); } }
writer.writeAttribute(XML_TYPE, getAliasedFullQualifiedName(navigationProperty.getType(), navigationProperty .isCollection())); if (!navigationProperty.isNullable()) { writer.writeAttribute(XML_NULLABLE, "" + navigationProperty.isNullable());
writer.writeAttribute(XML_TYPE, getAliasedFullQualifiedName(navigationProperty.getType(), navigationProperty .isCollection())); if (!navigationProperty.isNullable()) { writer.writeAttribute(XML_NULLABLE, "" + navigationProperty.isNullable());
DeserializerException.MessageKeys.INVALID_ANNOTATION_TYPE, key); if (edmNavigationProperty.isNullable() && jsonNode.isNull()) { bindingLink.setBindingLink(null); } else {
DeserializerException.MessageKeys.INVALID_ANNOTATION_TYPE, key); if (edmNavigationProperty.isNullable() && jsonNode.isNull()) { bindingLink.setBindingLink(null); } else {
DeserializerException.MessageKeys.INVALID_ANNOTATION_TYPE, key); if (edmNavigationProperty.isNullable() && jsonNode.isNull()) { bindingLink.setBindingLink(null); } else {
if (!navigationProperty.isNullable()) { json.writeBooleanField(NULLABLE, navigationProperty.isNullable());
if (!navigationProperty.isNullable()) { json.writeBooleanField(NULLABLE, navigationProperty.isNullable());