@Test public void testMarshallEntities() throws ODataClientException { Product lordOfTheRingsBook = new Product() .setId(11) .setName("The Lord of the Rings") .setCategory(BOOKS); Product gameOfThronesBook = new Product() .setId(11) .setName("Game of Thrones") .setCategory(BOOKS); List<Product> products = Stream.of(lordOfTheRingsBook, gameOfThronesBook).collect(Collectors.toList()); BasicODataClientQuery query = new BasicODataClientQuery.Builder() .withEntityType(Product.class) .build(); String marshalledEntities = oDataEntityMarshaller.marshallEntity(products, query); List<?> unmarshallEntities = oDataEntityUnmarshaller.unmarshall(marshalledEntities, query); assertNotNull(unmarshallEntities); assertFalse(unmarshallEntities.isEmpty()); for (Object unmarshallEntity : unmarshallEntities) { assertTrue(products.contains(unmarshallEntity)); } }
@Override public String marshallEntities(List<?> oDataEntities, ODataClientQuery query) throws ODataClientException { return marshallEntity(oDataEntities, query); }
AtomEntityMarshaller implements ODataEntityMarshaller { @Override public String marshallEntities(List<?> oDataEntities, ODataClientQuery query) throws ODataClientException { return marshallEntity(oDataEntities, query); } }
AtomEntityMarshaller implements ODataEntityMarshaller { @Override public String marshallEntities(List<?> oDataEntities, ODataClientQuery query) throws ODataClientException { return marshallEntity(oDataEntities, query); } AtomEntityMarshaller(Iterable<Class<?>> edmEntityClasses, String url); protected  AtomEntityMarshaller(Iterable<Class<?>> edmEntityClasses, String url, AbstractAtomRenderer atomRenderer); }
AtomEntityMarshaller implements ODataEntityMarshaller { @Override public String marshallEntities(List<?> oDataEntities, ODataClientQuery query) throws ODataClientException { return marshallEntity(oDataEntities, query); } AtomEntityMarshaller(Iterable<Class<?>> edmEntityClasses, String url); protected  AtomEntityMarshaller(Iterable<Class<?>> edmEntityClasses, String url, AbstractAtomRenderer atomRenderer); @Override String marshallEntity(Object oDataEntity, ODataClientQuery query); @Override String marshallEntities(List<?> oDataEntities, ODataClientQuery query); }
AtomEntityMarshaller implements ODataEntityMarshaller { @Override public String marshallEntities(List<?> oDataEntities, ODataClientQuery query) throws ODataClientException { return marshallEntity(oDataEntities, query); } AtomEntityMarshaller(Iterable<Class<?>> edmEntityClasses, String url); protected  AtomEntityMarshaller(Iterable<Class<?>> edmEntityClasses, String url, AbstractAtomRenderer atomRenderer); @Override String marshallEntity(Object oDataEntity, ODataClientQuery query); @Override String marshallEntities(List<?> oDataEntities, ODataClientQuery query);  }