olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject [04/15] [OLINGO-366, OLINGO-367, OLINGO-370] chahnged entity, entity collection and complex creation methods (still missing complex collection creator). Provided delayed HTTP request for navigation property. Provided select query option support on entity s
Date Fri, 18 Jul 2014 16:07:43 GMT
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/BoundOperationInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/BoundOperationInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/BoundOperationInvokeTestITCase.java
index e95ff26..9adae12 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/BoundOperationInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/BoundOperationInvokeTestITCase.java
@@ -1,45 +1,42 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountInfo;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .PaymentInstrument;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .ProductDetailCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .ProductDetailKey;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailKey;
 import org.junit.Test;
 
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.Collections;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.HomeAddress;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-
-//CHECKSTYLE:OFF (Maven checkstyle)
 //CHECKSTYLE:ON (Maven checkstyle)
 
 public class BoundOperationInvokeTestITCase extends AbstractTestITCase {
@@ -91,22 +88,20 @@ public class BoundOperationInvokeTestITCase extends AbstractTestITCase {
 
   @Test
   public void addAccessRight() {
-    final AccessLevel accessLevel = 
+    final AccessLevel accessLevel =
             container.getProducts().getByKey(5).operations().addAccessRight(AccessLevel.Execute);
     assertNotNull(accessLevel);
   }
 
   @Test
   public void resetAddress() {
-    final Customer customer = container.getCustomers().getByKey(2);
-
-    final Address address = customer.factory().newHomeAddress();
+    final Address address = service.newComplex(HomeAddress.class);
     address.setStreet("Via Le Mani Dal Naso, 123");
     address.setPostalCode("Tollo");
     address.setCity("66010");
 
     final Person person = container.getCustomers().getByKey(2).operations().
-        resetAddress(Collections.singletonList(address), 0);
+            resetAddress(Collections.singletonList(address), 0);
     assertEquals(2, person.getPersonID(), 0);
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java
index 9f67ccb..c6920b0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java
@@ -1,31 +1,31 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyAddress;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditCardPI;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .CreditCardPICollection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditCardPICollection;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .CustomerCollection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CustomerCollection;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
 import org.junit.Test;
 
@@ -36,8 +36,6 @@ import java.util.Collections;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-
-//CHECKSTYLE:OFF (Maven checkstyle)
 //CHECKSTYLE:ON (Maven checkstyle)
 
 public class DerivedTypeTestITCase extends AbstractTestITCase {
@@ -52,7 +50,7 @@ public class DerivedTypeTestITCase extends AbstractTestITCase {
     }
 
     final CreditCardPICollection creditCards = container.getAccounts().getByKey(101).
-        getMyPaymentInstruments().execute(CreditCardPICollection.class);
+            getMyPaymentInstruments().execute(CreditCardPICollection.class);
     assertNotNull(creditCards);
     for (CreditCardPI creditCard : creditCards) {
       assertTrue(creditCard instanceof CreditCardPI);
@@ -61,19 +59,19 @@ public class DerivedTypeTestITCase extends AbstractTestITCase {
 
   @Test
   public void createDelete() {
-    final Customer customer = container.getPeople().newCustomer();
+    final Customer customer = service.newEntity(Customer.class);
     customer.setPersonID(976);
     customer.setFirstName("Test");
     customer.setLastName("Test");
 
-    final Address homeAddress = container.complexFactory().newCompanyAddress();
+    final Address homeAddress = service.newComplex(CompanyAddress.class);
     homeAddress.setStreet("V.le Gabriele D'Annunzio");
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65127");
     customer.setHomeAddress(homeAddress);
 
-    customer.setNumbers(Collections.<String> emptyList());
-    customer.setEmails(Collections.<String> emptyList());
+    customer.setNumbers(Collections.<String>emptyList());
+    customer.setEmails(Collections.<String>emptyList());
     customer.setCity("Pescara");
 
     final Calendar birthday = Calendar.getInstance();
@@ -83,6 +81,7 @@ public class DerivedTypeTestITCase extends AbstractTestITCase {
 
     customer.setTimeBetweenLastTwoOrders(BigDecimal.valueOf(0.0000002));
 
+    container.getPeople().add(customer);
     container.flush();
 
     final Person actual = container.getPeople().getByKey(976, Customer.class).load();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
index 0df5dd9..66a015b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
@@ -1,23 +1,24 @@
-/*
+/* 
  * 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.
  */
 package org.apache.olingo.fit.proxy.v4;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.commons.lang3.RandomUtils;
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
 import org.apache.olingo.ext.proxy.Service;
@@ -27,18 +28,16 @@ import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.service
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Employee;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.HomeAddress;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .PaymentInstrument;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .PaymentInstrumentCollection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrumentCollection;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetail;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .ProductDetailCollection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection;
 import org.junit.Test;
 
 import java.math.BigDecimal;
@@ -52,8 +51,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-
-//CHECKSTYLE:OFF (Maven checkstyle)
 //CHECKSTYLE:ON (Maven checkstyle)
 
 /**
@@ -61,8 +58,8 @@ import static org.junit.Assert.fail;
  */
 public class EntityCreateTestITCase extends AbstractTestITCase {
 
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
-    return containerFactory;
+  protected Service<EdmEnabledODataClient> getService() {
+    return service;
   }
 
   protected InMemoryEntities getContainer() {
@@ -71,14 +68,14 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
 
   @Test
   public void createAndDelete() {
-    createPatchAndDeleteOrder(getContainer(), getContainerFactory());
+    createPatchAndDeleteOrder(getContainer(), getService());
   }
 
   @Test
   public void createEmployee() {
     final Integer id = 101;
 
-    final Employee employee = getContainer().getPeople().newEmployee();
+    final Employee employee = getService().newEntity(Employee.class);
     employee.setPersonID(id);
     employee.setFirstName("Fabio");
     employee.setLastName("Martelli");
@@ -87,13 +84,15 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     date.clear();
     date.set(2011, 3, 4, 9, 0, 0);
     employee.setDateHired(new Timestamp(date.getTimeInMillis()));
-    final Address homeAddress = employee.factory().newHomeAddress();
+    final Address homeAddress = getService().newComplex(HomeAddress.class);
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65100");
     homeAddress.setStreet("viale Gabriele D'Annunzio 256");
     employee.setHomeAddress(homeAddress);
     employee.setNumbers(Arrays.asList(new String[] {"3204725072", "08569930"}));
 
+    getContainer().getPeople().add(employee);
+
     getContainer().flush();
 
     Employee actual = getContainer().getPeople().getByKey(id, Employee.class).load();
@@ -101,7 +100,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     assertEquals(id, actual.getPersonID());
     assertEquals(homeAddress.getCity(), actual.getHomeAddress().getCity());
 
-    getContainerFactory().getContext().detachAll();
+    getService().getContext().detachAll();
     actual = getContainer().getPeople().getByKey(id, Employee.class).load();
     assertNotNull(actual);
     assertEquals(id, actual.getPersonID());
@@ -116,7 +115,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     } catch (IllegalArgumentException e) {
     }
 
-    getContainerFactory().getContext().detachAll();
+    getService().getContext().detachAll();
     try {
       getContainer().getPeople().getByKey(id, Employee.class).load();
       fail();
@@ -128,24 +127,25 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
   public void createWithNavigation() {
     final Integer id = 101;
 
-    final Customer customer = getContainer().getCustomers().newCustomer();
+    final Customer customer = getService().newEntity(Customer.class);
     customer.setPersonID(id);
     customer.setPersonID(id);
     customer.setFirstName("Fabio");
     customer.setLastName("Martelli");
     customer.setCity("Pescara");
     customer.setEmails(Collections.<String>singleton("fabio.martelli@tirasa.net"));
-    Address homeAddress = customer.factory().newHomeAddress();
+    Address homeAddress = getService().newComplex(HomeAddress.class);
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65100");
     homeAddress.setStreet("viale Gabriele D'Annunzio 256");
     customer.setHomeAddress(homeAddress);
     customer.setNumbers(Arrays.asList(new String[] {"3204725072", "08569930"}));
 
-    final OrderCollection orders = getContainer().getOrders().newOrderCollection();
+    final OrderCollection orders = getService().newEntityCollection(OrderCollection.class);
     orders.add(getContainer().getOrders().getByKey(8));
     customer.setOrders(orders);
 
+    getContainer().getCustomers().add(customer);
     getContainer().flush();
 
     Customer actual = readCustomer(getContainer(), id);
@@ -170,7 +170,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     // -------------------------------
     // Create a new order
     // -------------------------------
-    Order order = getContainer().getOrders().newOrder();
+    Order order = getService().newEntity(Order.class);
     order.setOrderID(id);
 
     final Calendar orderDate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
@@ -185,21 +185,21 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     // -------------------------------
     // Create a new customer
     // -------------------------------
-    final Customer customer = getContainer().getCustomers().newCustomer();
+    final Customer customer = getService().newEntity(Customer.class);
     customer.setPersonID(id);
     customer.setPersonID(id);
     customer.setFirstName("Fabio");
     customer.setLastName("Martelli");
     customer.setCity("Pescara");
     customer.setEmails(Collections.<String>singleton("fabio.martelli@tirasa.net"));
-    final Address homeAddress = customer.factory().newHomeAddress();
+    final Address homeAddress = getService().newComplex(HomeAddress.class);
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65100");
     homeAddress.setStreet("viale Gabriele D'Annunzio 256");
     customer.setHomeAddress(homeAddress);
     customer.setNumbers(Arrays.asList(new String[] {"3204725072", "08569930"}));
 
-    final OrderCollection orders = getContainer().getOrders().newOrderCollection();
+    final OrderCollection orders = getService().newEntityCollection(OrderCollection.class);
     orders.add(order);
     customer.setOrders(orders);
     // -------------------------------
@@ -210,6 +210,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     order.setCustomerForOrder(customer);
     // -------------------------------
 
+    getContainer().getOrders().add(order);
     getContainer().flush();
 
     assertEquals(id, order.getOrderID());
@@ -222,7 +223,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
 
     order = getContainer().getOrders().getByKey(id);
     assertNotNull(order);
-    assertEquals(id, order.getCustomerForOrder().getPersonID());
+    assertEquals(id, order.getCustomerForOrder().load().getPersonID());
 
     getContainer().getOrders().delete(actual.getOrders());
     getContainer().flush();
@@ -248,12 +249,13 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
 
   @Test
   public void multiKey() {
-    OrderDetail details = getContainer().getOrderDetails().newOrderDetail();
+    OrderDetail details = getService().newEntity(OrderDetail.class);
     details.setOrderID(8);
     details.setProductID(1);
     details.setQuantity(100);
     details.setUnitPrice(5f);
 
+    getContainer().getOrderDetails().add(details);
     getContainer().flush();
 
     OrderDetailKey key = new OrderDetailKey();
@@ -279,7 +281,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
 
   @Test
   public void deepInsert() {
-    Product product = getContainer().getProducts().newProduct();
+    Product product = getService().newEntity(Product.class);
     product.setProductID(12);
     product.setName("Latte");
     product.setQuantityPerUnit("100g Bag");
@@ -290,17 +292,18 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     product.setSkinColor(Color.Blue);
     product.setCoverColors(Arrays.asList(new Color[] {Color.Red, Color.Green}));
 
-    final ProductDetail detail = getContainer().getProductDetails().newProductDetail();
+    final ProductDetail detail = getService().newEntity(ProductDetail.class);
     detail.setProductID(product.getProductID());
     detail.setProductDetailID(12);
     detail.setProductName("LatteHQ");
     detail.setDescription("High-Quality Milk");
 
-    final ProductDetailCollection detailCollection = getContainer().getProductDetails().newProductDetailCollection();
+    final ProductDetailCollection detailCollection = getService().newEntityCollection(ProductDetailCollection.class);
     detailCollection.add(detail);
 
     product.setDetails(detailCollection);
 
+    getContainer().getProducts().add(product);
     getContainer().flush();
 
     product = getContainer().getProducts().getByKey(12).load();
@@ -310,12 +313,12 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
 
   @Test
   public void contained() {
-    PaymentInstrumentCollection instruments = 
+    PaymentInstrumentCollection instruments =
             getContainer().getAccounts().getByKey(101).getMyPaymentInstruments().execute();
     final int sizeBefore = instruments.size();
 
-    final PaymentInstrument instrument = getContainer().getAccounts().getByKey(101).
-            getMyPaymentInstruments().newPaymentInstrument();
+    final PaymentInstrument instrument = getService().newEntity(PaymentInstrument.class);
+    instruments.add(instrument);
 
     final int id = RandomUtils.nextInt(101999, 105000);
     instrument.setPaymentInstrumentID(id);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java
index 3b9c41d..db8e73a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.commons.lang3.StringUtils;
@@ -127,7 +128,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
   public void withInlineEntry() {
     final Customer customer = readCustomer(getContainer(), 1);
     final Company company = customer.getCompany();
-    assertEquals(0, company.getCompanyID(), 0);
+    assertEquals(0, company.load().getCompanyID(), 0);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntitySetTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntitySetTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntitySetTestITCase.java
index 3bb30c3..af8a461 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntitySetTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntitySetTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
index b320172..9bbc58f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
@@ -1,23 +1,24 @@
-/*
+/* 
  * 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.
  */
 package org.apache.olingo.fit.proxy.v4;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
@@ -30,8 +31,7 @@ import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.service
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .PaymentInstrument;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
 import org.junit.Test;
 
@@ -41,12 +41,11 @@ import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.Collections;
 import java.util.UUID;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyAddress;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-
-//CHECKSTYLE:OFF (Maven checkstyle)
 //CHECKSTYLE:ON (Maven checkstyle)
 
 /**
@@ -54,8 +53,8 @@ import static org.junit.Assert.assertTrue;
  */
 public class EntityUpdateTestITCase extends AbstractTestITCase {
 
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
-    return containerFactory;
+  protected Service<EdmEnabledODataClient> getService() {
+    return service;
   }
 
   protected InMemoryEntities getContainer() {
@@ -97,19 +96,19 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
   @Test
   public void patchLink() {
     // 1. create customer
-    Customer customer = getContainer().getCustomers().newCustomer();
+    Customer customer = getService().newEntity(Customer.class);
     customer.setPersonID(977);
     customer.setFirstName("Test");
     customer.setLastName("Test");
 
-    final Address homeAddress = getContainer().complexFactory().newCompanyAddress();
+    final Address homeAddress = getService().newComplex(CompanyAddress.class);
     homeAddress.setStreet("V.le Gabriele D'Annunzio");
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65127");
     customer.setHomeAddress(homeAddress);
 
-    customer.setNumbers(Collections.<String> emptyList());
-    customer.setEmails(Collections.<String> emptyList());
+    customer.setNumbers(Collections.<String>emptyList());
+    customer.setEmails(Collections.<String>emptyList());
     customer.setCity("Pescara");
 
     final Calendar birthday = Calendar.getInstance();
@@ -122,17 +121,24 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
     // 2. create order and set it to customer
     final int orderId = RandomUtils.nextInt(400, 410);
 
-    Order order = getContainer().getOrders().newOrder();
+    Order order = getService().newEntity(Order.class);
     order.setOrderID(orderId);
 
-    final OrderCollection orders = getContainer().getOrders().newOrderCollection();
+    final OrderCollection orders = getService().newEntityCollection(OrderCollection.class);
     orders.add(order);
 
     customer.setOrders(orders);
     order.setCustomerForOrder(customer);
 
+    getContainer().getCustomers().add(customer);
     getContainer().flush();
 
+    assertEquals(977, order.getCustomerForOrder().load().getPersonID(), 0);
+    // order.getCustomerForOrder().load() caches Customer ... test server doesn't support something like the following
+    // <service>/Orders(400)/CustomerForOrder/Orders
+    // detach all and check for stored data ..
+    getService().getContext().detachAll();
+
     // 3. check everything after flush
     order = getContainer().getOrders().getByKey(orderId).load();
     assertEquals(orderId, order.getOrderID(), 0);
@@ -148,7 +154,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
       }
     }
     assertEquals(1, count);
-    assertEquals(977, order.getCustomerForOrder().getPersonID(), 0);
+    assertEquals(977, order.getCustomerForOrder().load().getPersonID(), 0);
 
     // 4. delete customer and order
     getContainer().getCustomers().delete(977);
@@ -173,7 +179,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
 
   @Test
   public void contained() {
-    PaymentInstrument instrument = 
+    PaymentInstrument instrument =
             getContainer().getAccounts().getByKey(101).getMyPaymentInstruments().getByKey(101901);
 
     final String newName = UUID.randomUUID().toString();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
index c09de79..1c4c13a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/FilterTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.ext.proxy.api.Search;
@@ -44,7 +45,7 @@ public class FilterTestITCase extends AbstractTestITCase {
     final People people = container.getPeople();
 
     PersonCollection result =
-            people.filter(containerFactory.getClient().getFilterFactory().lt("PersonID", 3)).execute();
+            people.filter(service.getClient().getFilterFactory().lt("PersonID", 3)).execute();
 
     // 1. check that result looks as expected
     assertEquals(2, result.size());
@@ -77,9 +78,9 @@ public class FilterTestITCase extends AbstractTestITCase {
   @Test
   public void search() {
     final Search<Person, PersonCollection> search = container.getPeople().createSearch().setSearch(
-            containerFactory.getClient().getSearchFactory().or(
-            containerFactory.getClient().getSearchFactory().literal("Bob"),
-            containerFactory.getClient().getSearchFactory().literal("Jill")));
+            service.getClient().getSearchFactory().or(
+            service.getClient().getSearchFactory().literal("Bob"),
+            service.getClient().getSearchFactory().literal("Jill")));
 
     final PersonCollection result = search.getResult();
     assertFalse(result.isEmpty());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
index ae89ca6..e91fec0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
index 51f92fb..b98e0e5 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.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.
  */
@@ -46,7 +46,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
 
   private DemoService ime;
 
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
+  protected Service<EdmEnabledODataClient> getService() {
     if (ecf == null) {
       ecf = Service.getV4(testDemoServiceRootURL);
       ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
@@ -56,7 +56,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
 
   protected DemoService getContainer() {
     if (ime == null) {
-      ime = getContainerFactory().getEntityContainer(DemoService.class);
+      ime = getService().getEntityContainer(DemoService.class);
     }
     return ime;
   }
@@ -71,39 +71,38 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
     final InputStream is = adv.getStream();
     assertNotNull(is);
     IOUtils.closeQuietly(is);
+
+    getService().getContext().detachAll();
   }
 
   @Test
   public void update() throws IOException {
     final UUID uuid = UUID.fromString("f89dee73-af9f-4cd4-b330-db93c25ff3c7");
-
     final Advertisement adv = getContainer().getAdvertisements().getByKey(uuid).load();
-
     final String random = RandomStringUtils.random(124, "abcdefghijklmnopqrstuvwxyz");
-
     adv.setStream(IOUtils.toInputStream(random));
-
     getContainer().flush();
-
     assertEquals(random, IOUtils.toString(getContainer().getAdvertisements().getByKey(uuid).load().getStream()));
+    getService().getContext().detachAll();
   }
 
   @Test
   public void create() throws IOException {
     final String random = RandomStringUtils.random(124, "abcdefghijklmnopqrstuvwxyz");
 
-    final Advertisement adv = getContainer().getAdvertisements().newAdvertisement();
+    final Advertisement adv = getService().newEntity(Advertisement.class);
     adv.setStream(IOUtils.toInputStream(random));
     adv.setAirDate(new Timestamp(Calendar.getInstance().getTimeInMillis()));
 
+    getContainer().getAdvertisements().add(adv);
     getContainer().flush();
 
     final UUID uuid = adv.getID();
-    getContainerFactory().getContext().detachAll();
+    getService().getContext().detachAll();
 
     assertEquals(random, IOUtils.toString(getContainer().getAdvertisements().getByKey(uuid).load().getStream()));
 
-    getContainerFactory().getContext().detachAll();
+    getService().getContext().detachAll();
 
     getContainer().getAdvertisements().delete(uuid);
     getContainer().flush();
@@ -113,5 +112,6 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
       fail();
     } catch (IllegalArgumentException e) {
     }
+    getService().getContext().detachAll();
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
index 65c53ae..12ad8a9 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
@@ -31,7 +32,7 @@ public class NonTransactionalAuthEntityCreateTestITCase extends EntityCreateTest
   private InMemoryEntities ime;
 
   @Override
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
+  protected Service<EdmEnabledODataClient> getService() {
     if (ecf == null) {
       ecf = Service.getV4(testAuthServiceRootURL, false);
       ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
@@ -44,7 +45,7 @@ public class NonTransactionalAuthEntityCreateTestITCase extends EntityCreateTest
   @Override
   protected InMemoryEntities getContainer() {
     if (ime == null) {
-      ime = getContainerFactory().getEntityContainer(InMemoryEntities.class);
+      ime = getService().getEntityContainer(InMemoryEntities.class);
     }
     return ime;
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
index 091adef..3c89f2c 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
@@ -30,7 +31,7 @@ public class NonTransactionalEntityCreateTestITCase extends EntityCreateTestITCa
   private InMemoryEntities ime;
 
   @Override
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
+  protected Service<EdmEnabledODataClient> getService() {
     if (ecf == null) {
       ecf = Service.getV4(testStaticServiceRootURL, false);
       ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
@@ -41,7 +42,7 @@ public class NonTransactionalEntityCreateTestITCase extends EntityCreateTestITCa
   @Override
   protected InMemoryEntities getContainer() {
     if (ime == null) {
-      ime = getContainerFactory().getEntityContainer(InMemoryEntities.class);
+      ime = getService().getEntityContainer(InMemoryEntities.class);
     }
     return ime;
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
index e789f90..7f77aa8 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
@@ -30,7 +31,7 @@ public class NonTransactionalEntityUpdateTestITCase extends EntityUpdateTestITCa
   private InMemoryEntities ime;
 
   @Override
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
+  protected Service<EdmEnabledODataClient> getService() {
     if (ecf == null) {
       ecf = Service.getV4(testStaticServiceRootURL, false);
       ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
@@ -41,7 +42,7 @@ public class NonTransactionalEntityUpdateTestITCase extends EntityUpdateTestITCa
   @Override
   protected InMemoryEntities getContainer() {
     if (ime == null) {
-      ime = getContainerFactory().getEntityContainer(InMemoryEntities.class);
+      ime = getService().getEntityContainer(InMemoryEntities.class);
     }
     return ime;
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
index 4877633..6dd8592 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
@@ -30,7 +31,7 @@ public class NonTransactionalMediaEntityTestITCase extends MediaEntityTestITCase
   private DemoService ime;
 
   @Override
-  protected Service<EdmEnabledODataClient> getContainerFactory() {
+  protected Service<EdmEnabledODataClient> getService() {
     if (ecf == null) {
       ecf = Service.getV4(testDemoServiceRootURL, false);
       ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
@@ -41,7 +42,7 @@ public class NonTransactionalMediaEntityTestITCase extends MediaEntityTestITCase
   @Override
   protected DemoService getContainer() {
     if (ime == null) {
-      ime = getContainerFactory().getEntityContainer(DemoService.class);
+      ime = getService().getEntityContainer(DemoService.class);
     }
     return ime;
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
index 4172718..95c6106 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
@@ -37,6 +38,7 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.UUID;
+import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.IndexedRow;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -48,28 +50,28 @@ import static org.junit.Assert.fail;
  */
 public class OpenTypeTestITCase extends AbstractTestITCase {
 
-  private static Service<EdmEnabledODataClient> otcontainerFactory;
+  private static Service<EdmEnabledODataClient> otservice;
 
   private static DefaultContainer otcontainer;
 
   @BeforeClass
   public static void initContainer() {
-    otcontainerFactory = Service.getV4(testOpenTypeServiceRootURL);
-    otcontainerFactory.getClient().getConfiguration().
+    otservice = Service.getV4(testOpenTypeServiceRootURL);
+    otservice.getClient().getConfiguration().
             setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
-    otcontainer = otcontainerFactory.getEntityContainer(DefaultContainer.class);
+    otcontainer = otservice.getEntityContainer(DefaultContainer.class);
     assertNotNull(otcontainer);
   }
 
   @Test
   public void checkOpenTypeEntityTypesExist() {
-    assertTrue(otcontainer.getRow().newRow().getClass().getInterfaces()[0].
+    assertTrue(otservice.newEntity(Row.class).getClass().getInterfaces()[0].
             getAnnotation(EntityType.class).openType());
-    assertTrue(otcontainer.getRowIndex().newRowIndex().getClass().getInterfaces()[0].
+    assertTrue(otservice.newEntity(RowIndex.class).getClass().getInterfaces()[0].
             getAnnotation(EntityType.class).openType());
-    assertTrue(otcontainer.getRow().newIndexedRow().getClass().getInterfaces()[0].
+    assertTrue(otservice.newEntity(IndexedRow.class).getClass().getInterfaces()[0].
             getAnnotation(EntityType.class).openType());
-    otcontainerFactory.getContext().detachAll();
+    otservice.getContext().detachAll();
   }
 
   @Test
@@ -86,7 +88,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
   public void cud() throws ParseException {
     final Integer id = 1426;
 
-    RowIndex rowIndex = otcontainer.getRowIndex().newRowIndex();
+    RowIndex rowIndex = otservice.newEntity(RowIndex.class);
     rowIndex.setId(id);
     rowIndex.addAdditionalProperty("aString", "string");
     rowIndex.addAdditionalProperty("aBoolean", true);
@@ -94,7 +96,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     rowIndex.addAdditionalProperty("aByte", Byte.MAX_VALUE);
     rowIndex.addAdditionalProperty("aDate", Calendar.getInstance());
 
-    final ContactDetails contact = otcontainer.complexFactory().newContactDetails();
+    final ContactDetails contact = otservice.newComplex(ContactDetails.class);
     contact.setFirstContacted("text".getBytes());
 
     Calendar cal = Calendar.getInstance();
@@ -119,12 +121,13 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     rowIndex.addAdditionalProperty("aContact", contact);
     rowIndex.addAdditionalProperty("aColor", Color.Green);
 
-    final AccountInfo ai = otcontainer.complexFactory().newAccountInfo();
+    final AccountInfo ai = otservice.newComplex(AccountInfo.class);
     ai.setFirstName("Fabio");
     ai.setLastName("Martelli");
     ai.addAdditionalProperty("email", "fabio.martelli@tirasa.net");
     rowIndex.addAdditionalProperty("info", ai);
 
+    otcontainer.getRowIndex().add(rowIndex);
     otcontainer.flush();
 
     rowIndex = otcontainer.getRowIndex().getByKey(id).load();
@@ -142,7 +145,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     assertEquals("fabio.martelli@tirasa.net", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).
             getAdditionalProperty("email"));
 
-    otcontainerFactory.getContext().detachAll();
+    otservice.getContext().detachAll();
 
     otcontainer.getRowIndex().delete(id);
     otcontainer.flush();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OperationImportInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OperationImportInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OperationImportInvokeTestITCase.java
index 4574dc8..a188017 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OperationImportInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OperationImportInvokeTestITCase.java
@@ -1,38 +1,38 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types
-    .ProductCollection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection;
 import org.junit.Test;
 
 import java.util.Arrays;
 import java.util.Collection;
+import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.HomeAddress;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-
-//CHECKSTYLE:OFF (Maven checkstyle)
 //CHECKSTYLE:ON (Maven checkstyle)
 
 public class OperationImportInvokeTestITCase extends AbstractTestITCase {
@@ -51,7 +51,7 @@ public class OperationImportInvokeTestITCase extends AbstractTestITCase {
 
   @Test
   public void getPerson() {
-    final Address address = container.getPeople().newPerson().factory().newHomeAddress();
+    final Address address = service.newComplex(HomeAddress.class);
     address.setStreet("1 Microsoft Way");
     address.setPostalCode("98052");
     address.setCity("London");
@@ -80,7 +80,7 @@ public class OperationImportInvokeTestITCase extends AbstractTestITCase {
 
   @Test
   public void resetBossAddress() {
-    final Address address = container.getPeople().newPerson().factory().newHomeAddress();
+    final Address address = service.newComplex(HomeAddress.class);
     address.setStreet("Via Le Mani Dal Naso, 123");
     address.setPostalCode("Tollo");
     address.setCity("66010");
@@ -94,7 +94,7 @@ public class OperationImportInvokeTestITCase extends AbstractTestITCase {
   @Test
   public void bossEmails() {
     final Collection<String> result = container.operations().resetBossEmail(Arrays.asList(
-        new String[] { "first@olingo.apache.org", "second@olingo.apache.org" }));
+            new String[] {"first@olingo.apache.org", "second@olingo.apache.org"}));
     assertEquals(2, result.size());
 
     final Collection<String> result2 = container.operations().getBossEmails(0, 100);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/PropertyTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/PropertyTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/PropertyTestITCase.java
index 7908fc5..9058325 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/PropertyTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/PropertyTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
@@ -49,7 +50,7 @@ public class PropertyTestITCase extends AbstractTestITCase {
       fail();
     } catch (IllegalStateException e) {
       // ignore and detach all
-      containerFactory.getContext().detachAll();
+      service.getContext().detachAll();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
index 219c390..595f572 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.ext.proxy.api.Annotatable;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
index b4ca657..b20520a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
@@ -1,21 +1,22 @@
-/*
+/* 
  * 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.
  */
+
 package org.apache.olingo.fit.proxy.v4;
 
 import org.apache.olingo.client.api.http.HttpClientException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Advertisements.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Advertisements.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Advertisements.java
index 98e736a..2459ff7 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Advertisements.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Advertisements.java
@@ -19,14 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Advertisements")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Advertisements", container = "ODataDemo.DemoService")
 public interface Advertisements 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection, Advertisements>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement, java.util.UUID, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement newAdvertisement();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection newAdvertisementCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Categories.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Categories.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Categories.java
index 3cd6d32..5e8e7e0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Categories.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Categories.java
@@ -19,14 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Categories")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Categories", container = "ODataDemo.DemoService")
 public interface Categories 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Category, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection, Categories>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Category, java.lang.Integer, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Category newCategory();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection newCategoryCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/DemoService.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/DemoService.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/DemoService.java
index 28fae07..e854d9b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/DemoService.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/DemoService.java
@@ -19,8 +19,10 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
-import org.apache.olingo.ext.proxy.api.OperationType;
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.PersistenceManager;
+import org.apache.olingo.ext.proxy.api.OperationType;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 @org.apache.olingo.ext.proxy.api.annotations.Namespace("ODataDemo")
 @org.apache.olingo.ext.proxy.api.annotations.EntityContainer(name = "DemoService",
@@ -55,14 +57,5 @@ public interface DemoService extends PersistenceManager {
         @org.apache.olingo.ext.proxy.api.annotations.Parameter(name = "percentage", type = "Edm.Int32", nullable = false) java.lang.Integer percentage
     );
   
-      }
-
-      ComplexFactory complexFactory();
-
-    interface ComplexFactory {
-          @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Address",
-                type = "ODataDemo.Address")
-      org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Address newAddress();
-
-        }
-  }
+      }   
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/PersonDetails.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/PersonDetails.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/PersonDetails.java
index edcbe0f..2ea1485 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/PersonDetails.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/PersonDetails.java
@@ -19,14 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "PersonDetails")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "PersonDetails", container = "ODataDemo.DemoService")
 public interface PersonDetails 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetailCollection, PersonDetails>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail, java.lang.Integer, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetailCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail newPersonDetail();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetailCollection newPersonDetailCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Persons.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Persons.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Persons.java
index 05294e4..cf1826e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Persons.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Persons.java
@@ -19,18 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Persons")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Persons", container = "ODataDemo.DemoService")
 public interface Persons 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonCollection, Persons>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person, java.lang.Integer, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person newPerson();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonCollection newPersonCollection();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Customer newCustomer();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CustomerCollection newCustomerCollection();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Employee newEmployee();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.EmployeeCollection newEmployeeCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/ProductDetails.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/ProductDetails.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/ProductDetails.java
index 2a63ef6..58ad7b2 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/ProductDetails.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/ProductDetails.java
@@ -19,14 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "ProductDetails")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "ProductDetails", container = "ODataDemo.DemoService")
 public interface ProductDetails 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetailCollection, ProductDetails>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail, java.lang.Integer, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetailCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail newProductDetail();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetailCollection newProductDetailCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Products.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Products.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Products.java
index b0c20a0..5e067dd 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Products.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Products.java
@@ -19,16 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Products")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Products", container = "ODataDemo.DemoService")
 public interface Products 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection, Products>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product, java.lang.Integer, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product newProduct();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection newProductCollection();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.FeaturedProduct newFeaturedProduct();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.FeaturedProductCollection newFeaturedProductCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Suppliers.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Suppliers.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Suppliers.java
index 9b9c691..72e1e0b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Suppliers.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Suppliers.java
@@ -19,14 +19,13 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Suppliers")
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Suppliers", container = "ODataDemo.DemoService")
 public interface Suppliers 
   extends org.apache.olingo.ext.proxy.api.EntitySetQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.SupplierCollection, Suppliers>, AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier, java.lang.Integer, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.SupplierCollection> {
-
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier newSupplier();
-    org.apache.olingo.fit.proxy.v4.demo.odatademo.types.SupplierCollection newSupplierCollection();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Address.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Address.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Address.java
index be4a1ee..cfd5ccf 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Address.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Address.java
@@ -19,7 +19,9 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
 
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.Annotatable;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 @org.apache.olingo.ext.proxy.api.annotations.Namespace("ODataDemo")
@@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.Annotatable;
         isOpenType = false,
         isAbstract = false)
 public interface Address 
-    extends org.apache.olingo.ext.proxy.api.StructuredType,org.apache.olingo.ext.proxy.api.SingleQuery<Address> {
+    extends org.apache.olingo.ext.proxy.api.ComplexType,org.apache.olingo.ext.proxy.api.SingleQuery<Address> {
 
 
 
@@ -117,11 +119,6 @@ public interface Address
     
 
 
-    ComplexFactory factory();
-
-    interface ComplexFactory {
-    }
-
     Annotations annotations();
 
     interface Annotations {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Advertisement.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Advertisement.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Advertisement.java
index 7b0a8ea..011eb0d 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Advertisement.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Advertisement.java
@@ -18,10 +18,11 @@
  */
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
-
-import org.apache.olingo.client.api.edm.ConcurrencyMode;
-import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.annotations.Key;
+import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 @org.apache.olingo.ext.proxy.api.annotations.Namespace("ODataDemo")
@@ -30,7 +31,7 @@ import org.apache.olingo.ext.proxy.api.annotations.Key;
         hasStream = true,
         isAbstract = false)
 public interface Advertisement 
-  extends org.apache.olingo.ext.proxy.api.StructuredType,org.apache.olingo.ext.proxy.api.Annotatable,org.apache.olingo.ext.proxy.api.SingleQuery<Advertisement> {
+  extends org.apache.olingo.ext.proxy.api.EntityType,org.apache.olingo.ext.proxy.api.Annotatable,org.apache.olingo.ext.proxy.api.SingleQuery<Advertisement> {
 
 
     
@@ -120,11 +121,6 @@ public interface Advertisement
     java.io.InputStream getStream();
 
 
-    ComplexFactory factory();
-
-    interface ComplexFactory {
-    }
-
     Annotations annotations();
 
     interface Annotations {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/989babb1/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/AdvertisementCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/AdvertisementCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/AdvertisementCollection.java
index 8f00c0d..819bb51 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/AdvertisementCollection.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/AdvertisementCollection.java
@@ -19,14 +19,14 @@
 
 package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
 
-import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+//CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.olingo.ext.proxy.api.AbstractTerm;
-
 import java.util.Collection;
+//CHECKSTYLE:ON (Maven checkstyle)
 
 
 public interface AdvertisementCollection extends 
-    org.apache.olingo.ext.proxy.api.EntityCollectionQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection>, AbstractEntityCollection<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement> {
+    org.apache.olingo.ext.proxy.api.EntityCollectionQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection>, org.apache.olingo.ext.proxy.api.EntityCollection<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement> {
 
   Object getAnnotation(Class<? extends AbstractTerm> term);
 


Mime
View raw message