private void appendTypeDefinitions(final JsonGenerator json, final List<EdmTypeDefinition> typeDefinitions) throws SerializerException, IOException { for (EdmTypeDefinition definition : typeDefinitions) { json.writeObjectFieldStart(definition.getName()); json.writeStringField(KIND, definition.getKind().name()); json.writeStringField(UNDERLYING_TYPE, getFullQualifiedName(definition.getUnderlyingType())); // Facets if (definition.getMaxLength() != null) { json.writeStringField(MAX_LENGTH, "" + definition.getMaxLength()); } if (definition.getPrecision() != null) { json.writeStringField(PRECISION, "" + definition.getPrecision()); } if (definition.getScale() != null) { json.writeStringField(SCALE, "" + definition.getScale()); } if (definition.getSrid() != null) { json.writeStringField(SRID, "" + definition.getSrid()); } appendAnnotations(json, definition, null); json.writeEndObject(); } }
private void appendTypeDefinitions(final JsonGenerator json, final List<EdmTypeDefinition> typeDefinitions) throws SerializerException, IOException { for (EdmTypeDefinition definition : typeDefinitions) { json.writeObjectFieldStart(definition.getName()); json.writeStringField(KIND, definition.getKind().name()); json.writeStringField(UNDERLYING_TYPE, getFullQualifiedName(definition.getUnderlyingType())); // Facets if (definition.getMaxLength() != null) { json.writeStringField(MAX_LENGTH, "" + definition.getMaxLength()); } if (definition.getPrecision() != null) { json.writeStringField(PRECISION, "" + definition.getPrecision()); } if (definition.getScale() != null) { json.writeStringField(SCALE, "" + definition.getScale()); } if (definition.getSrid() != null) { json.writeStringField(SRID, "" + definition.getSrid()); } appendAnnotations(json, definition, null); json.writeEndObject(); } }