use of org.odata4j.format.Entry in project teiid by teiid.
the class ODataUpdateExecution method buildPayload.
private String buildPayload(String entitySet, final List<OProperty<?>> props, EdmDataServices edm) {
// this is remove the teiid specific model name from the entity type name.
final EdmEntitySet ees = ODataEntitySchemaBuilder.removeModelName(edm.getEdmEntitySet(entitySet));
Entry entry = new Entry() {
public String getUri() {
return null;
}
public OEntity getEntity() {
return OEntities.createRequest(ees, props, null);
}
};
StringWriter sw = new StringWriter();
// $NON-NLS-1$
FormatWriter<Entry> fw = FormatWriterFactory.getFormatWriter(Entry.class, null, "ATOM", null);
fw.write(null, sw, entry);
return sw.toString();
}
Aggregations