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/05/19 12:33:03 UTC
[1/3] [OLINGO-260] provided media entity integration tests on proxy
Repository: olingo-odata4
Updated Branches:
refs/heads/master f228204fa -> 946356fb0
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetailCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetailCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetailCollection.java
new file mode 100644
index 0000000..6fe5dc0
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetailCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface ProductDetailCollection extends AbstractEntityCollection<ProductDetail> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Supplier.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Supplier.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Supplier.java
new file mode 100644
index 0000000..e458d9f
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Supplier.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Supplier",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface Supplier
+ extends Serializable {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+ @Property(name = "Address",
+ type = "ODataDemo.Address",
+ 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)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Address getAddress();
+
+ void setAddress(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Address _address);
+
+
+ @Property(name = "Location",
+ type = "Edm.GeographyPoint",
+ 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)
+ Point getLocation();
+
+ void setLocation(Point _location);
+
+
+ @Property(name = "Concurrency",
+ 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)
+ Integer getConcurrency();
+
+ void setConcurrency(Integer _concurrency);
+
+
+
+ @NavigationProperty(name = "Products",
+ type = "ODataDemo.Product",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Products",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection getProducts();
+
+ void setProducts(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection _products);
+
+
+
+ ComplexFactory factory();
+
+ interface ComplexFactory {
+ @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/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/SupplierCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/SupplierCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/SupplierCollection.java
new file mode 100644
index 0000000..a354606
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/SupplierCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface SupplierCollection extends AbstractEntityCollection<Supplier> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/package-info.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/package-info.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/package-info.java
new file mode 100644
index 0000000..9c9e0b7
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
index 716d9b3..78f05a7 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
@@ -116,6 +116,17 @@ abstract class AbstractJsonSerializer<T> extends ODataJacksonSerializer<T> {
}
protected void serverLinks(final Linked linked, final JsonGenerator jgen) throws IOException {
+ if (linked instanceof JSONEntityImpl) {
+ for (Link link : ((JSONEntityImpl) linked).getMediaEditLinks()) {
+ if (StringUtils.isNotBlank(link.getHref())) {
+ jgen.writeStringField(
+ link.getTitle() + StringUtils.prependIfMissing(
+ version.getJSONMap().get(ODataServiceVersion.JSON_MEDIAEDIT_LINK), "@"),
+ link.getHref());
+ }
+ }
+ }
+
for (Link link : linked.getAssociationLinks()) {
if (StringUtils.isNotBlank(link.getHref())) {
jgen.writeStringField(
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6e079b4..0047b4d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -415,7 +415,7 @@
<failOnViolation>true</failOnViolation>
<violationSeverity>warning</violationSeverity>
<!-- fit autogenerated (via pojogen plugin) resources -->
- <excludes>**/fit/proxy/v4/staticservice/**/*.java, **/fit/proxy/v3/staticservice/**/*.java, **/fit/proxy/v3/actionoverloading/**/*.java, **/fit/proxy/v3/primitivekeys/**/*.java, **/fit/proxy/v3/opentype/**/*.java, **/fit/proxy/v4/opentype/**/*.java</excludes>
+ <excludes>**/fit/proxy/v4/staticservice/**/*.java, **/fit/proxy/v3/staticservice/**/*.java, **/fit/proxy/v3/actionoverloading/**/*.java, **/fit/proxy/v3/primitivekeys/**/*.java, **/fit/proxy/v3/opentype/**/*.java, **/fit/proxy/v4/opentype/**/*.java, **/fit/proxy/v4/demo/**/*.java</excludes>
</configuration>
</plugin>
<plugin>
[3/3] git commit: [OLINGO-260] provided media entity integration
tests on proxy
Posted by fm...@apache.org.
[OLINGO-260] provided media entity integration tests on proxy
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/946356fb
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/946356fb
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/946356fb
Branch: refs/heads/master
Commit: 946356fb0f3e985082d29db0868ad345256b3ec8
Parents: f228204
Author: fmartelli <fa...@gmail.com>
Authored: Mon May 19 12:32:48 2014 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Mon May 19 12:32:48 2014 +0200
----------------------------------------------------------------------
.../AbstractStructuredInvocationHandler.java | 32 ++-
.../proxy/commons/ComplexInvocationHandler.java | 8 +-
.../olingo/ext/proxy/commons/ContainerImpl.java | 80 +++---
.../proxy/commons/EntityInvocationHandler.java | 48 ++--
.../olingo/ext/proxy/utils/CoreUtils.java | 12 +-
fit/src/it/demoV4/pom.xml | 93 +++++++
fit/src/it/demoV4/verify.groovy | 20 ++
.../org/apache/olingo/fit/AbstractServices.java | 6 +-
.../java/org/apache/olingo/fit/V3Services.java | 2 +-
.../main/java/org/apache/olingo/fit/V4Demo.java | 29 +-
.../java/org/apache/olingo/fit/V4Services.java | 2 +-
.../org/apache/olingo/fit/utils/DataBinder.java | 46 +++-
.../fit/proxy/v3/MediaEntityTestITCase.java | 108 ++++++++
.../olingo/fit/proxy/v4/AbstractTestITCase.java | 3 +
.../fit/proxy/v4/MediaEntityTestITCase.java | 106 +++++++
.../proxy/v4/demo/odatademo/Advertisements.java | 52 ++++
.../fit/proxy/v4/demo/odatademo/Categories.java | 52 ++++
.../proxy/v4/demo/odatademo/DemoService.java | 85 ++++++
.../proxy/v4/demo/odatademo/PersonDetails.java | 52 ++++
.../fit/proxy/v4/demo/odatademo/Persons.java | 56 ++++
.../proxy/v4/demo/odatademo/ProductDetails.java | 52 ++++
.../fit/proxy/v4/demo/odatademo/Products.java | 54 ++++
.../fit/proxy/v4/demo/odatademo/Suppliers.java | 52 ++++
.../proxy/v4/demo/odatademo/package-info.java | 21 ++
.../proxy/v4/demo/odatademo/types/Address.java | 140 ++++++++++
.../v4/demo/odatademo/types/Advertisement.java | 150 ++++++++++
.../types/AdvertisementCollection.java | 47 ++++
.../proxy/v4/demo/odatademo/types/Category.java | 124 +++++++++
.../odatademo/types/CategoryCollection.java | 47 ++++
.../proxy/v4/demo/odatademo/types/Customer.java | 148 ++++++++++
.../odatademo/types/CustomerCollection.java | 47 ++++
.../proxy/v4/demo/odatademo/types/Employee.java | 194 +++++++++++++
.../odatademo/types/EmployeeCollection.java | 47 ++++
.../demo/odatademo/types/FeaturedProduct.java | 276 +++++++++++++++++++
.../types/FeaturedProductCollection.java | 47 ++++
.../proxy/v4/demo/odatademo/types/Person.java | 124 +++++++++
.../demo/odatademo/types/PersonCollection.java | 47 ++++
.../v4/demo/odatademo/types/PersonDetail.java | 224 +++++++++++++++
.../odatademo/types/PersonDetailCollection.java | 47 ++++
.../proxy/v4/demo/odatademo/types/Product.java | 271 ++++++++++++++++++
.../demo/odatademo/types/ProductCollection.java | 47 ++++
.../v4/demo/odatademo/types/ProductDetail.java | 124 +++++++++
.../types/ProductDetailCollection.java | 47 ++++
.../proxy/v4/demo/odatademo/types/Supplier.java | 201 ++++++++++++++
.../odatademo/types/SupplierCollection.java | 47 ++++
.../v4/demo/odatademo/types/package-info.java | 21 ++
.../core/data/AbstractJsonSerializer.java | 11 +
pom.xml | 2 +-
48 files changed, 3451 insertions(+), 100 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
index 2e6103e..689d99f 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
@@ -73,7 +73,7 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
super(client, containerHandler);
this.internal = internal;
this.typeRef = typeRef;
- this.entityHandler = EntityInvocationHandler.class.cast(this);
+ this.entityHandler = null;
}
protected AbstractStructuredInvocationHandler(
@@ -85,15 +85,21 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
super(client, entityHandler == null ? null : entityHandler.containerHandler);
this.internal = internal;
this.typeRef = typeRef;
- this.entityHandler = entityHandler;
+ // prevent memory leak
+ this.entityHandler = entityHandler == this ? null : entityHandler;
}
public EntityInvocationHandler getEntityHandler() {
- return entityHandler;
+ return entityHandler == null
+ ? this instanceof EntityInvocationHandler
+ ? EntityInvocationHandler.class.cast(this)
+ : null
+ : entityHandler;
}
public void setEntityHandler(EntityInvocationHandler entityHandler) {
- this.entityHandler = entityHandler;
+ // prevent memory leak
+ this.entityHandler = entityHandler == this ? null : entityHandler;
}
public Class<?> getTypeRef() {
@@ -110,14 +116,14 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {returnType},
- OperationInvocationHandler.getInstance(entityHandler));
+ OperationInvocationHandler.getInstance(getEntityHandler()));
} else if ("factory".equals(method.getName()) && ArrayUtils.isEmpty(args)) {
final Class<?> returnType = method.getReturnType();
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {returnType},
- ComplexFactoryInvocationHandler.getInstance(entityHandler, this));
+ ComplexFactoryInvocationHandler.getInstance(getEntityHandler(), this));
} else if (method.getName().startsWith("get")) {
// Assumption: for each getter will always exist a setter and viceversa.
// get method annotation and check if it exists as expected
@@ -171,8 +177,8 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
}
protected void attach() {
- if (entityHandler != null && !entityContext.isAttached(entityHandler)) {
- entityContext.attach(entityHandler, AttachedEntityStatus.ATTACHED);
+ if (getEntityHandler() != null && !entityContext.isAttached(getEntityHandler())) {
+ entityContext.attach(getEntityHandler(), AttachedEntityStatus.ATTACHED);
}
}
@@ -181,12 +187,12 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
}
protected void attach(final AttachedEntityStatus status, final boolean override) {
- if (entityContext.isAttached(entityHandler)) {
+ if (entityContext.isAttached(getEntityHandler())) {
if (override) {
- entityContext.setStatus(entityHandler, status);
+ entityContext.setStatus(getEntityHandler(), status);
}
} else {
- entityContext.attach(entityHandler, status);
+ entityContext.attach(getEntityHandler(), status);
}
}
@@ -276,8 +282,8 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
private void setNavigationPropertyValue(final NavigationProperty property, final Object value) {
// 1) attach source entity
- if (!entityContext.isAttached(entityHandler)) {
- entityContext.attach(entityHandler, AttachedEntityStatus.CHANGED);
+ if (!entityContext.isAttached(getEntityHandler())) {
+ entityContext.attach(getEntityHandler(), AttachedEntityStatus.CHANGED);
}
// 2) attach the target entity handlers
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
index 72d42e8..b85452d 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
@@ -99,7 +99,7 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
@Override
protected Object getPropertyValue(final String name, final Type type) {
try {
- return CoreUtils.getValueFromProperty(client, getComplex().get(name), type, entityHandler);
+ return CoreUtils.getValueFromProperty(client, getComplex().get(name), type, getEntityHandler());
} catch (Exception e) {
throw new IllegalArgumentException("Error getting value for property '" + name + "'", e);
}
@@ -155,8 +155,8 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
client.getBinder().add(getComplex(), CoreUtils.getODataProperty(client, property.name(), type, toBeAdded));
- if (entityHandler != null && !entityContext.isAttached(entityHandler)) {
- entityContext.attach(entityHandler, AttachedEntityStatus.CHANGED);
+ if (getEntityHandler() != null && !entityContext.isAttached(getEntityHandler())) {
+ entityContext.attach(getEntityHandler(), AttachedEntityStatus.CHANGED);
}
}
@@ -181,6 +181,6 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
@Override
public boolean isChanged() {
- return entityHandler == null ? false : entityHandler.isChanged();
+ return getEntityHandler() == null ? false : getEntityHandler().isChanged();
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
index 90a4d75..da9329d 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
@@ -154,7 +154,7 @@ class ContainerImpl implements Container {
EntityContainerFactory.getContext().detachAll();
}
- private void batch(
+ private AttachedEntityStatus batch(
final EntityInvocationHandler handler,
final CommonODataEntity entity,
final ODataChangeset changeset) {
@@ -162,20 +162,21 @@ class ContainerImpl implements Container {
switch (EntityContainerFactory.getContext().entityContext().getStatus(handler)) {
case NEW:
batchCreate(handler, entity, changeset);
- break;
+ return AttachedEntityStatus.NEW;
case CHANGED:
batchUpdate(handler, entity, changeset);
- break;
+ return AttachedEntityStatus.CHANGED;
case DELETED:
batchDelete(handler, entity, changeset);
- break;
+ return AttachedEntityStatus.DELETED;
default:
if (handler.isChanged()) {
batchUpdate(handler, entity, changeset);
}
+ return AttachedEntityStatus.CHANGED;
}
}
@@ -239,10 +240,10 @@ class ContainerImpl implements Container {
client.getServiceVersion().compareTo(ODataServiceVersion.V30) <= 0
? ((org.apache.olingo.client.api.v3.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(handler.getEntityURI(),
- org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
+ org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
: ((org.apache.olingo.client.api.v4.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(handler.getEntityURI(),
- org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
+ org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
req.setPrefer(new ODataPreferences(client.getServiceVersion()).returnContent());
@@ -265,10 +266,10 @@ class ContainerImpl implements Container {
client.getServiceVersion().compareTo(ODataServiceVersion.V30) <= 0
? ((org.apache.olingo.client.api.v3.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(uri,
- org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
+ org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
: ((org.apache.olingo.client.api.v4.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(uri,
- org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
+ org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
req.setPrefer(new ODataPreferences(client.getServiceVersion()).returnContent());
@@ -371,52 +372,53 @@ class ContainerImpl implements Container {
// insert into the batch
LOG.debug("{}: Insert '{}' into the batch", pos, handler);
- batch(handler, entity, changeset);
+ final AttachedEntityStatus processedStatus = batch(handler, entity, changeset);
items.put(handler, pos);
- int startingPos = pos;
+ if (processedStatus != AttachedEntityStatus.DELETED) {
+ int startingPos = pos;
+
+ if (handler.getEntity().isMediaEntity() && handler.isChanged()) {
+ // update media properties
+ if (!handler.getPropertyChanges().isEmpty()) {
+ final URI targetURI = currentStatus == AttachedEntityStatus.NEW
+ ? URI.create("$" + startingPos)
+ : URIUtils.getURI(factory.getServiceRoot(), handler.getEntity().getEditLink().toASCIIString());
+ batchUpdate(handler, targetURI, entity, changeset);
+ pos++;
+ items.put(handler, pos);
+ }
+
+ // update media content
+ if (handler.getStreamChanges() != null) {
+ final URI targetURI = currentStatus == AttachedEntityStatus.NEW
+ ? URI.create("$" + startingPos + "/$value")
+ : URIUtils.getURI(
+ factory.getServiceRoot(), handler.getEntity().getEditLink().toASCIIString() + "/$value");
- if (handler.getEntity().isMediaEntity()) {
+ batchUpdateMediaEntity(handler, targetURI, handler.getStreamChanges(), changeset);
- // update media properties
- if (!handler.getPropertyChanges().isEmpty()) {
- final URI targetURI = currentStatus == AttachedEntityStatus.NEW
- ? URI.create("$" + startingPos)
- : URIUtils.getURI(factory.getServiceRoot(), handler.getEntity().getEditLink().toASCIIString());
- batchUpdate(handler, targetURI, entity, changeset);
- pos++;
- items.put(handler, pos);
+ // update media info (use null key)
+ pos++;
+ items.put(null, pos);
+ }
}
- // update media content
- if (handler.getStreamChanges() != null) {
+ for (Map.Entry<String, InputStream> streamedChanges : handler.getStreamedPropertyChanges().entrySet()) {
final URI targetURI = currentStatus == AttachedEntityStatus.NEW
- ? URI.create("$" + startingPos + "/$value")
- : URIUtils.getURI(
- factory.getServiceRoot(), handler.getEntity().getEditLink().toASCIIString() + "/$value");
+ ? URI.create("$" + startingPos) : URIUtils.getURI(
+ factory.getServiceRoot(),
+ CoreUtils.getMediaEditLink(streamedChanges.getKey(), entity).toASCIIString());
- batchUpdateMediaEntity(handler, targetURI, handler.getStreamChanges(), changeset);
+ batchUpdateMediaResource(handler, targetURI, streamedChanges.getValue(), changeset);
// update media info (use null key)
pos++;
- items.put(null, pos);
+ items.put(handler, pos);
}
}
- for (Map.Entry<String, InputStream> streamedChanges : handler.getStreamedPropertyChanges().entrySet()) {
- final URI targetURI = currentStatus == AttachedEntityStatus.NEW
- ? URI.create("$" + startingPos) : URIUtils.getURI(
- factory.getServiceRoot(),
- CoreUtils.getMediaEditLink(streamedChanges.getKey(), entity).toASCIIString());
-
- batchUpdateMediaResource(handler, targetURI, streamedChanges.getValue(), changeset);
-
- // update media info (use null key)
- pos++;
- items.put(handler, pos);
- }
-
return pos;
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
index 361c140..6b1f08b 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
@@ -22,6 +22,7 @@ import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Proxy;
import java.lang.reflect.Type;
import java.net.URI;
@@ -121,9 +122,9 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
getUUID().getType(),
CoreUtils.getKey(client, typeRef, entity));
+ this.streamedPropertyChanges.clear();
this.propertyChanges.clear();
this.linkChanges.clear();
- this.streamedPropertyChanges.clear();
this.propertiesTag = 0;
this.linksTag = 0;
}
@@ -189,20 +190,24 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
@Override
protected Object getPropertyValue(final String name, final Type type) {
try {
- final CommonODataProperty property = getEntity().getProperty(name);
-
- Object res;
- if (propertyChanges.containsKey(name)) {
- res = propertyChanges.get(name);
+ if (!(type instanceof ParameterizedType) && (Class<?>) type == InputStream.class) {
+ return getStreamedProperty(name);
} else {
- res = CoreUtils.getValueFromProperty(client, property, type, this);
+ final CommonODataProperty property = getEntity().getProperty(name);
+
+ Object res;
+ if (propertyChanges.containsKey(name)) {
+ res = propertyChanges.get(name);
+ } else {
+ res = CoreUtils.getValueFromProperty(client, property, type, this);
- if (res != null) {
- addPropertyChanges(name, res);
+ if (res != null) {
+ chacheProperty(name, res);
+ }
}
- }
- return res;
+ return res;
+ }
} catch (Exception e) {
throw new IllegalArgumentException("Error getting value for property '" + name + "'", e);
}
@@ -235,7 +240,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
@Override
@SuppressWarnings("unchecked")
protected void setPropertyValue(final Property property, final Object value) {
- if (property.type().equalsIgnoreCase(EdmPrimitiveTypeKind.Stream.toString())) {
+ if (property.type().equalsIgnoreCase("Edm." + EdmPrimitiveTypeKind.Stream.toString())) {
setStreamedProperty(property, (InputStream) value);
} else {
addPropertyChanges(property.name(), value);
@@ -306,14 +311,15 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
return this.stream;
}
- public Object getStreamedProperty(final Property property) {
- InputStream res = streamedPropertyChanges.get(property.name());
+ public Object getStreamedProperty(final String name) {
+
+ InputStream res = streamedPropertyChanges.get(name);
try {
if (res == null) {
final URI link = URIUtils.getURI(
containerHandler.getFactory().getServiceRoot(),
- CoreUtils.getMediaEditLink(property.name(), getEntity()).toASCIIString());
+ CoreUtils.getMediaEditLink(name, getEntity()).toASCIIString());
final ODataMediaRequest req = client.getRetrieveRequestFactory().getMediaRequest(link);
res = req.execute().getBody();
@@ -328,7 +334,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
}
private void setStreamedProperty(final Property property, final InputStream input) {
- final Object obj = propertyChanges.get(property.name());
+ final Object obj = streamedPropertyChanges.get(property.name());
if (obj instanceof InputStream) {
IOUtils.closeQuietly((InputStream) obj);
}
@@ -347,7 +353,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
}
if (navPropValue != null) {
- addLinkChanges(property, navPropValue);
+ cacheLink(property, navPropValue);
}
return navPropValue;
@@ -355,6 +361,10 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
@Override
protected void addPropertyChanges(final String name, final Object value) {
+ propertyChanges.put(name, value);
+ }
+
+ protected void chacheProperty(final String name, final Object value) {
final int checkpoint = propertyChanges.hashCode();
propertyChanges.put(name, value);
updatePropertiesTag(checkpoint);
@@ -362,6 +372,10 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
@Override
protected void addLinkChanges(final NavigationProperty navProp, final Object value) {
+ linkChanges.put(navProp, value);
+ }
+
+ protected void cacheLink(final NavigationProperty navProp, final Object value) {
final int checkpoint = linkChanges.hashCode();
linkChanges.put(navProp, value);
updateLinksTag(checkpoint);
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
index 38dd4cc..3c4843a 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
@@ -426,7 +426,7 @@ public final class CoreUtils {
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {getter.getReturnType()},
ComplexInvocationHandler.getInstance(
- client, property.getName(), getter.getReturnType(), null));
+ client, property.getName(), getter.getReturnType(), null));
populate(client, complex, Property.class, property.getValue().asComplex().iterator());
setPropertyValue(bean, getter, complex);
@@ -451,7 +451,7 @@ public final class CoreUtils {
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {collItemClass},
ComplexInvocationHandler.getInstance(
- client, property.getName(), collItemClass, null));
+ client, property.getName(), collItemClass, null));
populate(client, collItem, Property.class, value.asComplex().iterator());
collection.add(collItem);
@@ -496,7 +496,7 @@ public final class CoreUtils {
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {internalRef},
ComplexInvocationHandler.getInstance(
- client, property.getValue().asComplex(), internalRef, entityHandler));
+ client, property.getValue().asComplex(), internalRef, entityHandler));
} else if (property.hasCollectionValue()) {
final ArrayList<Object> collection = new ArrayList<Object>();
@@ -511,7 +511,7 @@ public final class CoreUtils {
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {internalRef},
ComplexInvocationHandler.getInstance(
- client, value.asComplex(), internalRef, entityHandler));
+ client, value.asComplex(), internalRef, entityHandler));
collection.add(collItem);
}
@@ -560,8 +560,8 @@ public final class CoreUtils {
if (ns != null && ann != null) {
if (property.getValue().getTypeName().replaceAll("^Collection\\(", "").replaceAll("\\)$", "").equals(
new FullQualifiedName(ns.value(), annType.isAssignableFrom(EnumType.class)
- ? EnumType.class.cast(ann).name()
- : ComplexType.class.cast(ann).name()).toString())) {
+ ? EnumType.class.cast(ann).name()
+ : ComplexType.class.cast(ann).name()).toString())) {
return clazz;
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/it/demoV4/pom.xml
----------------------------------------------------------------------
diff --git a/fit/src/it/demoV4/pom.xml b/fit/src/it/demoV4/pom.xml
new file mode 100644
index 0000000..1ae42db
--- /dev/null
+++ b/fit/src/it/demoV4/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>pojogen-maven-plugin-v4test</artifactId>
+ <groupId>org.apache.olingo</groupId>
+ <version>@project.version@</version>
+ <name>${project.artifactId}</name>
+ <description>A simple IT verifying the basic use case of pojogen-maven-plugin.</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <artifactId>pojogen-maven-plugin</artifactId>
+ <groupId>org.apache.olingo</groupId>
+ <version>@project.version@</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <artifactId>olingo-client-proxy</artifactId>
+ <groupId>org.apache.olingo</groupId>
+ <version>@project.version@</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/generated-sources</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>pojogen-maven-plugin</artifactId>
+ <version>@project.version@</version>
+ <executions>
+ <execution>
+ <configuration>
+ <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
+ <serviceRootURL>http://localhost:9080/stub/StaticService/V40/Demo.svc</serviceRootURL>
+ <basePackage>org.apache.olingo.fit.proxy.v4.demo</basePackage>
+ </configuration>
+ <id>v4pojoGen</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>v4pojoGen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/it/demoV4/verify.groovy
----------------------------------------------------------------------
diff --git a/fit/src/it/demoV4/verify.groovy b/fit/src/it/demoV4/verify.groovy
new file mode 100644
index 0000000..02f0407
--- /dev/null
+++ b/fit/src/it/demoV4/verify.groovy
@@ -0,0 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+File basepkg = new File( basedir, "target/generated-sources/ojc-plugin/org/apache/olingo/fit/proxy/v4" );
+assert basepkg.isDirectory() && basepkg.listFiles().length>0;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
index 8056f28..4ccea54 100644
--- a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
+++ b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
@@ -116,7 +116,7 @@ public abstract class AbstractServices {
private static final Pattern REQUEST_PATTERN = Pattern.compile("(.*) (http://.*) HTTP/.*");
- private static final Pattern BATCH_REQUEST_REF_PATTERN = Pattern.compile("(.*) ([$].*) HTTP/.*");
+ private static final Pattern BATCH_REQUEST_REF_PATTERN = Pattern.compile("(.*) ([$]\\d+)(.*) HTTP/.*");
private static final Pattern REF_PATTERN = Pattern.compile("([$]\\d+)");
@@ -242,7 +242,7 @@ public abstract class AbstractServices {
return xml.createResponse(new ByteArrayInputStream(content.toByteArray()), null, Accept.JSON_FULLMETA);
} catch (Exception e) {
LOG.error("While creating StoredPI", e);
- return xml.createFaultResponse(Accept.JSON_FULLMETA.toString(version),e);
+ return xml.createFaultResponse(Accept.JSON_FULLMETA.toString(version), e);
}
}
@@ -284,7 +284,7 @@ public abstract class AbstractServices {
url = matcher.group(2);
method = matcher.group(1);
} else if (matcherRef.find()) {
- url = references.get(matcherRef.group(2));
+ url = references.get(matcherRef.group(2)) + matcherRef.group(3);
method = matcherRef.group(1);
} else {
url = null;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/main/java/org/apache/olingo/fit/V3Services.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/V3Services.java b/fit/src/main/java/org/apache/olingo/fit/V3Services.java
index 410fcad..0a0eb09 100644
--- a/fit/src/main/java/org/apache/olingo/fit/V3Services.java
+++ b/fit/src/main/java/org/apache/olingo/fit/V3Services.java
@@ -156,7 +156,7 @@ public class V3Services extends AbstractServices {
addChangesetItemIntro(chbos, lastContebtID, cboundary);
res = bodyPartRequest(new MimeBodyPart(part.getInputStream()), references);
- if (res.getStatus() >= 400) {
+ if (res==null || res.getStatus() >= 400) {
throw new Exception("Failure processing changeset");
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/main/java/org/apache/olingo/fit/V4Demo.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/V4Demo.java b/fit/src/main/java/org/apache/olingo/fit/V4Demo.java
index 2035a1f..8944962 100644
--- a/fit/src/main/java/org/apache/olingo/fit/V4Demo.java
+++ b/fit/src/main/java/org/apache/olingo/fit/V4Demo.java
@@ -48,17 +48,12 @@ import org.springframework.stereotype.Service;
@Service
@Path("/V40/Demo.svc")
-public class V4Demo {
-
- private final Metadata demoMetadata;
-
- private final V4Services services;
+public class V4Demo extends V4Services {
public V4Demo() throws Exception {
- this.demoMetadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).
+ super(new Metadata(FSManager.instance(ODataServiceVersion.V40).
readFile("demo" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
- Accept.XML), ODataServiceVersion.V40);
- this.services = new V4Services(this.demoMetadata);
+ Accept.XML), ODataServiceVersion.V40));
}
private Response replaceServiceName(final Response response) {
@@ -90,13 +85,15 @@ public class V4Demo {
@GET
@Path("/$metadata")
@Produces(MediaType.APPLICATION_XML)
+ @Override
public Response getMetadata() {
- return services.getMetadata(
+ return super.getMetadata(
"demo" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)));
}
@GET
@Path("/{entitySetName}({entityId})")
+ @Override
public Response getEntity(
@Context UriInfo uriInfo,
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
@@ -106,25 +103,27 @@ public class V4Demo {
@QueryParam("$expand") @DefaultValue(StringUtils.EMPTY) String expand,
@QueryParam("$select") @DefaultValue(StringUtils.EMPTY) String select) {
- return replaceServiceName(services.getEntityInternal(uriInfo.getRequestUri().toASCIIString(),
+ return replaceServiceName(super.getEntityInternal(uriInfo.getRequestUri().toASCIIString(),
accept, entitySetName, entityId, format, expand, select, false));
}
@GET
@Path("/{entitySetName}({entityId})/$value")
+ @Override
public Response getMediaEntity(
@Context UriInfo uriInfo,
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
@PathParam("entitySetName") String entitySetName,
@PathParam("entityId") String entityId) {
- return services.getMediaEntity(uriInfo, accept, entitySetName, entityId);
+ return super.getMediaEntity(uriInfo, accept, entitySetName, entityId);
}
@POST
@Path("/{entitySetName}")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_OCTET_STREAM})
+ @Override
public Response postNewEntity(
@Context UriInfo uriInfo,
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
@@ -133,13 +132,14 @@ public class V4Demo {
@PathParam("entitySetName") String entitySetName,
final String entity) {
- return replaceServiceName(services.postNewEntity(uriInfo, accept, contentType, prefer, entitySetName, entity));
+ return replaceServiceName(super.postNewEntity(uriInfo, accept, contentType, prefer, entitySetName, entity));
}
@PATCH
@Path("/{entitySetName}({entityId})")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
+ @Override
public Response patchEntity(
@Context UriInfo uriInfo,
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
@@ -151,13 +151,14 @@ public class V4Demo {
final String changes) {
return replaceServiceName(
- services.patchEntity(uriInfo, accept, contentType, prefer, ifMatch, entitySetName, entityId, changes));
+ super.patchEntity(uriInfo, accept, contentType, prefer, ifMatch, entitySetName, entityId, changes));
}
@PUT
@Produces({MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
@Consumes({MediaType.WILDCARD, MediaType.APPLICATION_OCTET_STREAM})
@Path("/{entitySetName}({entityId})/$value")
+ @Override
public Response replaceMediaEntity(
@Context UriInfo uriInfo,
@HeaderParam("Prefer") @DefaultValue(StringUtils.EMPTY) String prefer,
@@ -166,6 +167,6 @@ public class V4Demo {
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format,
String value) {
- return services.replaceMediaEntity(uriInfo, prefer, entitySetName, entityId, format, value);
+ return super.replaceMediaEntity(uriInfo, prefer, entitySetName, entityId, format, value);
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/main/java/org/apache/olingo/fit/V4Services.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/V4Services.java b/fit/src/main/java/org/apache/olingo/fit/V4Services.java
index 52d8cb6..efcd4e7 100644
--- a/fit/src/main/java/org/apache/olingo/fit/V4Services.java
+++ b/fit/src/main/java/org/apache/olingo/fit/V4Services.java
@@ -293,7 +293,7 @@ public class V4Services extends AbstractServices {
addChangesetItemIntro(chbos, lastContebtID, cboundary);
res = bodyPartRequest(new MimeBodyPart(part.getInputStream()), references);
- if (res.getStatus() >= 400) {
+ if (res==null || res.getStatus() >= 400) {
throw new Exception("Failure processing changeset");
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/main/java/org/apache/olingo/fit/utils/DataBinder.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/utils/DataBinder.java b/fit/src/main/java/org/apache/olingo/fit/utils/DataBinder.java
index 58e5772..f79b221 100644
--- a/fit/src/main/java/org/apache/olingo/fit/utils/DataBinder.java
+++ b/fit/src/main/java/org/apache/olingo/fit/utils/DataBinder.java
@@ -98,6 +98,28 @@ public class DataBinder {
jsonEntity.setBaseURI(atomEntity.getBaseURI() == null ? null : atomEntity.getBaseURI().toASCIIString());
jsonEntity.getOperations().addAll(atomEntity.getOperations());
+ for (Link link : atomEntity.getMediaEditLinks()) {
+ final Link jlink = new LinkImpl();
+ jlink.setHref(link.getHref());
+ jlink.setTitle(link.getTitle());
+ jlink.setType(link.getType());
+ jlink.setRel(link.getRel());
+
+ if (link.getInlineEntity() instanceof AtomEntityImpl) {
+ final Entity inlineEntity = link.getInlineEntity();
+ if (inlineEntity instanceof AtomEntityImpl) {
+ jlink.setInlineEntity(toJSONEntity((AtomEntityImpl) link.getInlineEntity()));
+ }
+ } else if (link.getInlineEntitySet() instanceof AtomEntitySetImpl) {
+ final EntitySet inlineEntitySet = link.getInlineEntitySet();
+ if (inlineEntitySet instanceof AtomEntitySetImpl) {
+ jlink.setInlineEntitySet(toJSONEntitySet((AtomEntitySetImpl) link.getInlineEntitySet()));
+ }
+ }
+
+ jsonEntity.getMediaEditLinks().add(jlink);
+ }
+
for (Link link : atomEntity.getNavigationLinks()) {
final Link jlink = new LinkImpl();
jlink.setHref(link.getHref());
@@ -126,7 +148,7 @@ public class DataBinder {
}
jsonEntity.getAnnotations().addAll(atomEntity.getAnnotations());
-
+
return jsonEntity;
}
@@ -136,6 +158,28 @@ public class DataBinder {
BeanUtils.copyProperties(jsonEntity, atomEntity, "baseURI", "properties", "links");
atomEntity.setBaseURI(jsonEntity.getBaseURI() == null ? null : jsonEntity.getBaseURI().toASCIIString());
+ for (Link link : jsonEntity.getMediaEditLinks()) {
+ final Link alink = new LinkImpl();
+ alink.setHref(link.getHref());
+ alink.setTitle(link.getTitle());
+ alink.setRel(link.getRel());
+ alink.setType(link.getType());
+
+ if (link.getInlineEntity() instanceof JSONEntityImpl) {
+ final Entity inlineEntity = link.getInlineEntity();
+ if (inlineEntity instanceof JSONEntityImpl) {
+ alink.setInlineEntity(toAtomEntity((JSONEntityImpl) link.getInlineEntity()));
+ }
+ } else if (link.getInlineEntitySet() instanceof JSONEntitySetImpl) {
+ final EntitySet inlineEntitySet = link.getInlineEntitySet();
+ if (inlineEntitySet instanceof JSONEntitySetImpl) {
+ alink.setInlineEntitySet(toAtomEntitySet((JSONEntitySetImpl) link.getInlineEntitySet()));
+ }
+ }
+
+ atomEntity.getMediaEditLinks().add(alink);
+ }
+
for (Link link : jsonEntity.getNavigationLinks()) {
final Link alink = new LinkImpl();
alink.setHref(link.getHref());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v3/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/MediaEntityTestITCase.java
new file mode 100644
index 0000000..366b5c3
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/MediaEntityTestITCase.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.proxy.v3;
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import org.apache.commons.io.IOUtils;
+import org.apache.olingo.ext.proxy.EntityContainerFactory;
+import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.Car;
+import org.junit.Test;
+
+/**
+ * This is the unit test class to check media entity retrieve operations.
+ */
+public class MediaEntityTestITCase extends AbstractTestITCase {
+
+ @Test
+ public void read() throws IOException {
+ final InputStream is = container.getCar().get(12).getStream();
+ assertNotNull(is);
+ IOUtils.closeQuietly(is);
+ }
+
+ @Test
+ public void updateReadStreamedProperty() throws IOException {
+ final String TO_BE_UPDATED = "buffered stream sample (" + System.currentTimeMillis() + ")";
+ final InputStream input = new ByteArrayInputStream(TO_BE_UPDATED.getBytes());
+
+ Car car = container.getCar().get(12);
+ car.setPhoto(input);
+
+ container.flush();
+
+ car = container.getCar().get(12);
+ final InputStream is = car.getPhoto();
+ assertEquals(TO_BE_UPDATED, IOUtils.toString(is));
+ IOUtils.closeQuietly(is);
+ }
+
+ @Test
+ public void update() throws IOException {
+ final Car car = container.getCar().get(14);
+ assertNotNull(car);
+
+ final String TO_BE_UPDATED = "buffered stream sample (" + System.currentTimeMillis() + ")";
+ InputStream input = IOUtils.toInputStream(TO_BE_UPDATED);
+
+ car.setStream(input);
+
+ container.flush();
+
+ input = container.getCar().get(14).getStream();
+ assertEquals(TO_BE_UPDATED, IOUtils.toString(input));
+ IOUtils.closeQuietly(input);
+ }
+
+ @Test
+ public void create() throws IOException {
+ Car car = container.getCar().newCar();
+
+ final String TO_BE_UPDATED = "buffered stream sample (" + System.currentTimeMillis() + ")";
+ InputStream input = IOUtils.toInputStream(TO_BE_UPDATED);
+
+ final String DESC = "DESC - " + System.currentTimeMillis();
+ car.setStream(input);
+ car.setDescription(DESC);
+
+ container.flush();
+
+ int key = car.getVIN();
+ assertTrue(key > 0);
+
+ EntityContainerFactory.getContext().detachAll();
+
+ car = container.getCar().get(key);
+ assertEquals(DESC, car.getDescription());
+ input = car.getStream();
+ assertEquals(TO_BE_UPDATED, IOUtils.toString(input));
+ IOUtils.closeQuietly(input);
+
+ container.getCar().delete(key);
+ container.flush();
+
+ assertNull(container.getCar().get(key));
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/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 baa4128..4efc7d0 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
@@ -49,6 +49,8 @@ public abstract class AbstractTestITCase {
protected static String testStaticServiceRootURL;
+ protected static String testDemoServiceRootURL;
+
protected static String testKeyAsSegmentServiceRootURL;
protected static String testActionOverloadingServiceRootURL;
@@ -68,6 +70,7 @@ public abstract class AbstractTestITCase {
@BeforeClass
public static void setUpODataServiceRoot() throws IOException {
testStaticServiceRootURL = "http://localhost:9080/stub/StaticService/V40/Static.svc";
+ testDemoServiceRootURL = "http://localhost:9080/stub/StaticService/V40/Demo.svc";
testKeyAsSegmentServiceRootURL = "http://localhost:9080/stub/StaticService/V40/KeyAsSegment.svc";
testActionOverloadingServiceRootURL = "http://localhost:9080/stub/StaticService/V40/ActionOverloading.svc";
testOpenTypeServiceRootURL = "http://localhost:9080/stub/StaticService/V40/OpenType.svc";
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/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
new file mode 100644
index 0000000..ad78bdd
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.proxy.v4;
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Calendar;
+import java.util.UUID;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.commons.api.format.ContentType;
+import org.apache.olingo.ext.proxy.EntityContainerFactory;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.DemoService;
+import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This is the unit test class to check media entity retrieve operations.
+ */
+public class MediaEntityTestITCase extends AbstractTestITCase {
+
+ private static DemoService dcontainer;
+
+ @BeforeClass
+ public static void initContainer() {
+ final EntityContainerFactory<EdmEnabledODataClient> otcontainerFactory =
+ EntityContainerFactory.getV4(testDemoServiceRootURL);
+ otcontainerFactory.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
+ dcontainer = otcontainerFactory.getEntityContainer(DemoService.class);
+ assertNotNull(dcontainer);
+ }
+
+ @Test
+ public void read() throws IOException {
+ final UUID uuid = UUID.fromString("f89dee73-af9f-4cd4-b330-db93c25ff3c7");
+
+ final Advertisement adv = dcontainer.getAdvertisements().get(uuid);
+ assertTrue(adv.getAirDate() instanceof Calendar);
+
+ final InputStream is = adv.getStream();
+ assertNotNull(is);
+ IOUtils.closeQuietly(is);
+ }
+
+ @Test
+ public void update() throws IOException {
+ final UUID uuid = UUID.fromString("f89dee73-af9f-4cd4-b330-db93c25ff3c7");
+
+ final Advertisement adv = dcontainer.getAdvertisements().get(uuid);
+ assertNotNull(adv);
+
+ final String random = RandomStringUtils.random(124, "abcdefghijklmnopqrstuvwxyz");
+
+ adv.setStream(IOUtils.toInputStream(random));
+
+ dcontainer.flush();
+
+ assertEquals(random, IOUtils.toString(dcontainer.getAdvertisements().get(uuid).getStream()));
+ }
+
+ @Test
+ public void create() throws IOException {
+ final String random = RandomStringUtils.random(124, "abcdefghijklmnopqrstuvwxyz");
+
+ final Advertisement adv = dcontainer.getAdvertisements().newAdvertisement();
+ adv.setStream(IOUtils.toInputStream(random));
+ adv.setAirDate(Calendar.getInstance());
+
+ dcontainer.flush();
+
+ final UUID uuid = adv.getID();
+ entityContext.detachAll();
+
+ assertEquals(random, IOUtils.toString(dcontainer.getAdvertisements().get(uuid).getStream()));
+
+ entityContext.detachAll();
+
+ dcontainer.getAdvertisements().delete(uuid);
+ dcontainer.flush();
+
+ assertNull(dcontainer.getAdvertisements().get(uuid));
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/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
new file mode 100644
index 0000000..c03410d
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Advertisements.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "Advertisements")
+public interface Advertisements
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement, 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/946356fb/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
new file mode 100644
index 0000000..5f78c65
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Categories.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "Categories")
+public interface Categories
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Category, 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/946356fb/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
new file mode 100644
index 0000000..88c555d
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/DemoService.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.annotations.Namespace;
+import org.apache.olingo.ext.proxy.api.annotations.EntityContainer;
+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.Container;
+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;
+
+@Namespace("ODataDemo")
+@EntityContainer(name = "DemoService",
+ namespace = "ODataDemo",
+ isDefaultEntityContainer = true)
+public interface DemoService extends Container {
+
+ Products getProducts();
+ Advertisements getAdvertisements();
+ Persons getPersons();
+ Categories getCategories();
+ PersonDetails getPersonDetails();
+ Suppliers getSuppliers();
+ ProductDetails getProductDetails();
+
+
+
+ Operations operations();
+
+ public interface Operations {
+
+ @Operation(name = "IncreaseSalaries",
+ type = OperationType.ACTION)
+ void increaseSalaries(
+ @Parameter(name = "percentage", type = "Edm.Int32", nullable = false) Integer percentage
+ );
+
+ }
+
+ ComplexFactory complexFactory();
+
+ interface ComplexFactory {
+ @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/946356fb/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
new file mode 100644
index 0000000..fb2e905
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/PersonDetails.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "PersonDetails")
+public interface PersonDetails
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail, 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/946356fb/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
new file mode 100644
index 0000000..1e38cb3
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Persons.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "Persons")
+public interface Persons
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person, 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/946356fb/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
new file mode 100644
index 0000000..5031efb
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/ProductDetails.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "ProductDetails")
+public interface ProductDetails
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail, 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/946356fb/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
new file mode 100644
index 0000000..18a4e77
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Products.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "Products")
+public interface Products
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product, 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/946356fb/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
new file mode 100644
index 0000000..53d4403
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/Suppliers.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.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;
+
+
+@EntitySet(name = "Suppliers")
+public interface Suppliers
+ extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier, 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/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/package-info.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/package-info.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/package-info.java
new file mode 100644
index 0000000..1d277f0
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo;
+
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/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
new file mode 100644
index 0000000..34ba0ec
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Address.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.ext.proxy.api.annotations.Namespace;
+import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
+import org.apache.olingo.ext.proxy.api.annotations.Property;
+import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
+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;
+
+
+@Namespace("ODataDemo")
+@ComplexType(name = "Address",
+ isOpenType = false,
+ isAbstract = false)
+public interface Address
+ extends Serializable {
+
+
+ @Property(name = "Street",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ String getStreet();
+
+ void setStreet(String _street);
+
+
+
+ @Property(name = "City",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ String getCity();
+
+ void setCity(String _city);
+
+
+
+ @Property(name = "State",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ String getState();
+
+ void setState(String _state);
+
+
+
+ @Property(name = "ZipCode",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ String getZipCode();
+
+ void setZipCode(String _zipCode);
+
+
+
+ @Property(name = "Country",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ String getCountry();
+
+ void setCountry(String _country);
+
+
+
+
+}
[2/3] [OLINGO-260] provided media entity integration tests on proxy
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/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
new file mode 100644
index 0000000..9612afb
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Advertisement.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Advertisement",
+ openType = false,
+ hasStream = true,
+ isAbstract = false)
+public interface Advertisement
+ extends Serializable {
+
+
+ @Key
+ @Property(name = "ID",
+ type = "Edm.Guid",
+ 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)
+ UUID getID();
+
+ void setID(UUID _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+ @Property(name = "AirDate",
+ type = "Edm.DateTimeOffset",
+ 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)
+ Calendar getAirDate();
+
+ void setAirDate(Calendar _airDate);
+
+
+
+ @NavigationProperty(name = "FeaturedProduct",
+ type = "ODataDemo.FeaturedProduct",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Products",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.FeaturedProduct getFeaturedProduct();
+
+ void setFeaturedProduct(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.FeaturedProduct _featuredProduct);
+
+ void setStream(java.io.InputStream stream);
+
+ java.io.InputStream getStream();
+
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/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
new file mode 100644
index 0000000..87a90ef
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/AdvertisementCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface AdvertisementCollection extends AbstractEntityCollection<Advertisement> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Category.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Category.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Category.java
new file mode 100644
index 0000000..4dd5fef
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Category.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Category",
+ openType = true,
+ hasStream = false,
+ isAbstract = false)
+public interface Category
+ extends AbstractOpenType {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+
+ @NavigationProperty(name = "Products",
+ type = "ODataDemo.Product",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Products",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection getProducts();
+
+ void setProducts(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductCollection _products);
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CategoryCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CategoryCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CategoryCollection.java
new file mode 100644
index 0000000..2800ebe
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CategoryCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface CategoryCollection extends AbstractEntityCollection<Category> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Customer.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Customer.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Customer.java
new file mode 100644
index 0000000..ef79053
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Customer.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Customer",
+ openType = false,
+ hasStream = false,
+ isAbstract = false,
+ baseType = "ODataDemo.Person")
+public interface Customer
+ extends org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+ @Property(name = "TotalExpense",
+ type = "Edm.Decimal",
+ 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)
+ BigDecimal getTotalExpense();
+
+ void setTotalExpense(BigDecimal _totalExpense);
+
+
+
+ @NavigationProperty(name = "PersonDetail",
+ type = "ODataDemo.PersonDetail",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "PersonDetails",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail getPersonDetail();
+
+ void setPersonDetail(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail _personDetail);
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CustomerCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CustomerCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CustomerCollection.java
new file mode 100644
index 0000000..1a18681
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/CustomerCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface CustomerCollection extends AbstractEntityCollection<Customer> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Employee.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Employee.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Employee.java
new file mode 100644
index 0000000..7150978
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Employee.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Employee",
+ openType = false,
+ hasStream = false,
+ isAbstract = false,
+ baseType = "ODataDemo.Person")
+public interface Employee
+ extends org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+ @Property(name = "EmployeeID",
+ type = "Edm.Int64",
+ 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)
+ Long getEmployeeID();
+
+ void setEmployeeID(Long _employeeID);
+
+
+ @Property(name = "HireDate",
+ type = "Edm.DateTimeOffset",
+ 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)
+ Calendar getHireDate();
+
+ void setHireDate(Calendar _hireDate);
+
+
+ @Property(name = "Salary",
+ type = "Edm.Single",
+ 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)
+ Float getSalary();
+
+ void setSalary(Float _salary);
+
+
+
+ @NavigationProperty(name = "PersonDetail",
+ type = "ODataDemo.PersonDetail",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "PersonDetails",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail getPersonDetail();
+
+ void setPersonDetail(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail _personDetail);
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/EmployeeCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/EmployeeCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/EmployeeCollection.java
new file mode 100644
index 0000000..1a94d83
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/EmployeeCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface EmployeeCollection extends AbstractEntityCollection<Employee> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProduct.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProduct.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProduct.java
new file mode 100644
index 0000000..2987f70
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProduct.java
@@ -0,0 +1,276 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "FeaturedProduct",
+ openType = false,
+ hasStream = false,
+ isAbstract = false,
+ baseType = "ODataDemo.Product")
+public interface FeaturedProduct
+ extends org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+ @Property(name = "Description",
+ 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)
+ String getDescription();
+
+ void setDescription(String _description);
+
+
+ @Property(name = "ReleaseDate",
+ type = "Edm.DateTimeOffset",
+ 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)
+ Calendar getReleaseDate();
+
+ void setReleaseDate(Calendar _releaseDate);
+
+
+ @Property(name = "DiscontinuedDate",
+ type = "Edm.DateTimeOffset",
+ 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)
+ Calendar getDiscontinuedDate();
+
+ void setDiscontinuedDate(Calendar _discontinuedDate);
+
+
+ @Property(name = "Rating",
+ type = "Edm.Int16",
+ 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)
+ Short getRating();
+
+ void setRating(Short _rating);
+
+
+ @Property(name = "Price",
+ type = "Edm.Double",
+ 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)
+ Double getPrice();
+
+ void setPrice(Double _price);
+
+
+
+ @NavigationProperty(name = "Categories",
+ type = "ODataDemo.Category",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Categories",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection getCategories();
+
+ void setCategories(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection _categories);
+
+ @NavigationProperty(name = "Supplier",
+ type = "ODataDemo.Supplier",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Suppliers",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier getSupplier();
+
+ void setSupplier(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier _supplier);
+
+ @NavigationProperty(name = "ProductDetail",
+ type = "ODataDemo.ProductDetail",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "ProductDetails",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail getProductDetail();
+
+ void setProductDetail(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail _productDetail);
+
+ @NavigationProperty(name = "Advertisement",
+ type = "ODataDemo.Advertisement",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Advertisements",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement getAdvertisement();
+
+ void setAdvertisement(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Advertisement _advertisement);
+
+
+ @Override
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product.Operations{
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProductCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProductCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProductCollection.java
new file mode 100644
index 0000000..d2da736
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/FeaturedProductCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface FeaturedProductCollection extends AbstractEntityCollection<FeaturedProduct> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Person.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Person.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Person.java
new file mode 100644
index 0000000..c5175de
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Person.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Person",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface Person
+ extends Serializable {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+
+ @NavigationProperty(name = "PersonDetail",
+ type = "ODataDemo.PersonDetail",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "PersonDetails",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail getPersonDetail();
+
+ void setPersonDetail(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail _personDetail);
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonCollection.java
new file mode 100644
index 0000000..6399b5e
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface PersonCollection extends AbstractEntityCollection<Person> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetail.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetail.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetail.java
new file mode 100644
index 0000000..c1bf459
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetail.java
@@ -0,0 +1,224 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "PersonDetail",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface PersonDetail
+ extends Serializable {
+
+
+ @Key
+ @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)
+ Integer getPersonID();
+
+ void setPersonID(Integer _personID);
+
+
+ @Property(name = "Age",
+ type = "Edm.Byte",
+ 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)
+ Short getAge();
+
+ void setAge(Short _age);
+
+
+ @Property(name = "Gender",
+ 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)
+ Boolean getGender();
+
+ void setGender(Boolean _gender);
+
+
+ @Property(name = "Phone",
+ 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)
+ String getPhone();
+
+ void setPhone(String _phone);
+
+
+ @Property(name = "Address",
+ type = "ODataDemo.Address",
+ 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)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Address getAddress();
+
+ void setAddress(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Address _address);
+
+
+ @Property(name = "Photo",
+ type = "Edm.Stream",
+ 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.io.InputStream getPhoto();
+
+ void setPhoto(java.io.InputStream _photo);
+
+
+
+ @NavigationProperty(name = "Person",
+ type = "ODataDemo.Person",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Persons",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person getPerson();
+
+ void setPerson(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Person _person);
+
+
+
+ ComplexFactory factory();
+
+ interface ComplexFactory {
+ @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/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetailCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetailCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetailCollection.java
new file mode 100644
index 0000000..12ad8c1
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/PersonDetailCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface PersonDetailCollection extends AbstractEntityCollection<PersonDetail> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Product.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Product.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Product.java
new file mode 100644
index 0000000..296b40a
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/Product.java
@@ -0,0 +1,271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "Product",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface Product
+ extends Serializable {
+
+
+ @Key
+ @Property(name = "ID",
+ 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)
+ Integer getID();
+
+ void setID(Integer _iD);
+
+
+ @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)
+ String getName();
+
+ void setName(String _name);
+
+
+ @Property(name = "Description",
+ 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)
+ String getDescription();
+
+ void setDescription(String _description);
+
+
+ @Property(name = "ReleaseDate",
+ type = "Edm.DateTimeOffset",
+ 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)
+ Calendar getReleaseDate();
+
+ void setReleaseDate(Calendar _releaseDate);
+
+
+ @Property(name = "DiscontinuedDate",
+ type = "Edm.DateTimeOffset",
+ 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)
+ Calendar getDiscontinuedDate();
+
+ void setDiscontinuedDate(Calendar _discontinuedDate);
+
+
+ @Property(name = "Rating",
+ type = "Edm.Int16",
+ 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)
+ Short getRating();
+
+ void setRating(Short _rating);
+
+
+ @Property(name = "Price",
+ type = "Edm.Double",
+ 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)
+ Double getPrice();
+
+ void setPrice(Double _price);
+
+
+
+ @NavigationProperty(name = "Categories",
+ type = "ODataDemo.Category",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Categories",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection getCategories();
+
+ void setCategories(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.CategoryCollection _categories);
+
+ @NavigationProperty(name = "Supplier",
+ type = "ODataDemo.Supplier",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Suppliers",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier getSupplier();
+
+ void setSupplier(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Supplier _supplier);
+
+ @NavigationProperty(name = "ProductDetail",
+ type = "ODataDemo.ProductDetail",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "ProductDetails",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail getProductDetail();
+
+ void setProductDetail(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.ProductDetail _productDetail);
+
+
+ Operations operations();
+
+ interface Operations {
+
+ @Operation(name = "Discount",
+ type = OperationType.ACTION,
+ returnType = "Edm.Double")
+ Double discount(
+ @Parameter(name = "discountPercentage", type = "Edm.Int32", nullable = false) Integer discountPercentage
+ );
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductCollection.java
new file mode 100644
index 0000000..e18a1e3
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductCollection.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
+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.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;
+
+public interface ProductCollection extends AbstractEntityCollection<Product> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/946356fb/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetail.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetail.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetail.java
new file mode 100644
index 0000000..71ec682
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/odatademo/types/ProductDetail.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.olingo.fit.proxy.v4.demo.odatademo.types;
+
+import org.apache.olingo.client.api.http.HttpMethod;
+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.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.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+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;
+
+
+@Namespace("ODataDemo")
+@EntityType(name = "ProductDetail",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface ProductDetail
+ extends Serializable {
+
+
+ @Key
+ @Property(name = "ProductID",
+ 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)
+ Integer getProductID();
+
+ void setProductID(Integer _productID);
+
+
+ @Property(name = "Details",
+ 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)
+ String getDetails();
+
+ void setDetails(String _details);
+
+
+
+ @NavigationProperty(name = "Product",
+ type = "ODataDemo.Product",
+ targetSchema = "ODataDemo",
+ targetContainer = "DemoService",
+ targetEntitySet = "Products",
+ containsTarget = false)
+ org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product getProduct();
+
+ void setProduct(org.apache.olingo.fit.proxy.v4.demo.odatademo.types.Product _product);
+
+
+
+}