@Test public void testWriteEntryEntityLink() throws Exception { startDocument(false); metadataWriter = new AtomMetadataWriter(xmlWriter, odataUri, entityDataModel, nsConfigurationProvider); metadataWriter.writeEntryEntityLink(customer); endDocument(); assertEquals(prettyPrintXml(readContent(EXPECTED_ENTRY_ENTITY_LINK_PATH)), prettyPrintXml(outputStream.toString())); }
public void writeEntryEntityLink(Object entity) throws XMLStreamException, ODataEdmException { EntityType entityType = getAndCheckEntityType(entityDataModel, entity.getClass()); xmlWriter.writeStartElement(ATOM_LINK); if (entityType.isReadOnly()) { xmlWriter.writeAttribute(REL, SELF); } else { xmlWriter.writeAttribute(REL, EDIT); } xmlWriter.writeAttribute(TITLE, entityType.getName()); xmlWriter.writeAttribute(HREF, getEntityWithKey(entity)); xmlWriter.writeEndElement(); }
AtomMetadataWriter { public void writeEntryEntityLink(Object entity) throws XMLStreamException, ODataEdmException { EntityType entityType = getAndCheckEntityType(entityDataModel, entity.getClass()); xmlWriter.writeStartElement(ATOM_LINK); if (entityType.isReadOnly()) { xmlWriter.writeAttribute(REL, SELF); } else { xmlWriter.writeAttribute(REL, EDIT); } xmlWriter.writeAttribute(TITLE, entityType.getName()); xmlWriter.writeAttribute(HREF, getEntityWithKey(entity)); xmlWriter.writeEndElement(); } }
AtomMetadataWriter { public void writeEntryEntityLink(Object entity) throws XMLStreamException, ODataEdmException { EntityType entityType = getAndCheckEntityType(entityDataModel, entity.getClass()); xmlWriter.writeStartElement(ATOM_LINK); if (entityType.isReadOnly()) { xmlWriter.writeAttribute(REL, SELF); } else { xmlWriter.writeAttribute(REL, EDIT); } xmlWriter.writeAttribute(TITLE, entityType.getName()); xmlWriter.writeAttribute(HREF, getEntityWithKey(entity)); xmlWriter.writeEndElement(); } AtomMetadataWriter(XMLStreamWriter xmlWriter, ODataUri oDataUri,
                              EntityDataModel entityDataModel, AtomNSConfigurationProvider nsConfigurationProvider); }
AtomMetadataWriter { public void writeEntryEntityLink(Object entity) throws XMLStreamException, ODataEdmException { EntityType entityType = getAndCheckEntityType(entityDataModel, entity.getClass()); xmlWriter.writeStartElement(ATOM_LINK); if (entityType.isReadOnly()) { xmlWriter.writeAttribute(REL, SELF); } else { xmlWriter.writeAttribute(REL, EDIT); } xmlWriter.writeAttribute(TITLE, entityType.getName()); xmlWriter.writeAttribute(HREF, getEntityWithKey(entity)); xmlWriter.writeEndElement(); } AtomMetadataWriter(XMLStreamWriter xmlWriter, ODataUri oDataUri,
                              EntityDataModel entityDataModel, AtomNSConfigurationProvider nsConfigurationProvider); void writeEntryEntityLink(Object entity); void writeCount(Object count); }
AtomMetadataWriter { public void writeEntryEntityLink(Object entity) throws XMLStreamException, ODataEdmException { EntityType entityType = getAndCheckEntityType(entityDataModel, entity.getClass()); xmlWriter.writeStartElement(ATOM_LINK); if (entityType.isReadOnly()) { xmlWriter.writeAttribute(REL, SELF); } else { xmlWriter.writeAttribute(REL, EDIT); } xmlWriter.writeAttribute(TITLE, entityType.getName()); xmlWriter.writeAttribute(HREF, getEntityWithKey(entity)); xmlWriter.writeEndElement(); } AtomMetadataWriter(XMLStreamWriter xmlWriter, ODataUri oDataUri,
                              EntityDataModel entityDataModel, AtomNSConfigurationProvider nsConfigurationProvider); void writeEntryEntityLink(Object entity); void writeCount(Object count);  }