private void mergeComplexWithDefaultValues(final Map<String, Object> complexValue, final EntityComplexPropertyInfo ecpi) { for (EntityPropertyInfo info : ecpi.getPropertyInfos()) { Object obj = complexValue.get(info.getName()); if (obj == null) { if (info.isComplex()) { Map<String, Object> defaultValue = new HashMap<String, Object>(); mergeComplexWithDefaultValues(defaultValue, ecpi); complexValue.put(info.getName(), defaultValue); } else { EdmFacets facets = info.getFacets(); if (facets != null) { complexValue.put(info.getName(), facets.getDefaultValue()); } } } } }
private void mergeComplexWithDefaultValues(final Map<String, Object> complexValue, final EntityComplexPropertyInfo ecpi) { for (EntityPropertyInfo info : ecpi.getPropertyInfos()) { Object obj = complexValue.get(info.getName()); if (obj == null) { if (info.isComplex()) { Map<String, Object> defaultValue = new HashMap<String, Object>(); mergeComplexWithDefaultValues(defaultValue, ecpi); complexValue.put(info.getName(), defaultValue); } else { EdmFacets facets = info.getFacets(); if (facets != null) { complexValue.put(info.getName(), facets.getDefaultValue()); } } } } }
private void mergeComplexWithDefaultValues(final Map<String, Object> complexValue, final EntityComplexPropertyInfo ecpi) { for (EntityPropertyInfo info : ecpi.getPropertyInfos()) { Object obj = complexValue.get(info.getName()); if (obj == null) { if (info.isComplex()) { Map<String, Object> defaultValue = new HashMap<String, Object>(); mergeComplexWithDefaultValues(defaultValue, ecpi); complexValue.put(info.getName(), defaultValue); } else { EdmFacets facets = info.getFacets(); if (facets != null) { complexValue.put(info.getName(), facets.getDefaultValue()); } } } } }
.toLowerCase(Locale.ROOT)); if (facets.getDefaultValue() != null) { xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_PROPERTY_DEFAULT_VALUE, facets.getDefaultValue());
.toLowerCase(Locale.ROOT)); if (facets.getDefaultValue() != null) { xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_PROPERTY_DEFAULT_VALUE, facets.getDefaultValue());
.toLowerCase(Locale.ROOT)); if (facets.getDefaultValue() != null) { xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_PROPERTY_DEFAULT_VALUE, facets.getDefaultValue());
eInfo.setScale(facets.getScale() != null ? facets.getScale() : 0); eInfo.setMaxLength(facets.getMaxLength() != null ? facets.getMaxLength() : 0); eInfo.setDefaultValue(facets.getDefaultValue());