You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by fm...@apache.org on 2014/07/16 11:26:36 UTC

[13/58] [abbrv] Providing some refactoring in order to avoid multi-request retrieving entity info

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployee.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployee.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployee.java
index 9c5ab37..3b8d0bf 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployee.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployee.java
@@ -1,340 +1,345 @@
-/*
+/* 
  * 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.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types;
 
-import org.apache.olingo.client.api.edm.ConcurrencyMode;
-import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
-import org.apache.olingo.ext.proxy.api.Annotatable;
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
+import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
+import org.apache.olingo.ext.proxy.api.annotations.Namespace;
+import org.apache.olingo.ext.proxy.api.annotations.EntityType;
+import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
 import org.apache.olingo.ext.proxy.api.annotations.Key;
+import org.apache.olingo.ext.proxy.api.annotations.KeyRef;
+import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
+import org.apache.olingo.ext.proxy.api.annotations.Property;
+import org.apache.olingo.ext.proxy.api.annotations.Operation;
+import org.apache.olingo.ext.proxy.api.annotations.Parameter;
+import org.apache.olingo.ext.proxy.api.AbstractOpenType;
+import org.apache.olingo.ext.proxy.api.OperationType;
+import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
+import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
 
-@org.apache.olingo.ext.proxy.api.annotations.Namespace("Microsoft.Test.OData.Services.AstoriaDefaultService")
-@org.apache.olingo.ext.proxy.api.annotations.EntityType(name = "SpecialEmployee",
-    openType = false,
-    hasStream = false,
-    isAbstract = false,
-    baseType = "Microsoft.Test.OData.Services.AstoriaDefaultService.Employee")
-public interface SpecialEmployee
-    extends Annotatable,
-    org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee {
-
-  @Override
-  @Key
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "PersonId",
-      type = "Edm.Int32",
-      nullable = false,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.Integer getPersonId();
-
-  @Override
-  void setPersonId(java.lang.Integer _personId);
-
-  @Override
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Name",
-      type = "Edm.String",
-      nullable = true,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.String getName();
-
-  @Override
-  void setName(java.lang.String _name);
-
-  @Override
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "ManagersPersonId",
-      type = "Edm.Int32",
-      nullable = false,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.Integer getManagersPersonId();
-
-  @Override
-  void setManagersPersonId(java.lang.Integer _managersPersonId);
-
-  @Override
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Salary",
-      type = "Edm.Int32",
-      nullable = false,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.Integer getSalary();
-
-  @Override
-  void setSalary(java.lang.Integer _salary);
-
-  @Override
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Title",
-      type = "Edm.String",
-      nullable = true,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.String getTitle();
-
-  @Override
-  void setTitle(java.lang.String _title);
-
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CarsVIN",
-      type = "Edm.Int32",
-      nullable = false,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.Integer getCarsVIN();
-
-  void setCarsVIN(java.lang.Integer _carsVIN);
-
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Bonus",
-      type = "Edm.Int32",
-      nullable = false,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.Integer getBonus();
-
-  void setBonus(java.lang.Integer _bonus);
-
-  @org.apache.olingo.ext.proxy.api.annotations.Property(name = "IsFullyVested",
-      type = "Edm.Boolean",
-      nullable = false,
-      defaultValue = "",
-      maxLenght = Integer.MAX_VALUE,
-      fixedLenght = false,
-      precision = 0,
-      scale = 0,
-      unicode = true,
-      collation = "",
-      srid = "",
-      concurrencyMode = ConcurrencyMode.None,
-      fcSourcePath = "",
-      fcTargetPath = "",
-      fcContentKind = EdmContentKind.text,
-      fcNSPrefix = "",
-      fcNSURI = "",
-      fcKeepInContent = false)
-  java.lang.Boolean getIsFullyVested();
-
-  void setIsFullyVested(java.lang.Boolean _isFullyVested);
-
-  @Override
-  @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "PersonMetadata",
-      type = "Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata",
-      targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
-      targetContainer = "DefaultContainer",
-      targetEntitySet = "PersonMetadata",
-      containsTarget = false)
-      org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.PersonMetadataCollection
-      getPersonMetadata();
-
-  @Override
-      void
-      setPersonMetadata(
-          org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.PersonMetadataCollection _personMetadata);
-
-  @Override
-  @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Manager",
-      type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Employee",
-      targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
-      targetContainer = "DefaultContainer",
-      targetEntitySet = "Person",
-      containsTarget = false)
-  org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee
-      getManager();
-
-  @Override
-      void
-      setManager(
-          org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee _manager);
-
-  @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Car",
-      type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Car",
-      targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService",
-      targetContainer = "DefaultContainer",
-      targetEntitySet = "Car",
-      containsTarget = false)
-  org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Car getCar();
-
-  void setCar(
-      org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Car _car);
-
-  @Override
-  Operations operations();
-
-  interface Operations
-      extends
-      org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee.Operations {
-
-  }
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
 
-  @Override
-  ComplexFactory factory();
 
-  interface ComplexFactory
-      extends
-      org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee.ComplexFactory {}
+@org.apache.olingo.ext.proxy.api.annotations.Namespace("Microsoft.Test.OData.Services.AstoriaDefaultService")
+@org.apache.olingo.ext.proxy.api.annotations.EntityType(name = "SpecialEmployee",
+        openType = false,
+        hasStream = false,
+        isAbstract = false,
+        baseType = "Microsoft.Test.OData.Services.AstoriaDefaultService.Employee")
+public interface SpecialEmployee 
+  extends org.apache.olingo.ext.proxy.api.StructuredType,org.apache.olingo.ext.proxy.api.Annotatable,org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee {
 
   @Override
-  Annotations annotations();
-
-  interface Annotations
-      extends
-      org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee.Annotations {
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "PersonId",
-        type = "Edm.Int32")
-    Annotatable getPersonIdAnnotations();
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Name",
-        type = "Edm.String")
-    Annotatable getNameAnnotations();
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "ManagersPersonId",
-        type = "Edm.Int32")
-    Annotatable getManagersPersonIdAnnotations();
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Salary",
-        type = "Edm.Int32")
-    Annotatable getSalaryAnnotations();
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Title",
-        type = "Edm.String")
-    Annotatable getTitleAnnotations();
-
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "CarsVIN",
-        type = "Edm.Int32")
-    Annotatable getCarsVINAnnotations();
-
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Bonus",
-        type = "Edm.Int32")
-    Annotatable getBonusAnnotations();
-
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "IsFullyVested",
-        type = "Edm.Boolean")
-    Annotatable getIsFullyVestedAnnotations();
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty(name = "PersonMetadata",
-        type = "Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata")
-    Annotatable getPersonMetadataAnnotations();
-
-    @Override
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty(name = "Manager",
-        type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Employee")
-    Annotatable getManagerAnnotations();
-
-    @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty(name = "Car",
-        type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Car")
-    Annotatable getCarAnnotations();
-  }
+  SpecialEmployee load();
+
+    
+    @Key
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "PersonId", 
+                type = "Edm.Int32", 
+                nullable = false,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.Integer getPersonId();
+
+    void setPersonId(java.lang.Integer _personId);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Name", 
+                type = "Edm.String", 
+                nullable = true,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.String getName();
+
+    void setName(java.lang.String _name);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "ManagersPersonId", 
+                type = "Edm.Int32", 
+                nullable = false,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.Integer getManagersPersonId();
+
+    void setManagersPersonId(java.lang.Integer _managersPersonId);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Salary", 
+                type = "Edm.Int32", 
+                nullable = false,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.Integer getSalary();
+
+    void setSalary(java.lang.Integer _salary);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Title", 
+                type = "Edm.String", 
+                nullable = true,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.String getTitle();
+
+    void setTitle(java.lang.String _title);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CarsVIN", 
+                type = "Edm.Int32", 
+                nullable = false,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.Integer getCarsVIN();
+
+    void setCarsVIN(java.lang.Integer _carsVIN);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Bonus", 
+                type = "Edm.Int32", 
+                nullable = false,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.Integer getBonus();
+
+    void setBonus(java.lang.Integer _bonus);    
+    
+    
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "IsFullyVested", 
+                type = "Edm.Boolean", 
+                nullable = false,
+                defaultValue = "",
+                maxLenght = Integer.MAX_VALUE,
+                fixedLenght = false,
+                precision = 0,
+                scale = 0,
+                unicode = true,
+                collation = "",
+                srid = "",
+                concurrencyMode = ConcurrencyMode.None,
+                fcSourcePath = "",
+                fcTargetPath = "",
+                fcContentKind = EdmContentKind.text,
+                fcNSPrefix = "",
+                fcNSURI = "",
+                fcKeepInContent = false)
+    java.lang.Boolean getIsFullyVested();
+
+    void setIsFullyVested(java.lang.Boolean _isFullyVested);    
+    
+    
+
+    @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "PersonMetadata", 
+                type = "Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata", 
+                targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService", 
+                targetContainer = "DefaultContainer", 
+                targetEntitySet = "PersonMetadata",
+                containsTarget = false)
+    org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.PersonMetadataCollection getPersonMetadata();
+
+    void setPersonMetadata(org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.PersonMetadataCollection _personMetadata);
+    
+    @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Manager", 
+                type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Employee", 
+                targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService", 
+                targetContainer = "DefaultContainer", 
+                targetEntitySet = "Person",
+                containsTarget = false)
+    org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee getManager();
+
+    void setManager(org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee _manager);
+    
+    @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Car", 
+                type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Car", 
+                targetSchema = "Microsoft.Test.OData.Services.AstoriaDefaultService", 
+                targetContainer = "DefaultContainer", 
+                targetEntitySet = "Car",
+                containsTarget = false)
+    org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Car getCar();
+
+    void setCar(org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Car _car);
+    
+
+        @Override
+        Operations operations();
+
+    interface Operations            extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee.Operations{
+    
+        }
+
+    ComplexFactory factory();
+
+    interface ComplexFactory            extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee.ComplexFactory{
+    }
+
+    Annotations annotations();
+
+    interface Annotations            extends org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Employee.Annotations{
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "PersonId",
+                   type = "Edm.Int32")
+        org.apache.olingo.ext.proxy.api.Annotatable getPersonIdAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Name",
+                   type = "Edm.String")
+        org.apache.olingo.ext.proxy.api.Annotatable getNameAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "ManagersPersonId",
+                   type = "Edm.Int32")
+        org.apache.olingo.ext.proxy.api.Annotatable getManagersPersonIdAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Salary",
+                   type = "Edm.Int32")
+        org.apache.olingo.ext.proxy.api.Annotatable getSalaryAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Title",
+                   type = "Edm.String")
+        org.apache.olingo.ext.proxy.api.Annotatable getTitleAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "CarsVIN",
+                   type = "Edm.Int32")
+        org.apache.olingo.ext.proxy.api.Annotatable getCarsVINAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Bonus",
+                   type = "Edm.Int32")
+        org.apache.olingo.ext.proxy.api.Annotatable getBonusAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "IsFullyVested",
+                   type = "Edm.Boolean")
+        org.apache.olingo.ext.proxy.api.Annotatable getIsFullyVestedAnnotations();
+
+
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty(name = "PersonMetadata", 
+                  type = "Microsoft.Test.OData.Services.AstoriaDefaultService.PersonMetadata")
+        org.apache.olingo.ext.proxy.api.Annotatable getPersonMetadataAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty(name = "Manager", 
+                  type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Employee")
+        org.apache.olingo.ext.proxy.api.Annotatable getManagerAnnotations();
+
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty(name = "Car", 
+                  type = "Microsoft.Test.OData.Services.AstoriaDefaultService.Car")
+        org.apache.olingo.ext.proxy.api.Annotatable getCarAnnotations();
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployeeCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployeeCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployeeCollection.java
index e91123d..6a02064 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployeeCollection.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/SpecialEmployeeCollection.java
@@ -1,32 +1,50 @@
-/*
+/* 
  * 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.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types;
 
-import java.util.Collection;
-
+import org.apache.olingo.client.api.http.HttpMethod;
 import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
 import org.apache.olingo.ext.proxy.api.AbstractTerm;
+import org.apache.olingo.ext.proxy.api.OperationType;
+import org.apache.olingo.ext.proxy.api.annotations.Operation;
+import org.apache.olingo.ext.proxy.api.annotations.Parameter;
+import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.*;
+import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.*;
+
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Calendar;
+import javax.xml.datatype.Duration;
 
-public interface SpecialEmployeeCollection
-    extends
-    AbstractEntityCollection<org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.SpecialEmployee> {
+public interface SpecialEmployeeCollection extends AbstractEntityCollection<org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.SpecialEmployee> {
 
   Object getAnnotation(Class<? extends AbstractTerm> term);
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/package-info.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/package-info.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/package-info.java
index f9fa1b2..c6af535 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/package-info.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/staticservice/microsoft/test/odata/services/astoriadefaultservice/types/package-info.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.
  */

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
index 0d39414..b72610a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
@@ -21,9 +21,11 @@ package org.apache.olingo.fit.proxy.v4;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.sql.Timestamp;
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.TimeZone;
@@ -83,7 +85,7 @@ public abstract class AbstractTestITCase {
   }
 
   protected Customer readCustomer(final InMemoryEntities container, final int id) {
-    final Customer customer = container.getCustomers().get(id);
+    final Customer customer = container.getCustomers().get(id).load();
     assertNotNull(customer);
     assertEquals(id, customer.getPersonID(), 0);
 
@@ -100,7 +102,7 @@ public abstract class AbstractTestITCase {
     final Calendar orderDate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
     orderDate.clear();
     orderDate.set(2011, 3, 4, 16, 3, 57);
-    order.setOrderDate(orderDate);
+    order.setOrderDate(new Timestamp(orderDate.getTimeInMillis()));
 
     order.setShelfLife(BigDecimal.ZERO);
     order.setOrderShelfLifes(Arrays.asList(new BigDecimal[] {BigDecimal.TEN.negate(), BigDecimal.TEN}));
@@ -111,9 +113,9 @@ public abstract class AbstractTestITCase {
     order.setShelfLife(BigDecimal.TEN);
     container.flush();
 
-    Order actual = container.getOrders().get(105);
+    Order actual = container.getOrders().get(105).load();
     assertEquals(105, actual.getOrderID(), 0);
-    assertEquals(orderDate.getTimeInMillis(), actual.getOrderDate().getTimeInMillis());
+    assertEquals(orderDate.getTimeInMillis(), actual.getOrderDate().getTime());
     assertEquals(BigDecimal.TEN, actual.getShelfLife());
     assertEquals(2, actual.getOrderShelfLifes().size());
 
@@ -133,7 +135,10 @@ public abstract class AbstractTestITCase {
     container.flush();
 
     containerFactory.getContext().detachAll();
-    actual = container.getOrders().get(105);
-    assertNull(actual);
+    try {
+      container.getOrders().get(105).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 e37df00..54fd70a 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
@@ -18,6 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
+import java.sql.Timestamp;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
@@ -106,7 +107,8 @@ public class BoundOperationInvokeTestITCase extends AbstractTestITCase {
 
   @Test
   public void refreshDefaultPI() {
-    final PaymentInstrument pi = container.getAccounts().get(101).operations().refreshDefaultPI(Calendar.getInstance());
+    final PaymentInstrument pi = container.getAccounts().get(101).operations().
+            refreshDefaultPI(new Timestamp(Calendar.getInstance().getTimeInMillis()));
     assertEquals(101901, pi.getPaymentInstrumentID(), 0);
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 3d2dcd2..fd43a85 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
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import java.math.BigDecimal;
+import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.Collections;
 
@@ -75,13 +76,13 @@ public class DerivedTypeTestITCase extends AbstractTestITCase {
     final Calendar birthday = Calendar.getInstance();
     birthday.clear();
     birthday.set(1977, 8, 8);
-    customer.setBirthday(birthday);
+    customer.setBirthday(new Timestamp(birthday.getTimeInMillis()));
 
     customer.setTimeBetweenLastTwoOrders(BigDecimal.valueOf(0.0000002));
 
     container.flush();
 
-    final Person actual = container.getPeople().get(976, Customer.class);
+    final Person actual = container.getPeople().get(976, Customer.class).load();
     assertTrue(actual instanceof Customer);
     assertTrue(actual.getHomeAddress() instanceof CompanyAddress);
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 3a43091..3250594 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
@@ -20,10 +20,11 @@ package org.apache.olingo.fit.proxy.v4;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.math.BigDecimal;
+import java.sql.Timestamp;
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Collections;
@@ -77,27 +78,27 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     employee.setPersonID(id);
     employee.setFirstName("Fabio");
     employee.setLastName("Martelli");
-    employee.setEmails(Collections.<String> singleton("fabio.martelli@tirasa.net"));
+    employee.setEmails(Collections.<String>singleton("fabio.martelli@tirasa.net"));
     final Calendar date = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
     date.clear();
     date.set(2011, 3, 4, 9, 0, 0);
-    employee.setDateHired(date);
+    employee.setDateHired(new Timestamp(date.getTimeInMillis()));
     final Address homeAddress = employee.factory().newHomeAddress();
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65100");
     homeAddress.setStreet("viale Gabriele D'Annunzio 256");
     employee.setHomeAddress(homeAddress);
-    employee.setNumbers(Arrays.asList(new String[] { "3204725072", "08569930" }));
+    employee.setNumbers(Arrays.asList(new String[] {"3204725072", "08569930"}));
 
     getContainer().flush();
 
-    Employee actual = getContainer().getPeople().get(id, Employee.class);
+    Employee actual = getContainer().getPeople().get(id, Employee.class).load();
     assertNotNull(actual);
     assertEquals(id, actual.getPersonID());
     assertEquals(homeAddress.getCity(), actual.getHomeAddress().getCity());
 
     getContainerFactory().getContext().detachAll();
-    actual = getContainer().getPeople().get(id, Employee.class);
+    actual = getContainer().getPeople().get(id, Employee.class).load();
     assertNotNull(actual);
     assertEquals(id, actual.getPersonID());
     assertEquals(homeAddress.getCity(), actual.getHomeAddress().getCity());
@@ -105,12 +106,18 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     getContainer().getPeople().delete(actual.getPersonID());
     getContainer().flush();
 
-    actual = getContainer().getPeople().get(id, Employee.class);
-    assertNull(actual);
+    try {
+      getContainer().getPeople().get(id, Employee.class).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
 
     getContainerFactory().getContext().detachAll();
-    actual = getContainer().getPeople().get(id, Employee.class);
-    assertNull(actual);
+    try {
+      getContainer().getPeople().get(id, Employee.class).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 
   @Test
@@ -123,13 +130,13 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     customer.setFirstName("Fabio");
     customer.setLastName("Martelli");
     customer.setCity("Pescara");
-    customer.setEmails(Collections.<String> singleton("fabio.martelli@tirasa.net"));
+    customer.setEmails(Collections.<String>singleton("fabio.martelli@tirasa.net"));
     Address homeAddress = customer.factory().newHomeAddress();
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65100");
     homeAddress.setStreet("viale Gabriele D'Annunzio 256");
     customer.setHomeAddress(homeAddress);
-    customer.setNumbers(Arrays.asList(new String[] { "3204725072", "08569930" }));
+    customer.setNumbers(Arrays.asList(new String[] {"3204725072", "08569930"}));
 
     final OrderCollection orders = getContainer().getOrders().newOrderCollection();
     orders.add(getContainer().getOrders().get(8));
@@ -145,8 +152,11 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     getContainer().getCustomers().delete(actual.getPersonID());
     getContainer().flush();
 
-    actual = getContainer().getCustomers().get(id);
-    assertNull(actual);
+    try {
+      getContainer().getCustomers().get(id).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 
   @Test
@@ -162,10 +172,10 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     final Calendar orderDate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
     orderDate.clear();
     orderDate.set(2011, 3, 4, 16, 3, 57);
-    order.setOrderDate(orderDate);
+    order.setOrderDate(new Timestamp(orderDate.getTimeInMillis()));
 
     order.setShelfLife(BigDecimal.TEN);
-    order.setOrderShelfLifes(Arrays.asList(new BigDecimal[] { BigDecimal.TEN.negate(), BigDecimal.TEN }));
+    order.setOrderShelfLifes(Arrays.asList(new BigDecimal[] {BigDecimal.TEN.negate(), BigDecimal.TEN}));
     // -------------------------------
 
     // -------------------------------
@@ -177,13 +187,13 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     customer.setFirstName("Fabio");
     customer.setLastName("Martelli");
     customer.setCity("Pescara");
-    customer.setEmails(Collections.<String> singleton("fabio.martelli@tirasa.net"));
+    customer.setEmails(Collections.<String>singleton("fabio.martelli@tirasa.net"));
     final Address homeAddress = customer.factory().newHomeAddress();
     homeAddress.setCity("Pescara");
     homeAddress.setPostalCode("65100");
     homeAddress.setStreet("viale Gabriele D'Annunzio 256");
     customer.setHomeAddress(homeAddress);
-    customer.setNumbers(Arrays.asList(new String[] { "3204725072", "08569930" }));
+    customer.setNumbers(Arrays.asList(new String[] {"3204725072", "08569930"}));
 
     final OrderCollection orders = getContainer().getOrders().newOrderCollection();
     orders.add(order);
@@ -213,8 +223,11 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     getContainer().getOrders().delete(actual.getOrders());
     getContainer().flush();
 
-    order = getContainer().getOrders().get(id);
-    assertNull(order);
+    try {
+      getContainer().getOrders().get(id).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
 
     actual = readCustomer(getContainer(), id);
     assertTrue(actual.getOrders().isEmpty());
@@ -222,8 +235,11 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     getContainer().getCustomers().delete(actual.getPersonID());
     getContainer().flush();
 
-    actual = getContainer().getCustomers().get(id);
-    assertNull(actual);
+    try {
+      getContainer().getCustomers().get(id).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 
   @Test
@@ -240,7 +256,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     key.setOrderID(8);
     key.setProductID(1);
 
-    details = getContainer().getOrderDetails().get(key);
+    details = getContainer().getOrderDetails().get(key).load();
     assertNotNull(details);
     assertEquals(Integer.valueOf(100), details.getQuantity());
     assertEquals(8, details.getOrderID(), 0);
@@ -250,7 +266,11 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     getContainer().getOrderDetails().delete(key);
     getContainer().flush();
 
-    assertNull(getContainer().getOrderDetails().get(key));
+    try {
+      getContainer().getOrderDetails().get(key).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 
   @Test
@@ -264,7 +284,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     product.setDiscontinued(false);
     product.setUserAccess(AccessLevel.Execute);
     product.setSkinColor(Color.Blue);
-    product.setCoverColors(Arrays.asList(new Color[] { Color.Red, Color.Green }));
+    product.setCoverColors(Arrays.asList(new Color[] {Color.Red, Color.Green}));
 
     final ProductDetail detail = getContainer().getProductDetails().newProductDetail();
     detail.setProductID(product.getProductID());
@@ -279,7 +299,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
 
     getContainer().flush();
 
-    product = getContainer().getProducts().get(12);
+    product = getContainer().getProducts().get(12).load();
     assertEquals("Latte", product.getName());
     assertEquals(12, product.getDetails().iterator().next().getProductDetailID(), 0);
   }
@@ -290,12 +310,12 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
     final int sizeBefore = instruments.size();
 
     final PaymentInstrument instrument = getContainer().getAccounts().get(101).
-        getMyPaymentInstruments().newPaymentInstrument();
+            getMyPaymentInstruments().newPaymentInstrument();
 
     final int id = RandomUtils.nextInt(101999, 105000);
     instrument.setPaymentInstrumentID(id);
     instrument.setFriendlyName("New one");
-    instrument.setCreatedDate(Calendar.getInstance());
+    instrument.setCreatedDate(new Timestamp(Calendar.getInstance().getTimeInMillis()));
 
     getContainer().flush();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 d9900fd..2007b81 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
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.lang.reflect.Proxy;
+import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.TimeZone;
 
@@ -98,18 +99,18 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
 
   @Test
   public void navigate() {
-    final Order order = getContainer().getOrders().get(8);
+    final Order order = getContainer().getOrders().get(8).load();
     assertNotNull(order);
     assertEquals(8, order.getOrderID(), 0);
 
-    final Calendar date = order.getOrderDate();
+    final Timestamp date = order.getOrderDate();
     assertNotNull(date);
     final Calendar actual = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
     actual.clear();
     actual.set(2011, 2, 4, 16, 3, 57);
-    assertEquals(actual.getTimeInMillis(), date.getTimeInMillis());
+    assertEquals(actual.getTimeInMillis(), date.getTime());
 
-    final Customer customer = getContainer().getCustomers().get(1);
+    final Customer customer = getContainer().getCustomers().get(1).load();
     assertNotNull(customer);
     assertEquals(1, customer.getPersonID(), 0);
     final Address address = customer.getHomeAddress();
@@ -134,7 +135,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
 
   @Test
   public void withActions() {
-    final Product product = getContainer().getProducts().get(5);
+    final Product product = getContainer().getProducts().get(5).load();
     assertEquals(5, product.getProductID(), 0);
 
     try {
@@ -150,7 +151,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
     orderDetailKey.setOrderID(7);
     orderDetailKey.setProductID(5);
 
-    final OrderDetail orderDetail = getContainer().getOrderDetails().get(orderDetailKey);
+    final OrderDetail orderDetail = getContainer().getOrderDetails().get(orderDetailKey).load();
     assertNotNull(orderDetail);
     assertEquals(7, orderDetail.getOrderID(), 0);
     assertEquals(5, orderDetail.getProductID(), 0);
@@ -158,14 +159,14 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
 
   @Test
   public void checkForETag() {
-    final Order order = getContainer().getOrders().get(8);
+    final Order order = getContainer().getOrders().get(8).load();
     assertTrue(StringUtils.isNotBlank(((EntityInvocationHandler) Proxy.getInvocationHandler(order)).getETag()));
   }
 
   @Test
   public void contained() {
-    final PaymentInstrument instrument = getContainer().getAccounts().get(101).getMyPaymentInstruments().get(101901);
-    assertNotNull(instrument);
+    final PaymentInstrument instrument = 
+            getContainer().getAccounts().get(101).getMyPaymentInstruments().get(101901).load();
     assertEquals(101901, instrument.getPaymentInstrumentID(), 0);
     assertNotNull(instrument.getCreatedDate());
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 7069d67..b156d31 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
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.lang.reflect.Proxy;
 import java.math.BigDecimal;
+import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.Collections;
 import java.util.UUID;
@@ -61,14 +62,14 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
 
   @Test
   public void update() {
-    Person person = getContainer().getPeople().get(1);
+    Person person = getContainer().getPeople().get(1).load();
 
     final Address address = person.getHomeAddress();
     address.setCity("XXX");
 
     getContainer().flush();
 
-    person = getContainer().getPeople().get(1);
+    person = getContainer().getPeople().get(1).load();
     assertEquals("XXX", person.getHomeAddress().getCity());
   }
 
@@ -78,7 +79,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
     orderDetailKey.setOrderID(7);
     orderDetailKey.setProductID(5);
 
-    OrderDetail orderDetail = getContainer().getOrderDetails().get(orderDetailKey);
+    OrderDetail orderDetail = getContainer().getOrderDetails().get(orderDetailKey).load();
     assertNotNull(orderDetail);
     assertEquals(7, orderDetail.getOrderID(), 0);
     assertEquals(5, orderDetail.getProductID(), 0);
@@ -87,8 +88,8 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
 
     getContainer().flush();
 
-    orderDetail = getContainer().getOrderDetails().get(orderDetailKey);
-    orderDetail.setQuantity(5);
+    orderDetail = getContainer().getOrderDetails().get(orderDetailKey).load();
+    assertEquals(5, orderDetail.getQuantity(), 0);
   }
 
   @Test
@@ -112,7 +113,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
     final Calendar birthday = Calendar.getInstance();
     birthday.clear();
     birthday.set(1977, 8, 8);
-    customer.setBirthday(birthday);
+    customer.setBirthday(new Timestamp(birthday.getTimeInMillis()));
 
     customer.setTimeBetweenLastTwoOrders(BigDecimal.valueOf(0.0000002));
 
@@ -131,7 +132,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
     getContainer().flush();
 
     // 3. check everything after flush
-    order = getContainer().getOrders().get(orderId);
+    order = getContainer().getOrders().get(orderId).load();
     assertEquals(orderId, order.getOrderID(), 0);
 
     customer = getContainer().getCustomers().get(977);
@@ -156,7 +157,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
 
   @Test
   public void concurrentModification() {
-    Order order = getContainer().getOrders().get(8);
+    Order order = getContainer().getOrders().get(8).load();
     final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(order)).getETag();
     assertTrue(StringUtils.isNotBlank(etag));
 
@@ -164,7 +165,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
 
     getContainer().flush();
 
-    order = getContainer().getOrders().get(8);
+    order = getContainer().getOrders().get(8).load();
     assertEquals(BigDecimal.TEN, order.getShelfLife());
   }
 
@@ -177,7 +178,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
 
     getContainer().flush();
 
-    instrument = getContainer().getAccounts().get(101).getMyPaymentInstruments().get(101901);
+    instrument = getContainer().getAccounts().get(101).getMyPaymentInstruments().get(101901).load();
     assertEquals(newName, instrument.getFriendlyName());
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 01ec7ba..bacdb57 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
@@ -20,10 +20,11 @@ package org.apache.olingo.fit.proxy.v4;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.UUID;
 
@@ -64,7 +65,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
   public void read() throws IOException {
     final UUID uuid = UUID.fromString("f89dee73-af9f-4cd4-b330-db93c25ff3c7");
 
-    final Advertisement adv = getContainer().getAdvertisements().get(uuid);
+    final Advertisement adv = getContainer().getAdvertisements().get(uuid).load();
     assertNotNull(adv.getAirDate());
 
     final InputStream is = adv.getStream();
@@ -76,8 +77,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
   public void update() throws IOException {
     final UUID uuid = UUID.fromString("f89dee73-af9f-4cd4-b330-db93c25ff3c7");
 
-    final Advertisement adv = getContainer().getAdvertisements().get(uuid);
-    assertNotNull(adv);
+    final Advertisement adv = getContainer().getAdvertisements().get(uuid).load();
 
     final String random = RandomStringUtils.random(124, "abcdefghijklmnopqrstuvwxyz");
 
@@ -85,7 +85,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
 
     getContainer().flush();
 
-    assertEquals(random, IOUtils.toString(getContainer().getAdvertisements().get(uuid).getStream()));
+    assertEquals(random, IOUtils.toString(getContainer().getAdvertisements().get(uuid).load().getStream()));
   }
 
   @Test
@@ -94,20 +94,24 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
 
     final Advertisement adv = getContainer().getAdvertisements().newAdvertisement();
     adv.setStream(IOUtils.toInputStream(random));
-    adv.setAirDate(Calendar.getInstance());
+    adv.setAirDate(new Timestamp(Calendar.getInstance().getTimeInMillis()));
 
     getContainer().flush();
 
     final UUID uuid = adv.getID();
     getContainerFactory().getContext().detachAll();
 
-    assertEquals(random, IOUtils.toString(getContainer().getAdvertisements().get(uuid).getStream()));
+    assertEquals(random, IOUtils.toString(getContainer().getAdvertisements().get(uuid).load().getStream()));
 
     getContainerFactory().getContext().detachAll();
 
     getContainer().getAdvertisements().delete(uuid);
     getContainer().flush();
 
-    assertNull(getContainer().getAdvertisements().get(uuid));
+    try {
+      getContainer().getAdvertisements().get(uuid).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 82e05d6..b88de49 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
@@ -20,10 +20,11 @@ package org.apache.olingo.fit.proxy.v4;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 import static org.junit.Assert.assertTrue;
 
 import java.math.BigDecimal;
+import java.sql.Timestamp;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
@@ -55,7 +56,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
   public static void initContainer() {
     otcontainerFactory = EntityContainerFactory.getV4(testOpenTypeServiceRootURL);
     otcontainerFactory.getClient().getConfiguration().
-        setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
+            setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
     otcontainer = otcontainerFactory.getEntityContainer(DefaultContainer.class);
     assertNotNull(otcontainer);
   }
@@ -63,21 +64,21 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
   @Test
   public void checkOpenTypeEntityTypesExist() {
     assertTrue(otcontainer.getRow().newRow().getClass().getInterfaces()[0].
-        getAnnotation(EntityType.class).openType());
+            getAnnotation(EntityType.class).openType());
     assertTrue(otcontainer.getRowIndex().newRowIndex().getClass().getInterfaces()[0].
-        getAnnotation(EntityType.class).openType());
+            getAnnotation(EntityType.class).openType());
     assertTrue(otcontainer.getRow().newIndexedRow().getClass().getInterfaces()[0].
-        getAnnotation(EntityType.class).openType());
+            getAnnotation(EntityType.class).openType());
     otcontainerFactory.getContext().detachAll();
   }
 
   @Test
   public void read() {
-    Row row = otcontainer.getRow().get(UUID.fromString("71f7d0dc-ede4-45eb-b421-555a2aa1e58f"));
+    Row row = otcontainer.getRow().get(UUID.fromString("71f7d0dc-ede4-45eb-b421-555a2aa1e58f")).load();
     assertEquals(Double.class, row.getAdditionalProperty("Double").getClass());
     assertEquals("71f7d0dc-ede4-45eb-b421-555a2aa1e58f", row.getId().toString());
 
-    row = otcontainer.getRow().get(UUID.fromString("672b8250-1e6e-4785-80cf-b94b572e42b3"));
+    row = otcontainer.getRow().get(UUID.fromString("672b8250-1e6e-4785-80cf-b94b572e42b3")).load();
     assertEquals(BigDecimal.class, row.getAdditionalProperty("Decimal").getClass());
   }
 
@@ -100,7 +101,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     cal.clear();
     cal.setTime(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").parse("2001-04-05T05:05:05.001"));
 
-    contact.setLastContacted(cal);
+    contact.setLastContacted(new Timestamp(cal.getTimeInMillis()));
 
     cal = Calendar.getInstance();
     cal.clear();
@@ -126,7 +127,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
 
     otcontainer.flush();
 
-    rowIndex = otcontainer.getRowIndex().get(id);
+    rowIndex = otcontainer.getRowIndex().get(id).load();
     assertEquals(String.class, rowIndex.getAdditionalProperty("aString").getClass());
     assertEquals(Boolean.class, rowIndex.getAdditionalProperty("aBoolean").getClass());
     assertEquals(Double.class, rowIndex.getAdditionalProperty("aDouble").getClass());
@@ -139,13 +140,17 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     assertEquals("Fabio", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).getFirstName());
     assertEquals("Martelli", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).getLastName());
     assertEquals("fabio.martelli@tirasa.net", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).
-        getAdditionalProperty("email"));
+            getAdditionalProperty("email"));
 
     otcontainerFactory.getContext().detachAll();
 
     otcontainer.getRowIndex().delete(id);
     otcontainer.flush();
 
-    assertNull(otcontainer.getRowIndex().get(id));
+    try {
+      otcontainer.getRowIndex().get(id).load();
+      fail();
+    } catch (IllegalArgumentException e) {
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6587302a/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 542e819..a69feac 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
@@ -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,13 +20,34 @@
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.*;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.*;
+
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Calendar;
+import javax.xml.datatype.Duration;
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Advertisements")
-public interface Advertisements
-    extends
-    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();
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Advertisements")
+public interface Advertisements 
+  extends org.apache.olingo.ext.proxy.api.CollectionQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.AdvertisementCollection>, 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/6587302a/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 dba12dd..ef1471b 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
@@ -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,13 +20,34 @@
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.*;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.*;
+
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Calendar;
+import javax.xml.datatype.Duration;
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Categories")
-public interface Categories
-    extends
-    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();
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Categories")
+public interface Categories 
+  extends org.apache.olingo.ext.proxy.api.CollectionQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Category, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection>, 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/6587302a/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 afe0549..920e022 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
@@ -1,66 +1,83 @@
-/*
+/* 
  * 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.demo.odatademo;
 
-import org.apache.olingo.ext.proxy.api.OperationType;
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.annotations.Operation;
+import org.apache.olingo.ext.proxy.api.annotations.Parameter;
+import org.apache.olingo.ext.proxy.api.annotations.Property;
 import org.apache.olingo.ext.proxy.api.PersistenceManager;
+import org.apache.olingo.ext.proxy.api.OperationType;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.*;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.*;
+
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Calendar;
+import javax.xml.datatype.Duration;
 
 @org.apache.olingo.ext.proxy.api.annotations.Namespace("ODataDemo")
 @org.apache.olingo.ext.proxy.api.annotations.EntityContainer(name = "DemoService",
-    namespace = "ODataDemo",
-    isDefaultEntityContainer = true)
+  namespace = "ODataDemo",
+  isDefaultEntityContainer = true)
 public interface DemoService extends PersistenceManager {
 
-  Products getProducts();
-
-  Advertisements getAdvertisements();
-
-  Persons getPersons();
-
-  Categories getCategories();
-
-  PersonDetails getPersonDetails();
+    Products getProducts();
+    Advertisements getAdvertisements();
+    Persons getPersons();
+    Categories getCategories();
+    PersonDetails getPersonDetails();
+    Suppliers getSuppliers();
+    ProductDetails getProductDetails();
 
-  Suppliers getSuppliers();
 
-  ProductDetails getProductDetails();
 
   Operations operations();
 
   public interface Operations {
-
-    @org.apache.olingo.ext.proxy.api.annotations.Operation(name = "IncreaseSalaries",
-        type = OperationType.ACTION)
-    void increaseSalaries(
-        @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();
-
+  
+        @org.apache.olingo.ext.proxy.api.annotations.Operation(name = "IncreaseSalaries",
+                    type = OperationType.ACTION)
+  void increaseSalaries(
+        @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/6587302a/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 449ced3..d714340 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
@@ -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,13 +20,34 @@
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.*;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.*;
+
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Calendar;
+import javax.xml.datatype.Duration;
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "PersonDetails")
-public interface PersonDetails
-    extends
-    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();
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "PersonDetails")
+public interface PersonDetails 
+  extends org.apache.olingo.ext.proxy.api.CollectionQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetailCollection>, 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/6587302a/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 0feac2d..c90caf9 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
@@ -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,21 +20,38 @@
 package org.apache.olingo.fit.proxy.v4.demo.odatademo;
 
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
+import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.*;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.*;
+
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
+import org.apache.olingo.commons.api.edm.geo.LineString;
+import org.apache.olingo.commons.api.edm.geo.MultiLineString;
+import org.apache.olingo.commons.api.edm.geo.MultiPoint;
+import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
+import org.apache.olingo.commons.api.edm.geo.Point;
+import org.apache.olingo.commons.api.edm.geo.Polygon;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.UUID;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Calendar;
+import javax.xml.datatype.Duration;
 
-@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Persons")
-public interface Persons
-    extends
-    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();
+@org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Persons")
+public interface Persons 
+  extends org.apache.olingo.ext.proxy.api.CollectionQuery<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person, org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonCollection>, 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();
 }