http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java ---------------------------------------------------------------------- diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java index f55c56e..f942e1c 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java @@ -1,18 +1,18 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -34,9 +34,9 @@ import org.apache.olingo.client.api.communication.response.ODataEntityCreateResp import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse; import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.client.api.uri.URIBuilder; -import org.apache.olingo.commons.api.domain.ODataEntity; -import org.apache.olingo.commons.api.domain.ODataProperty; -import org.apache.olingo.commons.api.domain.ODataValuable; +import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.commons.api.domain.ClientProperty; +import org.apache.olingo.commons.api.domain.ClientValuable; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; import org.junit.Test; @@ -46,15 +46,15 @@ public class PropertyTestITCase extends AbstractTestITCase { private void _enum(final ODataClient client, final ODataFormat format) { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Products").appendKeySegment(5).appendPropertySegment("CoverColors"); - final ODataPropertyRequest<ODataProperty> req = client.getRetrieveRequestFactory(). + final ODataPropertyRequest<ClientProperty> req = client.getRetrieveRequestFactory(). getPropertyRequest(uriBuilder.build()); req.setFormat(format); - final ODataProperty prop = req.execute().getBody(); + final ClientProperty prop = req.execute().getBody(); assertNotNull(prop); // cast to workaround JDK 6 bug, fixed in JDK 7 assertEquals("Collection(Microsoft.Test.OData.Services.ODataWCFService.Color)", - ((ODataValuable) prop).getValue().getTypeName()); + ((ClientValuable) prop).getValue().getTypeName()); } @Test @@ -75,14 +75,14 @@ public class PropertyTestITCase extends AbstractTestITCase { private void geospatial(final ODataClient client, final ODataFormat format) { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("People").appendKeySegment(5).appendPropertySegment("Home"); - final ODataPropertyRequest<ODataProperty> req = client.getRetrieveRequestFactory(). + final ODataPropertyRequest<ClientProperty> req = client.getRetrieveRequestFactory(). getPropertyRequest(uriBuilder.build()); req.setFormat(format); - final ODataProperty prop = req.execute().getBody(); + final ClientProperty prop = req.execute().getBody(); assertNotNull(prop); // cast to workaround JDK 6 bug, fixed in JDK 7 - assertEquals("Edm.GeographyPoint", ((ODataValuable) prop).getValue().getTypeName()); + assertEquals("Edm.GeographyPoint", ((ClientValuable) prop).getValue().getTypeName()); } @Test @@ -103,15 +103,15 @@ public class PropertyTestITCase extends AbstractTestITCase { private void complex(final ODataClient client, final ODataFormat format) { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Customers").appendKeySegment(2).appendPropertySegment("HomeAddress"); - final ODataPropertyRequest<ODataProperty> req = client.getRetrieveRequestFactory(). + final ODataPropertyRequest<ClientProperty> req = client.getRetrieveRequestFactory(). getPropertyRequest(uriBuilder.build()); req.setFormat(format); - final ODataProperty prop = req.execute().getBody(); + final ClientProperty prop = req.execute().getBody(); assertNotNull(prop); // cast to workaround JDK 6 bug, fixed in JDK 7 assertEquals("Microsoft.Test.OData.Services.ODataWCFService.Address", - ((ODataValuable) prop).getValue().getTypeName()); + ((ClientValuable) prop).getValue().getTypeName()); } @Test @@ -133,14 +133,14 @@ public class PropertyTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Customers").appendKeySegment(1).appendPropertySegment("HomeAddress"); - ODataPropertyRequest<ODataProperty> retrieveReq = + ODataPropertyRequest<ClientProperty> retrieveReq = client.getRetrieveRequestFactory().getPropertyRequest(uriBuilder.build()); retrieveReq.setFormat(format); - ODataRetrieveResponse<ODataProperty> retrieveRes = retrieveReq.execute(); + ODataRetrieveResponse<ClientProperty> retrieveRes = retrieveReq.execute(); assertEquals(200, retrieveRes.getStatusCode()); - ODataProperty homeAddress = client.getObjectFactory().newComplexProperty("HomeAddress", + ClientProperty homeAddress = client.getObjectFactory().newComplexProperty("HomeAddress", client.getObjectFactory().newComplexValue(retrieveRes.getBody().getComplexValue().getTypeName())); homeAddress.getComplexValue().add(client.getObjectFactory(). @@ -176,17 +176,17 @@ public class PropertyTestITCase extends AbstractTestITCase { @Test public void createAndDelete() { // 1. create - final ODataEntity category = client.getObjectFactory().newEntity(null); + final ClientEntity category = client.getObjectFactory().newEntity(null); category.setId(client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Categories").appendKeySegment(1).build()); final URIBuilder createBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Products").appendKeySegment(0).appendNavigationSegment("Categories"). appendRefSegment(); - final ODataEntityCreateRequest<ODataEntity> createReq = client.getCUDRequestFactory(). + final ODataEntityCreateRequest<ClientEntity> createReq = client.getCUDRequestFactory(). getEntityCreateRequest(createBuilder.build(), category); - final ODataEntityCreateResponse<ODataEntity> createRes = createReq.execute(); + final ODataEntityCreateResponse<ClientEntity> createRes = createReq.execute(); assertEquals(204, createRes.getStatusCode()); // 2. delete
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java ---------------------------------------------------------------------- diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java index 12fd772..6038654 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java @@ -1,18 +1,18 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -28,9 +28,9 @@ import org.apache.olingo.client.api.communication.ODataClientErrorException; import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest; import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest; import org.apache.olingo.client.api.uri.URIBuilder; -import org.apache.olingo.commons.api.domain.ODataPrimitiveValue; -import org.apache.olingo.commons.api.domain.ODataProperty; -import org.apache.olingo.commons.api.domain.ODataValuable; +import org.apache.olingo.commons.api.domain.ClientPrimitiveValue; +import org.apache.olingo.commons.api.domain.ClientProperty; +import org.apache.olingo.commons.api.domain.ClientValuable; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.format.ODataFormat; import org.junit.Test; @@ -70,7 +70,7 @@ public class PropertyValueTestITCase extends AbstractTestITCase { appendEntitySetSegment("Orders").appendKeySegment(8).appendPropertySegment("OrderDate"); final ODataValueRequest req = client.getRetrieveRequestFactory().getPropertyValueRequest(uriBuilder.build()); req.setFormat(ODataFormat.TEXT_PLAIN); - final ODataPrimitiveValue property = req.execute().getBody(); + final ClientPrimitiveValue property = req.execute().getBody(); assertEquals("2011-03-04T16:03:57Z", property.toString()); } @@ -80,7 +80,7 @@ public class PropertyValueTestITCase extends AbstractTestITCase { appendEntitySetSegment("People").appendKeySegment(5).appendPropertySegment("Height"); final ODataValueRequest req = client.getRetrieveRequestFactory().getPropertyValueRequest(uriBuilder.build()); req.setFormat(ODataFormat.TEXT_PLAIN); - final ODataPrimitiveValue property = req.execute().getBody(); + final ClientPrimitiveValue property = req.execute().getBody(); assertEquals("179", property.toString()); } @@ -90,7 +90,7 @@ public class PropertyValueTestITCase extends AbstractTestITCase { appendEntitySetSegment("People").appendKeySegment(5).appendPropertySegment("PDC"); final ODataValueRequest req = client.getRetrieveRequestFactory().getPropertyValueRequest(uriBuilder.build()); req.setFormat(ODataFormat.TEXT_PLAIN); - final ODataPrimitiveValue property = req.execute().getBody(); + final ClientPrimitiveValue property = req.execute().getBody(); assertEquals("fi653p3+MklA/LdoBlhWgnMTUUEo8tEgtbMXnF0a3CUNL9BZxXpSRiD9ebTnmNR0zWPjJ" + "VIDx4tdmCnq55XrJh+RW9aI/b34wAogK3kcORw=", property.toString()); } @@ -117,12 +117,12 @@ public class PropertyValueTestITCase extends AbstractTestITCase { public void retrieveCollectionPropertyValueTest() { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("People").appendKeySegment(5).appendPropertySegment("Numbers"); - final ODataPropertyRequest<ODataProperty> req = client.getRetrieveRequestFactory(). + final ODataPropertyRequest<ClientProperty> req = client.getRetrieveRequestFactory(). getPropertyRequest(uriBuilder.build()); req.setFormat(ODataFormat.XML); - final ODataProperty property = req.execute().getBody(); + final ClientProperty property = req.execute().getBody(); // cast to workaround JDK 6 bug, fixed in JDK 7 - assertTrue(((ODataValuable) property).getValue().isCollection()); + assertTrue(((ClientValuable) property).getValue().isCollection()); assertEquals("555-555-5555", property.getCollectionValue().iterator().next().asPrimitive().toString()); } @@ -132,7 +132,7 @@ public class PropertyValueTestITCase extends AbstractTestITCase { appendEntitySetSegment("People").appendKeySegment(5).appendPropertySegment("HomeAddress"); final ODataValueRequest req = client.getRetrieveRequestFactory().getPropertyValueRequest(uriBuilder.build()); req.setFormat(ODataFormat.TEXT_PLAIN); - final ODataPrimitiveValue property = req.execute().getBody(); + final ClientPrimitiveValue property = req.execute().getBody(); assertTrue(StringUtils.isBlank(property.toString())); } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java ---------------------------------------------------------------------- diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java index eb9ce22..046baa9 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java @@ -1,18 +1,18 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -23,9 +23,9 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.client.api.uri.QueryOption; import org.apache.olingo.client.api.uri.URIBuilder; -import org.apache.olingo.commons.api.domain.ODataEntity; -import org.apache.olingo.commons.api.domain.ODataEntitySet; -import org.apache.olingo.commons.api.domain.ODataInlineEntitySet; +import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.commons.api.domain.ClientEntitySet; +import org.apache.olingo.commons.api.domain.ClientInlineEntitySet; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.format.ODataFormat; import org.junit.Test; @@ -51,10 +51,11 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Customers").appendKeySegment(1).expand("Orders"); - final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); + final ODataEntityRequest<ClientEntity> req = + client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); - final ODataEntity customer = req.execute().getBody(); - assertTrue(customer.getNavigationLink("Orders") instanceof ODataInlineEntitySet); + final ClientEntity customer = req.execute().getBody(); + assertTrue(customer.getNavigationLink("Orders") instanceof ClientInlineEntitySet); } @Test @@ -64,10 +65,11 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { expandWithOptions("Orders", Collections.<QueryOption, Object> singletonMap( QueryOption.FILTER, getClient().getFilterFactory().gt("OrderID", 7).build())); - final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); + final ODataEntityRequest<ClientEntity> req = + client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); - final ODataEntity customer = req.execute().getBody(); - assertTrue(customer.getNavigationLink("Orders") instanceof ODataInlineEntitySet); + final ClientEntity customer = req.execute().getBody(); + assertTrue(customer.getNavigationLink("Orders") instanceof ClientInlineEntitySet); } /** @@ -81,16 +83,16 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { appendEntitySetSegment("People").filter("(PersonID lt 3)"); // 1. check that filtered entity set looks as expected - ODataEntitySetRequest<ODataEntitySet> req = + ODataEntitySetRequest<ClientEntitySet> req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()); - ODataEntitySet feed = req.execute().getBody(); + ClientEntitySet feed = req.execute().getBody(); assertNotNull(feed); assertEquals(2, feed.getEntities().size()); // 2. extract PersonID values - sorted ASC by default final List<Integer> former = new ArrayList<Integer>(2); - for (ODataEntity entity : feed.getEntities()) { + for (ClientEntity entity : feed.getEntities()) { final Integer personID = entity.getProperty("PersonID").getPrimitiveValue().toCastValue(Integer.class); assertTrue(personID < 3); former.add(personID); @@ -105,7 +107,7 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { // 4. extract again VIN value - now they were required to be sorted DESC final List<Integer> latter = new ArrayList<Integer>(2); - for (ODataEntity entity : feed.getEntities()) { + for (ClientEntity entity : feed.getEntities()) { final Integer personID = entity.getProperty("PersonID").getPrimitiveValue().toCastValue(Integer.class); assertTrue(personID < 3); latter.add(personID); @@ -124,10 +126,11 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Customers").appendKeySegment(1).format("json"); - final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); + final ODataEntityRequest<ClientEntity> req = + client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); req.setFormat(ODataFormat.ATOM); - final ODataRetrieveResponse<ODataEntity> res = req.execute(); + final ODataRetrieveResponse<ClientEntity> res = req.execute(); assertNotNull(res); assertTrue(res.getContentType().replaceAll(" ", ""). startsWith(ODataFormat.JSON.getContentType().toContentTypeString())); @@ -140,10 +143,10 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("People"); // 1. check that filtered entity set looks as expected - final ODataEntitySetRequest<ODataEntitySet> req = + final ODataEntitySetRequest<ClientEntitySet> req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.skip(2).build()); - final ODataEntitySet feed = req.execute().getBody(); + final ClientEntitySet feed = req.execute().getBody(); assertEquals(3, feed.getEntities().size()); } @@ -154,10 +157,10 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("People"); // 1. check that filtered entity set looks as expected - final ODataEntitySetRequest<ODataEntitySet> req = client.getRetrieveRequestFactory(). + final ODataEntitySetRequest<ClientEntitySet> req = client.getRetrieveRequestFactory(). getEntitySetRequest(uriBuilder.top(2).build()); - final ODataEntitySet feed = req.execute().getBody(); + final ClientEntitySet feed = req.execute().getBody(); assertEquals(2, feed.getEntities().size()); } @@ -169,14 +172,14 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL); uriBuilder.appendEntitySetSegment("People").skipToken("5"); - final ODataEntitySetRequest<ODataEntitySet> req = + final ODataEntitySetRequest<ClientEntitySet> req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()); - final ODataEntitySet feed = req.execute().getBody(); + final ClientEntitySet feed = req.execute().getBody(); assertNotNull(feed); assertEquals(1, feed.getEntities().size()); - for (ODataEntity entity : feed.getEntities()) { + for (ClientEntity entity : feed.getEntities()) { assertTrue(entity.getProperty("PersonID").getPrimitiveValue().toCastValue(Integer.class) > 5); } } @@ -189,10 +192,10 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customers").count(true); - final ODataEntitySetRequest<ODataEntitySet> req = + final ODataEntitySetRequest<ClientEntitySet> req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()); - final ODataEntitySet feed = req.execute().getBody(); + final ClientEntitySet feed = req.execute().getBody(); assertNotNull(feed); assertEquals(Integer.valueOf(feed.getEntities().size()), feed.getCount()); } @@ -205,12 +208,13 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Customers").appendKeySegment(1).select("PersonID,Orders").expand("Orders"); - final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); + final ODataEntityRequest<ClientEntity> req = + client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); - final ODataEntity customer = req.execute().getBody(); + final ClientEntity customer = req.execute().getBody(); assertEquals(1, customer.getProperties().size()); assertEquals(1, customer.getNavigationLinks().size()); - assertTrue((customer.getNavigationLinks().get(0) instanceof ODataInlineEntitySet)); + assertTrue((customer.getNavigationLinks().get(0) instanceof ClientInlineEntitySet)); } @Test @@ -219,9 +223,10 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { appendEntitySetSegment("relatedEntitySelect").appendEntitySetSegment("Customers").appendKeySegment(1). expandWithSelect("Orders", "OrderID", "OrderDetails"); - final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); + final ODataEntityRequest<ClientEntity> req = + client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build()); - final ODataRetrieveResponse<ODataEntity> res = req.execute(); + final ODataRetrieveResponse<ClientEntity> res = req.execute(); assertEquals(200, res.getStatusCode()); } @@ -231,10 +236,10 @@ public class QueryOptionsTestITCase extends AbstractTestITCase { appendEntitySetSegment("People").search(client.getSearchFactory(). or(client.getSearchFactory().literal("Bob"), client.getSearchFactory().literal("Jill"))); - final ODataEntitySetRequest<ODataEntitySet> req = + final ODataEntitySetRequest<ClientEntitySet> req = client.getRetrieveRequestFactory().getEntitySetRequest(builder.build()); - final ODataRetrieveResponse<ODataEntitySet> res = req.execute(); + final ODataRetrieveResponse<ClientEntitySet> res = req.execute(); assertEquals(200, res.getStatusCode()); assertFalse(res.getBody().getEntities().isEmpty()); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java ---------------------------------------------------------------------- diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java index b2abc70..402b30f 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java @@ -1,18 +1,18 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -20,7 +20,7 @@ package org.apache.olingo.fit.v4; import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest; import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; -import org.apache.olingo.commons.api.domain.ODataServiceDocument; +import org.apache.olingo.commons.api.domain.ClientServiceDocument; import org.apache.olingo.commons.api.format.ODataFormat; import org.junit.Test; @@ -35,10 +35,10 @@ public class ServiceDocumentTestITCase extends AbstractTestITCase { client.getRetrieveRequestFactory().getServiceDocumentRequest(testStaticServiceRootURL); req.setFormat(format); - final ODataRetrieveResponse<ODataServiceDocument> res = req.execute(); + final ODataRetrieveResponse<ClientServiceDocument> res = req.execute(); assertEquals(200, res.getStatusCode()); - final ODataServiceDocument serviceDocument = res.getBody(); + final ClientServiceDocument serviceDocument = res.getBody(); assertEquals(12, serviceDocument.getEntitySets().size()); assertEquals(6, serviceDocument.getSingletons().size()); assertEquals(6, serviceDocument.getFunctionImports().size()); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java ---------------------------------------------------------------------- diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java index 5a2605b..8883c96 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java @@ -1,18 +1,18 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -24,9 +24,9 @@ import org.apache.olingo.client.api.communication.request.cud.UpdateType; import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest; import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse; import org.apache.olingo.client.api.uri.URIBuilder; -import org.apache.olingo.commons.api.domain.ODataAnnotation; -import org.apache.olingo.commons.api.domain.ODataSingleton; -import org.apache.olingo.commons.api.domain.ODataValuable; +import org.apache.olingo.commons.api.domain.ClientAnnotation; +import org.apache.olingo.commons.api.domain.ClientSingleton; +import org.apache.olingo.commons.api.domain.ClientValuable; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.FullQualifiedName; import org.apache.olingo.commons.api.format.ODataFormat; @@ -43,16 +43,16 @@ public class SingletonTestITCase extends AbstractTestITCase { private void read(final ODataClient client, final ODataFormat format) throws EdmPrimitiveTypeException { final URIBuilder builder = client.newURIBuilder(testStaticServiceRootURL).appendSingletonSegment("Company"); - final ODataEntityRequest<ODataSingleton> singleton = + final ODataEntityRequest<ClientSingleton> singleton = client.getRetrieveRequestFactory().getSingletonRequest(builder.build()); singleton.setFormat(format); - final ODataSingleton company = singleton.execute().getBody(); + final ClientSingleton company = singleton.execute().getBody(); assertNotNull(company); assertEquals(0, company.getProperty("CompanyID").getPrimitiveValue().toCastValue(Integer.class), 0); // cast to workaround JDK 6 bug, fixed in JDK 7 assertEquals("Microsoft.Test.OData.Services.ODataWCFService.CompanyCategory", - ((ODataValuable) company.getProperty("CompanyCategory")).getValue().getTypeName()); + ((ClientValuable) company.getProperty("CompanyCategory")).getValue().getTypeName()); assertTrue(company.getProperty("CompanyCategory").hasEnumValue()); } @@ -75,15 +75,15 @@ public class SingletonTestITCase extends AbstractTestITCase { throws EdmPrimitiveTypeException { final URIBuilder builder = client.newURIBuilder(testStaticServiceRootURL).appendSingletonSegment("Boss"); - final ODataEntityRequest<ODataSingleton> singleton = + final ODataEntityRequest<ClientSingleton> singleton = client.getRetrieveRequestFactory().getSingletonRequest(builder.build()); singleton.setFormat(format); singleton.setPrefer(client.newPreferences().includeAnnotations("*")); - final ODataSingleton boss = singleton.execute().getBody(); + final ClientSingleton boss = singleton.execute().getBody(); assertNotNull(boss); assertFalse(boss.getAnnotations().isEmpty()); - final ODataAnnotation isBoss = boss.getAnnotations().get(0); + final ClientAnnotation isBoss = boss.getAnnotations().get(0); assertTrue(isBoss.getPrimitiveValue().toCastValue(Boolean.class)); } @@ -103,20 +103,21 @@ public class SingletonTestITCase extends AbstractTestITCase { } private void update(final ODataFormat format) throws EdmPrimitiveTypeException { - final ODataSingleton changes = getClient().getObjectFactory().newSingleton( + final ClientSingleton changes = getClient().getObjectFactory().newSingleton( new FullQualifiedName("Microsoft.Test.OData.Services.ODataWCFService.Company")); changes.getProperties().add(getClient().getObjectFactory().newPrimitiveProperty("Revenue", getClient().getObjectFactory().newPrimitiveValueBuilder().buildInt64(132520L))); final URI uri = client.newURIBuilder(testStaticServiceRootURL).appendSingletonSegment("Company").build(); - final ODataEntityUpdateRequest<ODataSingleton> req = getClient().getCUDRequestFactory(). + final ODataEntityUpdateRequest<ClientSingleton> req = getClient().getCUDRequestFactory(). getSingletonUpdateRequest(uri, UpdateType.PATCH, changes); req.setFormat(format); - final ODataEntityUpdateResponse<ODataSingleton> res = req.execute(); + final ODataEntityUpdateResponse<ClientSingleton> res = req.execute(); assertEquals(204, res.getStatusCode()); - final ODataSingleton updated = getClient().getRetrieveRequestFactory().getSingletonRequest(uri).execute().getBody(); + final ClientSingleton updated = + getClient().getRetrieveRequestFactory().getSingletonRequest(uri).execute().getBody(); assertNotNull(updated); assertEquals(132520, updated.getProperty("Revenue").getPrimitiveValue().toCastValue(Integer.class), 0); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java index 24b5119..04e01ba 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java @@ -32,7 +32,7 @@ import org.apache.olingo.client.api.serialization.ODataWriter; import org.apache.olingo.client.api.uri.FilterFactory; import org.apache.olingo.client.api.uri.SearchFactory; import org.apache.olingo.client.api.uri.URIBuilder; -import org.apache.olingo.commons.api.domain.ODataObjectFactory; +import org.apache.olingo.commons.api.domain.ClientObjectFactory; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataSerializer; @@ -65,7 +65,7 @@ public interface ODataClient { SearchFactory getSearchFactory(); - ODataObjectFactory getObjectFactory(); + ClientObjectFactory getObjectFactory(); AsyncRequestFactory getAsyncRequestFactory(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java index 178241a..218c6e3 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java @@ -21,12 +21,12 @@ package org.apache.olingo.client.api.communication; import org.apache.commons.lang3.StringUtils; import org.apache.http.StatusLine; import org.apache.olingo.commons.api.ODataRuntimeException; -import org.apache.olingo.commons.api.domain.ODataError; +import org.apache.olingo.commons.api.domain.ClientError; /** * Represents a client error in OData. * - * @see ODataError + * @see ClientError */ public class ODataClientErrorException extends ODataRuntimeException { @@ -34,7 +34,7 @@ public class ODataClientErrorException extends ODataRuntimeException { private final StatusLine statusLine; - private final ODataError error; + private final ClientError error; /** * Constructor. @@ -54,7 +54,7 @@ public class ODataClientErrorException extends ODataRuntimeException { * @param statusLine request status info. * @param error OData error to be wrapped. */ - public ODataClientErrorException(final StatusLine statusLine, final ODataError error) { + public ODataClientErrorException(final StatusLine statusLine, final ClientError error) { super(error == null ? statusLine.toString() : (StringUtils.isBlank(error.getCode()) ? StringUtils.EMPTY : "(" + error.getCode() + ") ") @@ -78,7 +78,7 @@ public class ODataClientErrorException extends ODataRuntimeException { * * @return OData error. */ - public ODataError getODataError() { + public ClientError getODataError() { return error; } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java index 9cc35c5..73c3f1f 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java @@ -24,10 +24,10 @@ import java.net.URI; import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityCreateRequest; import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityUpdateRequest; import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUpdateRequest; -import org.apache.olingo.commons.api.domain.ODataEntity; -import org.apache.olingo.commons.api.domain.ODataPrimitiveValue; -import org.apache.olingo.commons.api.domain.ODataProperty; -import org.apache.olingo.commons.api.domain.ODataSingleton; +import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.commons.api.domain.ClientPrimitiveValue; +import org.apache.olingo.commons.api.domain.ClientProperty; +import org.apache.olingo.commons.api.domain.ClientSingleton; public interface CUDRequestFactory { @@ -41,7 +41,7 @@ public interface CUDRequestFactory { * @param entity entity to be created. * @return new ODataEntityCreateRequest instance. */ - <E extends ODataEntity> ODataEntityCreateRequest<E> getEntityCreateRequest(URI targetURI, E entity); + <E extends ClientEntity> ODataEntityCreateRequest<E> getEntityCreateRequest(URI targetURI, E entity); /** * Gets an update request object instance. @@ -52,7 +52,8 @@ public interface CUDRequestFactory { * @param changes changes to be applied. * @return new ODataEntityUpdateRequest instance. */ - <E extends ODataEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(URI targetURI, UpdateType type, E changes); + <E extends ClientEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(URI targetURI, + UpdateType type, E changes); /** * Gets an update request object instance; uses entity's edit link as endpoint. @@ -62,7 +63,7 @@ public interface CUDRequestFactory { * @param entity changes to be applied. * @return new ODataEntityUpdateRequest instance. */ - <E extends ODataEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(UpdateType type, E entity); + <E extends ClientEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(UpdateType type, E entity); /** * Gets a create request object instance. @@ -74,7 +75,7 @@ public interface CUDRequestFactory { * @param value value to be created. * @return new ODataValueUpdateRequest instance. */ - ODataValueUpdateRequest getValueUpdateRequest(URI targetURI, UpdateType type, ODataPrimitiveValue value); + ODataValueUpdateRequest getValueUpdateRequest(URI targetURI, UpdateType type, ClientPrimitiveValue value); /** * Gets an update request object instance. @@ -85,7 +86,7 @@ public interface CUDRequestFactory { * @param property value to be update. * @return new ODataPropertyUpdateRequest instance. */ - ODataPropertyUpdateRequest getPropertyPrimitiveValueUpdateRequest(URI targetURI, ODataProperty property); + ODataPropertyUpdateRequest getPropertyPrimitiveValueUpdateRequest(URI targetURI, ClientProperty property); /** * Gets an update request object instance. @@ -98,7 +99,7 @@ public interface CUDRequestFactory { * @return new ODataPropertyUpdateRequest instance. */ ODataPropertyUpdateRequest - getPropertyComplexValueUpdateRequest(URI targetURI, UpdateType type, ODataProperty property); + getPropertyComplexValueUpdateRequest(URI targetURI, UpdateType type, ClientProperty property); /** * Gets an update request object instance. @@ -109,7 +110,7 @@ public interface CUDRequestFactory { * @param property value to be update. * @return new ODataPropertyUpdateRequest instance. */ - ODataPropertyUpdateRequest getPropertyCollectionValueUpdateRequest(URI targetURI, ODataProperty property); + ODataPropertyUpdateRequest getPropertyCollectionValueUpdateRequest(URI targetURI, ClientProperty property); /** * Gets a delete request object instance. @@ -131,7 +132,7 @@ public interface CUDRequestFactory { * @param media entity blob to be created. * @return new ODataMediaEntityCreateRequest instance. */ - <E extends ODataEntity> ODataMediaEntityCreateRequest<E> getMediaEntityCreateRequest( + <E extends ClientEntity> ODataMediaEntityCreateRequest<E> getMediaEntityCreateRequest( URI targetURI, InputStream media); /** @@ -155,14 +156,14 @@ public interface CUDRequestFactory { * @param media entity blob to be updated. * @return new ODataMediaEntityUpdateRequest instance. */ - <E extends ODataEntity> ODataMediaEntityUpdateRequest<E> getMediaEntityUpdateRequest( + <E extends ClientEntity> ODataMediaEntityUpdateRequest<E> getMediaEntityUpdateRequest( URI editURI, InputStream media); - ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest( - URI targetURI, UpdateType type, ODataSingleton changes); + ODataEntityUpdateRequest<ClientSingleton> getSingletonUpdateRequest( + URI targetURI, UpdateType type, ClientSingleton changes); - ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest( - UpdateType type, ODataSingleton entity); + ODataEntityUpdateRequest<ClientSingleton> getSingletonUpdateRequest( + UpdateType type, ClientSingleton entity); /** * A successful POST request to a navigation property's references collection adds a relationship to an existing http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java index 54999cc..3799357 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java @@ -21,14 +21,14 @@ package org.apache.olingo.client.api.communication.request.cud; import org.apache.olingo.client.api.communication.request.ODataBasicRequest; import org.apache.olingo.client.api.communication.request.ODataBatchableRequest; import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This interface describes an OData create request. * * @param <E> concrete ODataEntity implementation */ -public interface ODataEntityCreateRequest<E extends ODataEntity> +public interface ODataEntityCreateRequest<E extends ClientEntity> extends ODataBasicRequest<ODataEntityCreateResponse<E>>, ODataBatchableRequest { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java index 2eca16d..fa51265 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java @@ -21,14 +21,14 @@ package org.apache.olingo.client.api.communication.request.cud; import org.apache.olingo.client.api.communication.request.ODataBasicRequest; import org.apache.olingo.client.api.communication.request.ODataBatchableRequest; import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This class implements an OData update request. * * @param <E> concrete ODataEntity implementation */ -public interface ODataEntityUpdateRequest<E extends ODataEntity> +public interface ODataEntityUpdateRequest<E extends ClientEntity> extends ODataBasicRequest<ODataEntityUpdateResponse<E>>, ODataBatchableRequest { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java new file mode 100644 index 0000000..948570a --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.olingo.client.api.communication.request.invoke; + +import org.apache.olingo.commons.api.domain.ClientInvokeResult; + +/** + * Marker class for invoke with no return type. + */ +public class ClientNoContent implements ClientInvokeResult { +//No additional methods needed for now. +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java index 8ffec0c..cf993f2 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java @@ -21,8 +21,8 @@ package org.apache.olingo.client.api.communication.request.invoke; import java.net.URI; import java.util.Map; -import org.apache.olingo.commons.api.domain.ODataInvokeResult; -import org.apache.olingo.commons.api.domain.ODataValue; +import org.apache.olingo.commons.api.domain.ClientInvokeResult; +import org.apache.olingo.commons.api.domain.ClientValue; import org.apache.olingo.commons.api.edm.FullQualifiedName; public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { @@ -34,7 +34,7 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param functionImportName operation to be invoked * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getFunctionImportInvokeRequest( + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getFunctionImportInvokeRequest( String functionImportName); /** @@ -45,8 +45,8 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param parameters parameters to pass to operation import invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getFunctionImportInvokeRequest( - String functionImportName, Map<String, ODataValue> parameters); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getFunctionImportInvokeRequest( + String functionImportName, Map<String, ClientValue> parameters); /** * Gets an invoke request instance for the action import with the given name. @@ -55,7 +55,7 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param actionImportName operation to be invoked * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getActionImportInvokeRequest( + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getActionImportInvokeRequest( String actionImportName); /** @@ -66,8 +66,8 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param parameters parameters to pass to operation import invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getActionImportInvokeRequest( - String actionImportName, Map<String, ODataValue> parameters); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getActionImportInvokeRequest( + String actionImportName, Map<String, ClientValue> parameters); /** * Gets an invoke request instance for the function bound to given URI (no parameters). @@ -79,7 +79,7 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param isBindingParameterCollection whether binding parameter is collection * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getBoundFunctionInvokeRequest( + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getBoundFunctionInvokeRequest( URI bindingParameterURI, FullQualifiedName functionName, FullQualifiedName bindingParameterTypeName, Boolean isBindingParameterCollection); @@ -94,9 +94,9 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param parameters parameters to pass to function invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getBoundFunctionInvokeRequest( + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getBoundFunctionInvokeRequest( URI bindingParameterURI, FullQualifiedName functionName, FullQualifiedName bindingParameterTypeName, - Boolean isBindingParameterCollection, Map<String, ODataValue> parameters); + Boolean isBindingParameterCollection, Map<String, ClientValue> parameters); /** * Gets an invoke request instance for the action bound to given URI (no parameters). @@ -108,7 +108,7 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param isBindingParameterCollection whether binding parameter is collection * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getBoundActionInvokeRequest( + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getBoundActionInvokeRequest( URI bindingParameterURI, FullQualifiedName actionName, FullQualifiedName bindingParameterTypeName, Boolean isBindingParameterCollection); @@ -123,8 +123,8 @@ public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory { * @param parameters parameters to pass to function invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getBoundActionInvokeRequest( + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getBoundActionInvokeRequest( URI bindingParameterURI, FullQualifiedName actionName, FullQualifiedName bindingParameterTypeName, - Boolean isBindingParameterCollection, Map<String, ODataValue> parameters); + Boolean isBindingParameterCollection, Map<String, ClientValue> parameters); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java index 71c499d..247042f 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java @@ -21,8 +21,8 @@ package org.apache.olingo.client.api.communication.request.invoke; import java.net.URI; import java.util.Map; -import org.apache.olingo.commons.api.domain.ODataInvokeResult; -import org.apache.olingo.commons.api.domain.ODataValue; +import org.apache.olingo.commons.api.domain.ClientInvokeResult; +import org.apache.olingo.commons.api.domain.ClientValue; import org.apache.olingo.commons.api.http.HttpMethod; /** @@ -43,8 +43,8 @@ public interface InvokeRequestFactory { * @param parameters parameters to pass to function invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest( - HttpMethod method, URI uri, Class<RES> resultRef, Map<String, ODataValue> parameters); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getInvokeRequest( + HttpMethod method, URI uri, Class<RES> resultRef, Map<String, ClientValue> parameters); /** * Gets an invoke request instance for the function bound to given URI (no parameters). @@ -54,7 +54,7 @@ public interface InvokeRequestFactory { * @param resultRef reference Class for result * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getFunctionInvokeRequest(URI uri, Class<RES> resultRef); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getFunctionInvokeRequest(URI uri, Class<RES> resultRef); /** * Gets an invoke request instance for the function bound to given URI (with parameters). @@ -65,8 +65,8 @@ public interface InvokeRequestFactory { * @param parameters parameters to pass to function invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getFunctionInvokeRequest( - URI uri, Class<RES> resultRef, Map<String, ODataValue> parameters); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getFunctionInvokeRequest( + URI uri, Class<RES> resultRef, Map<String, ClientValue> parameters); /** * Gets an invoke request instance for the action bound to given URI (no parameters). @@ -76,7 +76,7 @@ public interface InvokeRequestFactory { * @param resultRef reference Class for result * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getActionInvokeRequest(URI uri, Class<RES> resultRef); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getActionInvokeRequest(URI uri, Class<RES> resultRef); /** * Gets an invoke request instance for the action bound to given URI (with parameters). @@ -87,6 +87,6 @@ public interface InvokeRequestFactory { * @param parameters parameters to pass to action invocation * @return new {@link ODataInvokeRequest} instance. */ - <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getActionInvokeRequest( - URI uri, Class<RES> resultRef, Map<String, ODataValue> parameters); + <RES extends ClientInvokeResult> ODataInvokeRequest<RES> getActionInvokeRequest( + URI uri, Class<RES> resultRef, Map<String, ClientValue> parameters); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java index 696ff23..3ff05bb 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java @@ -22,15 +22,15 @@ import java.util.Map; import org.apache.olingo.client.api.communication.request.ODataBasicRequest; import org.apache.olingo.client.api.communication.response.ODataInvokeResponse; -import org.apache.olingo.commons.api.domain.ODataInvokeResult; -import org.apache.olingo.commons.api.domain.ODataValue; +import org.apache.olingo.commons.api.domain.ClientInvokeResult; +import org.apache.olingo.commons.api.domain.ClientValue; /** * This class implements an OData invoke operation request. * * @param <T> the actual invoke result */ -public interface ODataInvokeRequest<T extends ODataInvokeResult> +public interface ODataInvokeRequest<T extends ClientInvokeResult> extends ODataBasicRequest<ODataInvokeResponse<T>> { /** @@ -38,5 +38,5 @@ public interface ODataInvokeRequest<T extends ODataInvokeResult> * * @param parameters operation parameters. */ - void setParameters(Map<String, ODataValue> parameters); + void setParameters(Map<String, ClientValue> parameters); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java deleted file mode 100644 index a01d822..0000000 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.olingo.client.api.communication.request.invoke; - -import org.apache.olingo.commons.api.domain.ODataInvokeResult; - -/** - * Marker class for invoke with no return type. - */ -public class ODataNoContent implements ODataInvokeResult { -//No additional methods needed for now. -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java index e1631a2..ea028d3 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java @@ -18,11 +18,11 @@ */ package org.apache.olingo.client.api.communication.request.retrieve; -import org.apache.olingo.commons.api.domain.ODataDelta; +import org.apache.olingo.commons.api.domain.ClientDelta; /** * Describes an OData retrieve request returning a delta object. */ -public interface ODataDeltaRequest extends ODataRetrieveRequest<ODataDelta> { +public interface ODataDeltaRequest extends ODataRetrieveRequest<ClientDelta> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java index bb67ce2..c96e417 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java @@ -18,11 +18,11 @@ */ package org.apache.olingo.client.api.communication.request.retrieve; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * Describes an OData retrieve query request returning a single entity. */ -public interface ODataEntityRequest<E extends ODataEntity> extends ODataRetrieveRequest<E> { +public interface ODataEntityRequest<E extends ClientEntity> extends ODataRetrieveRequest<E> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java index 2f0c393..a00525b 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java @@ -19,13 +19,13 @@ package org.apache.olingo.client.api.communication.request.retrieve; import org.apache.olingo.client.api.domain.ODataEntitySetIterator; -import org.apache.olingo.commons.api.domain.ODataEntity; -import org.apache.olingo.commons.api.domain.ODataEntitySet; +import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.commons.api.domain.ClientEntitySet; /** * This class implements an OData EntitySet query request. */ -public interface ODataEntitySetIteratorRequest<ES extends ODataEntitySet, E extends ODataEntity> +public interface ODataEntitySetIteratorRequest<ES extends ClientEntitySet, E extends ClientEntity> extends ODataRetrieveRequest<ODataEntitySetIterator<ES, E>> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java index e78af01..31accd5 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java @@ -18,13 +18,13 @@ */ package org.apache.olingo.client.api.communication.request.retrieve; -import org.apache.olingo.commons.api.domain.ODataEntitySet; +import org.apache.olingo.commons.api.domain.ClientEntitySet; /** * This interface describes an OData EntitySet query request. * * @param <ES> concrete ODataEntitySet implementation */ -public interface ODataEntitySetRequest<ES extends ODataEntitySet> extends ODataRetrieveRequest<ES> { +public interface ODataEntitySetRequest<ES extends ClientEntitySet> extends ODataRetrieveRequest<ES> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java index 567ae93..fd02f03 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java @@ -18,11 +18,11 @@ */ package org.apache.olingo.client.api.communication.request.retrieve; -import org.apache.olingo.commons.api.domain.ODataProperty; +import org.apache.olingo.commons.api.domain.ClientProperty; /** * This class implements an OData entity property query request. */ -public interface ODataPropertyRequest<T extends ODataProperty> extends ODataRetrieveRequest<T> { +public interface ODataPropertyRequest<T extends ClientProperty> extends ODataRetrieveRequest<T> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java index 96858a8..44d04f9 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java @@ -18,11 +18,11 @@ */ package org.apache.olingo.client.api.communication.request.retrieve; -import org.apache.olingo.commons.api.domain.ODataServiceDocument; +import org.apache.olingo.commons.api.domain.ClientServiceDocument; /** * This class implements an OData service document request. */ -public interface ODataServiceDocumentRequest extends ODataRetrieveRequest<ODataServiceDocument> { +public interface ODataServiceDocumentRequest extends ODataRetrieveRequest<ClientServiceDocument> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java index 9324b8f..2b24591 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java @@ -18,11 +18,11 @@ */ package org.apache.olingo.client.api.communication.request.retrieve; -import org.apache.olingo.commons.api.domain.ODataPrimitiveValue; +import org.apache.olingo.commons.api.domain.ClientPrimitiveValue; /** * This class implements an OData entity property value query request. */ -public interface ODataValueRequest extends ODataRetrieveRequest<ODataPrimitiveValue> { +public interface ODataValueRequest extends ODataRetrieveRequest<ClientPrimitiveValue> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java index 4d0db79..04c5dfb 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java @@ -20,10 +20,10 @@ package org.apache.olingo.client.api.communication.request.retrieve; import java.net.URI; -import org.apache.olingo.commons.api.domain.ODataEntity; -import org.apache.olingo.commons.api.domain.ODataEntitySet; -import org.apache.olingo.commons.api.domain.ODataProperty; -import org.apache.olingo.commons.api.domain.ODataSingleton; +import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.commons.api.domain.ClientEntitySet; +import org.apache.olingo.commons.api.domain.ClientProperty; +import org.apache.olingo.commons.api.domain.ClientSingleton; public interface RetrieveRequestFactory { @@ -63,7 +63,7 @@ public interface RetrieveRequestFactory { * @param uri request URI. * @return new {@link ODataEntitySetRequest} instance. */ - ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(URI uri); + ODataEntitySetRequest<ClientEntitySet> getEntitySetRequest(URI uri); /** * Gets a uri request returning a set of one or more OData entities. @@ -74,7 +74,7 @@ public interface RetrieveRequestFactory { * @param uri request URI. * @return new {@link ODataEntitySetIteratorRequest} instance. */ - ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(URI uri); + ODataEntitySetIteratorRequest<ClientEntitySet, ClientEntity> getEntitySetIteratorRequest(URI uri); /** * Gets a uri request returning a single OData entity. @@ -82,7 +82,7 @@ public interface RetrieveRequestFactory { * @param uri request URI. * @return new {@link ODataEntityRequest} instance. */ - ODataEntityRequest<ODataEntity> getEntityRequest(URI uri); + ODataEntityRequest<ClientEntity> getEntityRequest(URI uri); /** * Gets a uri request returning a single OData entity property. @@ -90,7 +90,7 @@ public interface RetrieveRequestFactory { * @param uri request URI. * @return new {@link ODataPropertyRequest} instance. */ - ODataPropertyRequest<ODataProperty> getPropertyRequest(URI uri); + ODataPropertyRequest<ClientProperty> getPropertyRequest(URI uri); /** * Gets a uri request returning a single OData entity property value. @@ -132,7 +132,7 @@ public interface RetrieveRequestFactory { */ ODataRawRequest getRawRequest(URI uri); - ODataEntityRequest<ODataSingleton> getSingletonRequest(URI uri); + ODataEntityRequest<ClientSingleton> getSingletonRequest(URI uri); ODataDeltaRequest getDeltaRequest(URI uri); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java index eb72494..1ef2493 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java @@ -20,14 +20,14 @@ package org.apache.olingo.client.api.communication.request.streamed; import org.apache.olingo.client.api.communication.request.ODataPayloadManager; import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * Media entity payload object. * * @param <E> concrete ODataEntity implementation */ -public interface MediaEntityCreateStreamManager<E extends ODataEntity> +public interface MediaEntityCreateStreamManager<E extends ClientEntity> extends ODataPayloadManager<ODataMediaEntityCreateResponse<E>> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java index 2619ea9..cf4bdd0 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java @@ -20,14 +20,14 @@ package org.apache.olingo.client.api.communication.request.streamed; import org.apache.olingo.client.api.communication.request.ODataPayloadManager; import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * Media entity payload object. * * @param <E> concrete ODataEntity implementation */ -public interface MediaEntityUpdateStreamManager<E extends ODataEntity> +public interface MediaEntityUpdateStreamManager<E extends ClientEntity> extends ODataPayloadManager<ODataMediaEntityUpdateResponse<E>> { //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java index 8adc8f0..93570e5 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java @@ -20,14 +20,14 @@ package org.apache.olingo.client.api.communication.request.streamed; import org.apache.olingo.client.api.communication.request.ODataBatchableRequest; import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory. * * @param <E> concrete ODataEntity implementation */ -public interface ODataMediaEntityCreateRequest<E extends ODataEntity> +public interface ODataMediaEntityCreateRequest<E extends ClientEntity> extends ODataStreamedEntityRequest<ODataMediaEntityCreateResponse<E>, MediaEntityCreateStreamManager<E>>, ODataBatchableRequest{ //No additional methods needed for now. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java index 3d4161d..e50620c 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java @@ -20,14 +20,14 @@ package org.apache.olingo.client.api.communication.request.streamed; import org.apache.olingo.client.api.communication.request.ODataBatchableRequest; import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory. * * @param <E> concrete ODataEntity implementation */ -public interface ODataMediaEntityUpdateRequest<E extends ODataEntity> +public interface ODataMediaEntityUpdateRequest<E extends ClientEntity> extends ODataStreamedEntityRequest<ODataMediaEntityUpdateResponse<E>, MediaEntityUpdateStreamManager<E>>, ODataBatchableRequest { //No additional methods needed for now. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java index c90a25c..5816e71 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java @@ -18,7 +18,7 @@ */ package org.apache.olingo.client.api.communication.response; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This interface describes the response to an OData entity create request. @@ -26,7 +26,7 @@ import org.apache.olingo.commons.api.domain.ODataEntity; * @param <E> concrete ODataEntity implementation * @see org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest */ -public interface ODataEntityCreateResponse<E extends ODataEntity> extends ODataResponse { +public interface ODataEntityCreateResponse<E extends ClientEntity> extends ODataResponse { /** * Gets created object. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java index 2f999bc..1f7f86d 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java @@ -18,7 +18,7 @@ */ package org.apache.olingo.client.api.communication.response; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This class implements the response to an OData update request. @@ -26,7 +26,7 @@ import org.apache.olingo.commons.api.domain.ODataEntity; * @param <E> concrete ODataEntity implementation * @see org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest */ -public interface ODataEntityUpdateResponse<E extends ODataEntity> extends ODataResponse { +public interface ODataEntityUpdateResponse<E extends ClientEntity> extends ODataResponse { /** * Gets updated object. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java index 9d73d11..96ae840 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java @@ -18,14 +18,14 @@ */ package org.apache.olingo.client.api.communication.response; -import org.apache.olingo.commons.api.domain.ODataInvokeResult; +import org.apache.olingo.commons.api.domain.ClientInvokeResult; /** * This class implements a response to a specific invoke request. * * @param <T> the actual invoke result */ -public interface ODataInvokeResponse<T extends ODataInvokeResult> extends ODataResponse { +public interface ODataInvokeResponse<T extends ClientInvokeResult> extends ODataResponse { /** * Gets operation return value if exists. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java index fde5192..2b5141d 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java @@ -18,14 +18,14 @@ */ package org.apache.olingo.client.api.communication.response; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This class implements the response to an OData media entity create request. * * @param <E> concrete ODataEntity implementation */ -public interface ODataMediaEntityCreateResponse<E extends ODataEntity> extends ODataResponse { +public interface ODataMediaEntityCreateResponse<E extends ClientEntity> extends ODataResponse { /** * Gets created object. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/c37d4da5/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java index b267507..a22eebd 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java @@ -18,14 +18,14 @@ */ package org.apache.olingo.client.api.communication.response; -import org.apache.olingo.commons.api.domain.ODataEntity; +import org.apache.olingo.commons.api.domain.ClientEntity; /** * This class implements the response to an Odata media entity update request. * * @param <E> concrete ODataEntity implementation */ -public interface ODataMediaEntityUpdateResponse<E extends ODataEntity> extends ODataResponse { +public interface ODataMediaEntityUpdateResponse<E extends ClientEntity> extends ODataResponse { /** * Gets updated object.
