protected void writeEntitySet(final ServiceMetadata metadata, final EdmEntityType entityType, final Delta entitySet, final EntityCollectionSerializerOptions options, final JsonGenerator json) throws IOException, SerializerException { json.writeStartArray(); for (final Entity entity : entitySet.getEntities()) { writeAddedUpdatedEntity(metadata, entityType, entity, options.getExpand(), options.getSelect(), options.getContextURL(), false, options.getContextURL().getEntitySetOrSingletonOrType(), json); } for (final DeletedEntity deletedEntity : entitySet.getDeletedEntities()) { writeDeletedEntity(deletedEntity, json); } for (final DeltaLink addedLink : entitySet.getAddedLinks()) { writeLink(addedLink, options, json, true); } for (final DeltaLink deletedLink : entitySet.getDeletedLinks()) { writeLink(deletedLink, options, json, false); } json.writeEndArray(); }
protected void writeEntitySet(final ServiceMetadata metadata, final EdmEntityType entityType, final Delta entitySet, final EntityCollectionSerializerOptions options, final JsonGenerator json) throws IOException, SerializerException { json.writeStartArray(); for (final Entity entity : entitySet.getEntities()) { writeAddedUpdatedEntity(metadata, entityType, entity, options.getExpand(), options.getSelect(), options.getContextURL(), false, options.getContextURL() .getEntitySetOrSingletonOrType(), json); } for (final DeletedEntity deletedEntity : entitySet.getDeletedEntities()) { writeDeletedEntity(deletedEntity, options, json); } for (final DeltaLink addedLink : entitySet.getAddedLinks()) { writeLink(addedLink, options, json, true); } for (final DeltaLink deletedLink : entitySet.getDeletedLinks()) { writeLink(deletedLink, options, json, false); } json.writeEndArray(); }
protected void writeEntitySet(final ServiceMetadata metadata, final EdmEntityType entityType, final Delta entitySet, final EntityCollectionSerializerOptions options, final JsonGenerator json) throws IOException, SerializerException { json.writeStartArray(); for (final Entity entity : entitySet.getEntities()) { writeAddedUpdatedEntity(metadata, entityType, entity, options.getExpand(), options.getSelect(), options.getContextURL(), false, options.getContextURL().getEntitySetOrSingletonOrType(), json); } for (final DeletedEntity deletedEntity : entitySet.getDeletedEntities()) { writeDeletedEntity(deletedEntity, json); } for (final DeltaLink addedLink : entitySet.getAddedLinks()) { writeLink(addedLink, options, json, true); } for (final DeltaLink deletedLink : entitySet.getDeletedLinks()) { writeLink(deletedLink, options, json, false); } json.writeEndArray(); }
try { json.writeStartObject(); String entityId = options.getContextURL().getEntitySetOrSingletonOrType(); String operation = isAdded ? LINK : DELETEDLINK; json.writeStringField(Constants.JSON_CONTEXT, HASH + entityId + operation);
try { json.writeStartObject(); String entityId = options.getContextURL().getEntitySetOrSingletonOrType();// throw error if not set id String operation = isAdded ? Constants.LINK : Constants.DELETEDLINK; json.writeStringField(Constants.AT + Constants.CONTEXT, Constants.HASH + entityId + operation);
try { json.writeStartObject(); String entityId = options.getContextURL().getEntitySetOrSingletonOrType(); String operation = isAdded ? LINK : DELETEDLINK; json.writeStringField(Constants.JSON_CONTEXT, HASH + entityId + operation);
try { json.writeStartObject(); String entityId = options.getContextURL().getEntitySetOrSingletonOrType();// throw error if not set id String operation = isAdded ? Constants.LINK : Constants.DELETEDLINK; json.writeStringField(Constants.AT + Constants.CONTEXT, Constants.HASH + entityId + operation);
protected void writeEntitySet(final ServiceMetadata metadata, final EdmEntityType entityType, final Delta entitySet, final EntityCollectionSerializerOptions options, final JsonGenerator json) throws IOException, SerializerException { json.writeStartArray(); for (final Entity entity : entitySet.getEntities()) { writeAddedUpdatedEntity(metadata, entityType, entity, options.getExpand(), options.getSelect(), options.getContextURL(), false, options.getContextURL() .getEntitySetOrSingletonOrType(), json); } for (final DeletedEntity deletedEntity : entitySet.getDeletedEntities()) { writeDeletedEntity(deletedEntity, options, json); } for (final DeltaLink addedLink : entitySet.getAddedLinks()) { writeLink(addedLink, options, json, true); } for (final DeltaLink deletedLink : entitySet.getDeletedLinks()) { writeLink(deletedLink, options, json, false); } json.writeEndArray(); }
public void entityCollectionIntoStream(ServiceMetadata metadata, EdmEntityType entityType, EntityIterator entitySet, EntityCollectionSerializerOptions options, OutputStream outputStream) throws SerializerException { final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); final String name = contextURL == null ? null : contextURL.getEntitySetOrSingletonOrType(); SerializerException cachedException;
public void entityCollectionIntoStream(ServiceMetadata metadata, EdmEntityType entityType, EntityIterator entitySet, EntityCollectionSerializerOptions options, OutputStream outputStream) throws SerializerException { final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); final String name = contextURL == null ? null : contextURL.getEntitySetOrSingletonOrType(); SerializerException cachedException;
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); writeContextURL(contextURL, json);
entityType.getFullQualifiedName(), true); if (action != null) { entitySet.getOperations().add(buildOperation(action, buildOperationTarget(options.getContextURL()))); entitySet.getOperations().add(buildOperation(function, buildOperationTarget(options.getContextURL())));
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); writeContextURL(contextURL, json);
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); writeContextURL(contextURL, json);
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); writeContextURL(contextURL, json);
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); writeContextURL(contextURL, json);
entityType.getFullQualifiedName(), true); if (action != null) { entitySet.getOperations().add(buildOperation(action, buildOperationTarget(options.getContextURL()))); entitySet.getOperations().add(buildOperation(function, buildOperationTarget(options.getContextURL())));
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); writeContextURL(contextURL, json);
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); String name = contextURL == null ? null:contextURL.getEntitySetOrSingletonOrType(); writeContextURL(contextURL, json);
json.writeStartObject(); final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL()); String name = contextURL == null ? null:contextURL.getEntitySetOrSingletonOrType(); writeContextURL(contextURL, json);