@Test public void esCollAllPrim() throws Exception { final DataProvider dataProvider = new DataProvider(oData, edm); EntityCollection outSet = dataProvider.readAll(esCollAllPrim); Assert.assertEquals(3, outSet.getEntities().size()); Assert.assertEquals(17, outSet.getEntities().get(0).getProperties().size()); Property list = outSet.getEntities().get(0).getProperties().get(1); Assert.assertTrue(list.isCollection()); Assert.assertEquals(3, list.asCollection().size()); Assert.assertEquals(17, outSet.getEntities().get(1).getProperties().size()); Assert.assertEquals(17, outSet.getEntities().get(2).getProperties().size()); }
public EntityCollection readAll(final EdmEntitySet edmEntitySet) throws DataProviderException { EntityCollection entityCollection = data.get(edmEntitySet.getName()); if (entityCollection == null) { entityCollection = new EntityCollection(); data.put(edmEntitySet.getName(), entityCollection); } return entityCollection; }
DataProvider { public EntityCollection readAll(final EdmEntitySet edmEntitySet) throws DataProviderException { EntityCollection entityCollection = data.get(edmEntitySet.getName()); if (entityCollection == null) { entityCollection = new EntityCollection(); data.put(edmEntitySet.getName(), entityCollection); } return entityCollection; } }
DataProvider { public EntityCollection readAll(final EdmEntitySet edmEntitySet) throws DataProviderException { EntityCollection entityCollection = data.get(edmEntitySet.getName()); if (entityCollection == null) { entityCollection = new EntityCollection(); data.put(edmEntitySet.getName(), entityCollection); } return entityCollection; } DataProvider(final OData odata, final Edm edm); }
DataProvider { public EntityCollection readAll(final EdmEntitySet edmEntitySet) throws DataProviderException { EntityCollection entityCollection = data.get(edmEntitySet.getName()); if (entityCollection == null) { entityCollection = new EntityCollection(); data.put(edmEntitySet.getName(), entityCollection); } return entityCollection; } DataProvider(final OData odata, final Edm edm); EntityCollection readAll(final EdmEntitySet edmEntitySet); Entity read(final EdmEntitySet edmEntitySet, final List<UriParameter> keys); Entity read(final EdmEntityType edmEntityType, final EntityCollection entitySet,
      final List<UriParameter> keys); void delete(final EdmEntitySet edmEntitySet, final Entity entity); void deleteLinksTo(final Entity to); Entity create(final EdmEntitySet edmEntitySet); void update(final String rawBaseUri, final EdmEntitySet edmEntitySet, Entity entity,
      final Entity changedEntity, final boolean patch, final boolean isInsert); void updateETag(Entity entity); void setLink(final EdmNavigationProperty navigationProperty, final Entity srcEntity,
      final Entity targetEntity); @SuppressWarnings("unchecked") void updateProperty(final EdmProperty edmProperty, Property property, final Property newProperty,
      final boolean patch); void updatePropertyValue(Property property, final Object value); byte[] readMedia(final Entity entity); void setMedia(final Entity entity, final byte[] media, final String type); List<DeletedEntity> readDeletedEntities(final EdmEntitySet edmEntitySet); List<DeltaLink> readAddedLinks(final EdmEntitySet edmEntitySet); List<DeltaLink> readDeletedLinks(final EdmEntitySet edmEntitySet); EntityCollection readFunctionEntityCollection(final EdmFunction function, final List<UriParameter> parameters,
      final UriInfoResource uriInfo); Entity readFunctionEntity(final EdmFunction function, final List<UriParameter> parameters,
      final UriInfoResource uriInfo); Property readFunctionPrimitiveComplex(final EdmFunction function, final List<UriParameter> parameters,
      final UriInfoResource uriInfo); Property processActionPrimitive(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionPrimitive(final String name, final Map<String, Parameter> actionParameters, 
      final EdmEntitySet edmEntitySet, final List<UriParameter> keyList); Property processActionComplex(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionComplex(final String name, final Map<String, Parameter> actionParameters,
      final EdmEntitySet edmEntitySet, 
      final List<UriParameter> keyList); Property processActionComplexCollection(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionComplexCollection(final String name, 
      final Map<String, Parameter> actionParameters, final EdmEntitySet edmEntitySet, 
      final List<UriParameter> keyList); Property processActionPrimitiveCollection(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionPrimitiveCollection(final String name, 
      final Map<String, Parameter> actionParameters, final EdmEntitySet edmEntitySet, 
      final List<UriParameter> keyList); EntityActionResult processActionEntity(final String name, final Map<String, Parameter> actionParameters); EntityActionResult processBoundActionEntity(final String name, final Map<String, Parameter> actionParameters, 
      List<UriParameter> keyList, EdmEntitySet edmEntitySet); EntityActionResult processBoundActionWithNavigationEntity(final String name, 
      final Map<String, Parameter> actionParameters, 
      List<UriParameter> keyList, EdmEntitySet edmEntitySet, EdmNavigationProperty navProperty); EntityCollection processActionEntityCollection(final String name,
      final Map<String, Parameter> actionParameters); EntityCollection processBoundActionEntityCollection(final String name,
      final Map<String, Parameter> actionParameters, EdmEntitySet edmEntitySet); EntityCollection processBoundActionWithNavEntityCollection(final String name,
      final Map<String, Parameter> actionParameters, EdmEntitySet edmEntitySet, EdmNavigationProperty navProperty); void createReference(final Entity entity, final EdmNavigationProperty navigationProperty, final URI entityId,
      final String rawServiceRoot); void deleteReference(final Entity entity, final EdmNavigationProperty navigationProperty,
      final String entityId, final String rawServiceRoot); List<Entity> readNavigationEntities(EdmEntitySet entitySet); Entity read(EdmSingleton singleton); byte[] readStreamProperty(Property property); Entity createContNav(final EdmEntitySet edmEntitySet, final EdmEntityType edmEntityType, 
      final Entity newEntity, List<UriParameter> keys, String navPropertyName); Entity readDataFromEntity(final EdmEntityType edmEntityType,
      final List<UriParameter> keys); }
DataProvider { public EntityCollection readAll(final EdmEntitySet edmEntitySet) throws DataProviderException { EntityCollection entityCollection = data.get(edmEntitySet.getName()); if (entityCollection == null) { entityCollection = new EntityCollection(); data.put(edmEntitySet.getName(), entityCollection); } return entityCollection; } DataProvider(final OData odata, final Edm edm); EntityCollection readAll(final EdmEntitySet edmEntitySet); Entity read(final EdmEntitySet edmEntitySet, final List<UriParameter> keys); Entity read(final EdmEntityType edmEntityType, final EntityCollection entitySet,
      final List<UriParameter> keys); void delete(final EdmEntitySet edmEntitySet, final Entity entity); void deleteLinksTo(final Entity to); Entity create(final EdmEntitySet edmEntitySet); void update(final String rawBaseUri, final EdmEntitySet edmEntitySet, Entity entity,
      final Entity changedEntity, final boolean patch, final boolean isInsert); void updateETag(Entity entity); void setLink(final EdmNavigationProperty navigationProperty, final Entity srcEntity,
      final Entity targetEntity); @SuppressWarnings("unchecked") void updateProperty(final EdmProperty edmProperty, Property property, final Property newProperty,
      final boolean patch); void updatePropertyValue(Property property, final Object value); byte[] readMedia(final Entity entity); void setMedia(final Entity entity, final byte[] media, final String type); List<DeletedEntity> readDeletedEntities(final EdmEntitySet edmEntitySet); List<DeltaLink> readAddedLinks(final EdmEntitySet edmEntitySet); List<DeltaLink> readDeletedLinks(final EdmEntitySet edmEntitySet); EntityCollection readFunctionEntityCollection(final EdmFunction function, final List<UriParameter> parameters,
      final UriInfoResource uriInfo); Entity readFunctionEntity(final EdmFunction function, final List<UriParameter> parameters,
      final UriInfoResource uriInfo); Property readFunctionPrimitiveComplex(final EdmFunction function, final List<UriParameter> parameters,
      final UriInfoResource uriInfo); Property processActionPrimitive(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionPrimitive(final String name, final Map<String, Parameter> actionParameters, 
      final EdmEntitySet edmEntitySet, final List<UriParameter> keyList); Property processActionComplex(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionComplex(final String name, final Map<String, Parameter> actionParameters,
      final EdmEntitySet edmEntitySet, 
      final List<UriParameter> keyList); Property processActionComplexCollection(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionComplexCollection(final String name, 
      final Map<String, Parameter> actionParameters, final EdmEntitySet edmEntitySet, 
      final List<UriParameter> keyList); Property processActionPrimitiveCollection(final String name, final Map<String, Parameter> actionParameters); Property processBoundActionPrimitiveCollection(final String name, 
      final Map<String, Parameter> actionParameters, final EdmEntitySet edmEntitySet, 
      final List<UriParameter> keyList); EntityActionResult processActionEntity(final String name, final Map<String, Parameter> actionParameters); EntityActionResult processBoundActionEntity(final String name, final Map<String, Parameter> actionParameters, 
      List<UriParameter> keyList, EdmEntitySet edmEntitySet); EntityActionResult processBoundActionWithNavigationEntity(final String name, 
      final Map<String, Parameter> actionParameters, 
      List<UriParameter> keyList, EdmEntitySet edmEntitySet, EdmNavigationProperty navProperty); EntityCollection processActionEntityCollection(final String name,
      final Map<String, Parameter> actionParameters); EntityCollection processBoundActionEntityCollection(final String name,
      final Map<String, Parameter> actionParameters, EdmEntitySet edmEntitySet); EntityCollection processBoundActionWithNavEntityCollection(final String name,
      final Map<String, Parameter> actionParameters, EdmEntitySet edmEntitySet, EdmNavigationProperty navProperty); void createReference(final Entity entity, final EdmNavigationProperty navigationProperty, final URI entityId,
      final String rawServiceRoot); void deleteReference(final Entity entity, final EdmNavigationProperty navigationProperty,
      final String entityId, final String rawServiceRoot); List<Entity> readNavigationEntities(EdmEntitySet entitySet); Entity read(EdmSingleton singleton); byte[] readStreamProperty(Property property); Entity createContNav(final EdmEntitySet edmEntitySet, final EdmEntityType edmEntityType, 
      final Entity newEntity, List<UriParameter> keys, String navPropertyName); Entity readDataFromEntity(final EdmEntityType edmEntityType,
      final List<UriParameter> keys);  }