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/06 10:45:01 UTC

[4/4] git commit: [OLINGO-261] providing basics for pojo generator and proxy annotations

[OLINGO-261] providing basics for pojo generator and proxy annotations


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/f02d9a07
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/f02d9a07
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/f02d9a07

Branch: refs/heads/master
Commit: f02d9a07e46b5ec336f33c2dfba3d7f384279576
Parents: dda7577
Author: fmartelli <fa...@gmail.com>
Authored: Tue May 6 10:44:38 2014 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Tue May 6 10:44:38 2014 +0200

----------------------------------------------------------------------
 ext/client-proxy/pom.xml                        |  76 ++++
 .../olingo/ext/proxy/api/AbstractContainer.java |  32 ++
 .../ext/proxy/api/AbstractEntityCollection.java |  25 ++
 .../olingo/ext/proxy/api/AbstractEntityKey.java |  54 +++
 .../olingo/ext/proxy/api/AbstractEntitySet.java | 108 +++++
 .../olingo/ext/proxy/api/AbstractOpenType.java  |  31 ++
 .../olingo/ext/proxy/api/NoResultException.java |  35 ++
 .../ext/proxy/api/NonUniqueResultException.java |  35 ++
 .../olingo/ext/proxy/api/OperationType.java     |  40 ++
 .../org/apache/olingo/ext/proxy/api/Query.java  | 128 ++++++
 .../org/apache/olingo/ext/proxy/api/Sort.java   |  65 +++
 .../ext/proxy/api/annotations/ComplexType.java  |  42 ++
 .../ext/proxy/api/annotations/CompoundKey.java  |  32 ++
 .../api/annotations/CompoundKeyElement.java     |  38 ++
 .../proxy/api/annotations/EntityContainer.java  |  36 ++
 .../ext/proxy/api/annotations/EntitySet.java    |  38 ++
 .../ext/proxy/api/annotations/EntityType.java   |  44 ++
 .../ext/proxy/api/annotations/EnumType.java     |  39 ++
 .../olingo/ext/proxy/api/annotations/Key.java   |  34 ++
 .../ext/proxy/api/annotations/KeyClass.java     |  39 ++
 .../ext/proxy/api/annotations/KeyRef.java       |  34 ++
 .../ext/proxy/api/annotations/Namespace.java    |  36 ++
 .../api/annotations/NavigationProperty.java     |  42 ++
 .../ext/proxy/api/annotations/Operation.java    |  62 +++
 .../ext/proxy/api/annotations/Parameter.java    |  50 +++
 .../ext/proxy/api/annotations/Property.java     |  76 ++++
 .../api/annotations/ReferentialConstraint.java  |  42 ++
 .../ext/proxy/api/annotations/RowType.java      |  32 ++
 .../ext/proxy/api/annotations/Singleton.java    |  35 ++
 ext/pojogen-maven-plugin/pom.xml                | 129 ++++++
 .../src/it/actionOverloadingService/pom.xml     |  92 +++++
 .../it/actionOverloadingService/verify.groovy   |  20 +
 .../src/it/defaultService/pom.xml               |  92 +++++
 .../src/it/defaultService/verify.groovy         |  20 +
 .../src/it/keyAsSegmentService/pom.xml          |  92 +++++
 .../src/it/keyAsSegmentService/verify.groovy    |  20 +
 .../src/it/northwind/pom.xml                    |  92 +++++
 .../src/it/northwind/verify.groovy              |  20 +
 .../src/it/odataWriterDefaultService/pom.xml    |  92 +++++
 .../it/odataWriterDefaultService/verify.groovy  |  20 +
 .../src/it/openTypeService/pom.xml              |  92 +++++
 .../src/it/openTypeService/verify.groovy        |  20 +
 .../src/it/primitiveKeysService/pom.xml         |  92 +++++
 .../src/it/primitiveKeysService/verify.groovy   |  20 +
 .../src/it/staticServiceV3/pom.xml              |  92 +++++
 .../src/it/staticServiceV3/verify.groovy        |  20 +
 .../src/it/staticServiceV4/pom.xml              |  92 +++++
 .../src/it/staticServiceV4/verify.groovy        |  20 +
 .../ext/pojogen/AbstractMetadataMojo.java       | 161 ++++++++
 .../olingo/ext/pojogen/AbstractUtility.java     | 411 +++++++++++++++++++
 .../ext/pojogen/NavPropertyBindingDetails.java  | 141 +++++++
 .../ext/pojogen/NavPropertyContainsTarget.java  |  34 ++
 .../olingo/ext/pojogen/V3MetadataMojo.java      | 184 +++++++++
 .../apache/olingo/ext/pojogen/V3Utility.java    |  29 ++
 .../olingo/ext/pojogen/V4MetadataMojo.java      | 192 +++++++++
 .../apache/olingo/ext/pojogen/V4Utility.java    |  29 ++
 .../src/main/resources/complexType.vm           |  48 +++
 .../src/main/resources/container.vm             | 107 +++++
 .../src/main/resources/entityCollection.vm      |  96 +++++
 .../src/main/resources/entitySet.vm             |  65 +++
 .../src/main/resources/entityType.vm            | 169 ++++++++
 .../src/main/resources/entityTypeKey.vm         |  69 ++++
 .../src/main/resources/enumType.vm              |  56 +++
 .../src/main/resources/package-info.vm          |  20 +
 .../src/main/resources/services.vm              |  21 +
 .../src/main/resources/singleton.vm             |  48 +++
 .../src/main/resources/v30/complexType.vm       |  30 ++
 .../src/main/resources/v30/container.vm         |  19 +
 .../src/main/resources/v30/entitySet.vm         |  19 +
 .../src/main/resources/v40/complexType.vm       |  60 +++
 .../src/main/resources/v40/container.vm         |  22 +
 .../src/main/resources/v40/entitySet.vm         |  19 +
 .../src/main/resources/v40/singleton.vm         |  36 ++
 ext/pom.xml                                     |   2 +
 fit/pom.xml                                     |  29 ++
 fit/src/it/staticServiceV3/pom.xml              |  93 +++++
 fit/src/it/staticServiceV3/verify.groovy        |  20 +
 fit/src/it/staticServiceV4/pom.xml              |  93 +++++
 fit/src/it/staticServiceV4/verify.groovy        |  20 +
 fit/src/main/resources/V40/metadata.xml         |   1 +
 .../fit/v3/ActionOverloadingTestITCase.java     | 104 +++--
 .../client/core/edm/EdmBindingTargetImpl.java   |  40 --
 .../client/core/edm/EdmEntityContainerImpl.java |  28 +-
 .../client/core/edm/EdmOperationImpl.java       |   8 +-
 .../olingo/client/core/edm/EdmSchemaImpl.java   |   3 +-
 .../olingo/client/core/v3/MetadataTest.java     |   4 +
 .../olingo/client/core/v4/MetadataTest.java     |   8 +-
 .../commons/api/edm/EdmEntityContainer.java     |   1 -
 .../olingo/commons/core/edm/AbstractEdm.java    |  41 +-
 .../core/edm/AbstractEdmBindingTarget.java      |  39 ++
 .../core/edm/AbstractEdmEntityContainer.java    |  17 +-
 .../core/edm/AbstractEdmNavigationProperty.java |   1 +
 .../olingo/commons/core/edm/EdmTypeInfo.java    |   3 -
 .../commons/core/edm/EdmImplCachingTest.java    |  13 +-
 .../core/edm/provider/EdmBindingTargetImpl.java |  39 --
 pom.xml                                         |  30 +-
 96 files changed, 5058 insertions(+), 181 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/pom.xml
----------------------------------------------------------------------
diff --git a/ext/client-proxy/pom.xml b/ext/client-proxy/pom.xml
new file mode 100644
index 0000000..39e742b
--- /dev/null
+++ b/ext/client-proxy/pom.xml
@@ -0,0 +1,76 @@
+<?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/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>client-proxy</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+  <description>Java client API for OData services: Proxy.</description>
+  
+  <parent>
+    <groupId>org.apache.olingo</groupId>
+    <artifactId>olingo-ext</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <properties>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.olingo</groupId>
+      <artifactId>olingo-client-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-beanutils</groupId>
+      <artifactId>commons-beanutils-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+     
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractContainer.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractContainer.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractContainer.java
new file mode 100644
index 0000000..e062f02
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractContainer.java
@@ -0,0 +1,32 @@
+/*
+ * 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.ext.proxy.api;
+
+import java.io.Serializable;
+
+/**
+ * Interface for container operations.
+ */
+public abstract interface AbstractContainer extends Serializable {
+
+  /**
+   * Flushes all pending changes to the OData service.
+   */
+  void flush();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityCollection.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityCollection.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityCollection.java
new file mode 100644
index 0000000..3dc3719
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityCollection.java
@@ -0,0 +1,25 @@
+/*
+ * 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.ext.proxy.api;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+public abstract interface AbstractEntityCollection<T extends Serializable> extends Collection<T>, Serializable {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityKey.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityKey.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityKey.java
new file mode 100644
index 0000000..8740d07
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntityKey.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.ext.proxy.api;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public abstract class AbstractEntityKey implements Serializable {
+
+  private static final long serialVersionUID = 1662634743346775238L;
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public boolean equals(final Object obj) {
+    return EqualsBuilder.reflectionEquals(this, obj);
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public int hashCode() {
+    return HashCodeBuilder.reflectionHashCode(this);
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public String toString() {
+    return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntitySet.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntitySet.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntitySet.java
new file mode 100644
index 0000000..b4df7c9
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractEntitySet.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.ext.proxy.api;
+
+import java.io.Serializable;
+
+/**
+ * Interface for synchronous CRUD operations on an EntitySet.
+ */
+public abstract interface AbstractEntitySet<
+        T extends Serializable, KEY extends Serializable, EC extends AbstractEntityCollection<T>>
+        extends Iterable<T>, Serializable {
+
+  /**
+   * Returns whether an entity with the given id exists.
+   *
+   * @param key must not be null
+   * @return true if an entity with the given id exists, false otherwise
+   * @throws IllegalArgumentException in case the given key is null
+   */
+  Boolean exists(KEY key) throws IllegalArgumentException;
+
+  /**
+   * Retrieves an entity by its key.
+   *
+   * @param key must not be null
+   * @return the entity with the given id or null if none found
+   * @throws IllegalArgumentException in case the given key is null
+   */
+  T get(KEY key) throws IllegalArgumentException;
+
+  /**
+   * Retrieves an entity by its key, considering polymorphism.
+   *
+   * @param key must not be null
+   * @param reference entity class to be returned
+   * @return the entity with the given id or null if none found
+   * @throws IllegalArgumentException in case the given key is null
+   */
+  <S extends T> S get(KEY key, Class<S> reference) throws IllegalArgumentException;
+
+  /**
+   * Returns the number of entities available.
+   *
+   * @return the number of entities
+   */
+  Long count();
+
+  /**
+   * Returns all instances.
+   *
+   * @return all entities
+   */
+  EC getAll();
+
+  /**
+   * Returns all instances of the given subtype.
+   *
+   * @param reference entity collection class to be returned
+   * @return all entities of the given subtype
+   */
+  <S extends T, SEC extends AbstractEntityCollection<S>> SEC getAll(Class<SEC> reference);
+
+  /**
+   * Deletes the entity with the given key.
+   *
+   * @param key must not be null
+   * @throws IllegalArgumentException in case the given key is null
+   */
+  void delete(KEY key) throws IllegalArgumentException;
+
+  /**
+   * Deletes the given entities in a batch.
+   *
+   * @param entities to be deleted
+   */
+  <S extends T> void delete(Iterable<S> entities);
+
+  /**
+   * Create an instance of <tt>Query</tt>.
+   *
+   * @return the new query instance
+   */
+  Query<T, EC> createQuery();
+
+  /**
+   * Create an instance of <tt>Query</tt>.
+   *
+   * @return the new query instance
+   */
+  <S extends T, SEC extends AbstractEntityCollection<S>> Query<S, SEC> createQuery(Class<SEC> reference);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
new file mode 100644
index 0000000..4b200b4
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
@@ -0,0 +1,31 @@
+/*
+ * 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.ext.proxy.api;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+public abstract interface AbstractOpenType extends Serializable {
+
+  void addAdditionalProperty(String name, Object value);
+
+  Object getAdditionalProperty(String name);
+
+  Collection<String> getAdditionalPropertyNames();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NoResultException.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NoResultException.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NoResultException.java
new file mode 100644
index 0000000..da76bf0
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NoResultException.java
@@ -0,0 +1,35 @@
+/*
+ * 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.ext.proxy.api;
+
+/**
+ * Thrown when <tt>Query.getSingleResult()</tt> or <tt>EntityQuery.getSingleResult()</tt> is executed on a query and
+ * there is no result to return.
+ *
+ * @see Query#getSingleResult()
+ * @see EntityQuery#getSingleResult()
+ */
+public class NoResultException extends RuntimeException {
+
+  private static final long serialVersionUID = -6643642637364303053L;
+
+  public NoResultException() {
+    super();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NonUniqueResultException.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NonUniqueResultException.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NonUniqueResultException.java
new file mode 100644
index 0000000..bb5737f
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/NonUniqueResultException.java
@@ -0,0 +1,35 @@
+/*
+ * 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.ext.proxy.api;
+
+/**
+ * Thrown when <tt>Query.getSingleResult()</tt> or <tt>EntityQuery.getSingleResult()</tt> is executed on a query and
+ * there is more than one result from the query.
+ *
+ * @see Query#getSingleResult()
+ * @see EntityQuery#getSingleResult()
+ */
+public class NonUniqueResultException extends RuntimeException {
+
+  private static final long serialVersionUID = 4444551737338550185L;
+
+  public NonUniqueResultException() {
+    super();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/OperationType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/OperationType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/OperationType.java
new file mode 100644
index 0000000..47c69a5
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/OperationType.java
@@ -0,0 +1,40 @@
+/*
+ * 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.ext.proxy.api;
+
+public enum OperationType {
+
+  /**
+   * Function or action (not specified explicitly).
+   * <br />
+   * OData V3 only.
+   */
+  LEGACY,
+  /**
+   * Functions MUST NOT have observable side effects and MUST return a single instance or a collection of instances of
+   * any type. Functions MAY be composable.
+   */
+  FUNCTION,
+  /**
+   * Actions MAY have observable side effects and MAY return a single instance or a collection of instances of any type.
+   * Actions cannot be composed with additional path segments.
+   */
+  ACTION;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Query.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Query.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Query.java
new file mode 100644
index 0000000..ec7b944
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Query.java
@@ -0,0 +1,128 @@
+/*
+ * 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.ext.proxy.api;
+
+import java.io.Serializable;
+import org.apache.olingo.client.api.uri.URIFilter;
+
+/**
+ * Interface used to control query execution.
+ *
+ * @param <T> query result type
+ */
+public interface Query<T extends Serializable, EC extends AbstractEntityCollection<T>> extends Serializable {
+
+  /**
+   * Sets the <tt>$filter</tt> expression for this query. Any of available operators and functions can be embodied here.
+   *
+   * @param filter the <tt>$filter</tt> expression for this query
+   * @return the same query instance
+   */
+  Query<T, EC> setFilter(String filter);
+
+  /**
+   * Sets the filter generating the <tt>$filter</tt> expression for this query.
+   *
+   * @param filter filter instance (to be obtained via <tt>ODataFilterFactory</tt>): note that <tt>build()</tt> method
+   * will be immediately invoked.
+   * @return the same query instance
+   */
+  Query<T, EC> setFilter(URIFilter filter);
+
+  /**
+   * The <tt>$filter</tt> expression for this query.
+   *
+   * @return the <tt>$filter</tt> expression for this query
+   */
+  String getFilter();
+
+  /**
+   * Sets the <tt>$orderBy</tt> expression for this query via sort options.
+   *
+   * @param sort sort options
+   * @return the same query instance
+   */
+  Query<T, EC> setOrderBy(Sort... sort);
+
+  /**
+   * Sets the <tt>$orderBy</tt> expression for this query.
+   *
+   * @param select the <tt>$orderBy</tt> expression for this query
+   * @return the same query instance
+   */
+  Query<T, EC> setOrderBy(String orderBy);
+
+  /**
+   * The <tt>$orderBy</tt> expression for this query.
+   *
+   * @return the <tt>$orderBy</tt> expression for this query
+   */
+  String getOrderBy();
+
+  /**
+   * Sets the maximum number of results to retrieve (<tt>$top</tt>).
+   *
+   * @param maxResults maximum number of results to retrieve
+   * @return the same query instance
+   * @throws IllegalArgumentException if the argument is negative
+   */
+  Query<T, EC> setMaxResults(int maxResults) throws IllegalArgumentException;
+
+  /**
+   * The maximum number of results the query object was set to retrieve (<tt>$top</tt>). Returns
+   * <tt>Integer.MAX_VALUE</tt> if setMaxResults was not applied to the query object.
+   *
+   * @return maximum number of results
+   */
+  int getMaxResults();
+
+  /**
+   * Sets the position of the first result to retrieve (<tt>$skip</tt>).
+   *
+   * @param firstResult position of the first result, numbered from 0
+   * @return the same query instance
+   * @throws IllegalArgumentException if the argument is negative
+   */
+  Query<T, EC> setFirstResult(int firstResult) throws IllegalArgumentException;
+
+  /**
+   * The position of the first result the query object was set to retrieve (<tt>$skip</tt>).
+   *
+   * Returns 0 if <tt>setFirstResult</tt> was not applied to the query object.
+   *
+   * @return position of the first result
+   */
+  int getFirstResult();
+
+  /**
+   * Executes a <tt>$filter</tt> query that returns a single result.
+   *
+   * @return the result
+   * @throws NoResultException if there is no result
+   * @throws NonUniqueResultException if more than one result
+   */
+  T getSingleResult() throws NoResultException, NonUniqueResultException;
+
+  /**
+   * Executes a <tt>$filter</tt> query and return the query results as collection.
+   *
+   * @return an iterable view of the results
+   */
+  EC getResult();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Sort.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Sort.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Sort.java
new file mode 100644
index 0000000..9e6f924
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Sort.java
@@ -0,0 +1,65 @@
+/*
+ * 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.ext.proxy.api;
+
+import java.util.Map;
+
+/**
+ * Sort option for queries.
+ */
+public class Sort implements Map.Entry<String, Sort.Direction> {
+
+  /**
+   * Enumeration for sort directions.
+   */
+  public enum Direction {
+
+    ASC,
+    DESC;
+
+    @Override
+    public String toString() {
+      return name().toLowerCase();
+    }
+  }
+  private final String key;
+
+  private Direction value;
+
+  public Sort(final String key, final Direction value) {
+    this.key = key;
+    this.value = value;
+  }
+
+  @Override
+  public String getKey() {
+    return this.key;
+  }
+
+  @Override
+  public Direction getValue() {
+    return this.value;
+  }
+
+  @Override
+  public Direction setValue(final Direction value) {
+    this.value = value;
+    return this.value;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ComplexType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ComplexType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ComplexType.java
new file mode 100644
index 0000000..ec41f52
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ComplexType.java
@@ -0,0 +1,42 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark POJO as EDM complex type.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Inherited
+public @interface ComplexType {
+
+  String name();
+
+  String baseType() default "";
+
+  boolean isAbstract() default false;
+
+  boolean isOpenType() default false;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKey.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKey.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKey.java
new file mode 100644
index 0000000..217cc96
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKey.java
@@ -0,0 +1,32 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identifies a compound key.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface CompoundKey {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKeyElement.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKeyElement.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKeyElement.java
new file mode 100644
index 0000000..5f45d06
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/CompoundKeyElement.java
@@ -0,0 +1,38 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark multi key class field (property) as multi key element.
+ *
+ * @see Property
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface CompoundKeyElement {
+
+  String name();
+
+  int position();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityContainer.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityContainer.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityContainer.java
new file mode 100644
index 0000000..e76cfc8
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityContainer.java
@@ -0,0 +1,36 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark POJO as EDM entity container.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface EntityContainer {
+
+  String name();
+
+  boolean isDefaultEntityContainer() default false;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java
new file mode 100644
index 0000000..0a94df4
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java
@@ -0,0 +1,38 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Give entity set a name. If interface extending EntitySet is not annotated with this, the effective name will be
+ * class'
+ * <tt>getSimpleName()</tt>.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface EntitySet {
+
+  String name();
+
+  boolean includeInServiceDocument() default true;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityType.java
new file mode 100644
index 0000000..a875098
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntityType.java
@@ -0,0 +1,44 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark POJO as EDM entity type.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Inherited
+public @interface EntityType {
+
+  String name();
+
+  String baseType() default "";
+
+  boolean isAbstract() default false;
+
+  boolean openType() default false;
+
+  boolean hasStream() default false;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EnumType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EnumType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EnumType.java
new file mode 100644
index 0000000..51afe79
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EnumType.java
@@ -0,0 +1,39 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+
+/**
+ * Mark Java enum as EDM enum type.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface EnumType {
+
+  String name();
+
+  EdmPrimitiveTypeKind underlyingType() default EdmPrimitiveTypeKind.Int32;
+
+  boolean isFlags() default false;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Key.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Key.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Key.java
new file mode 100644
index 0000000..7e10e87
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Key.java
@@ -0,0 +1,34 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark POJO field (property) as key.
+ *
+ * @see Property
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Key {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyClass.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyClass.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyClass.java
new file mode 100644
index 0000000..5729ca5
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyClass.java
@@ -0,0 +1,39 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.io.Serializable;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies a composite primary key class that is mapped to multiple fields or properties of an EntityType.
+ * <p>The names of the fields or properties in the primary key class and the primary key fields or properties of the
+ * EntityType must correspond and their types must be the same.</p>
+ *
+ * @see Key
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface KeyClass {
+
+  Class<? extends Serializable> value();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyRef.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyRef.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyRef.java
new file mode 100644
index 0000000..41f3b06
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/KeyRef.java
@@ -0,0 +1,34 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identifies a compound key.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface KeyRef {
+
+  Class<?> value();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Namespace.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Namespace.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Namespace.java
new file mode 100644
index 0000000..81f1a95
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Namespace.java
@@ -0,0 +1,36 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Associate Java package with OData namespace.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface Namespace {
+
+  String value();
+
+  String alias() default "";
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java
new file mode 100644
index 0000000..88379bc
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java
@@ -0,0 +1,42 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Bind POJO field to EDM navigation property.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface NavigationProperty {
+
+  String name();
+
+  String type();
+
+  String targetSchema();
+
+  String targetContainer();
+
+  String targetEntitySet();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Operation.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Operation.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Operation.java
new file mode 100644
index 0000000..ad5a148
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Operation.java
@@ -0,0 +1,62 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.apache.olingo.ext.proxy.api.OperationType;
+
+/**
+ * Mark method as EDM function import.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Operation {
+
+  String name();
+
+  /**
+   * Operation type, function or action.
+   *
+   * @return operation type.
+   */
+  OperationType type();
+
+  /**
+   * The action/function MAY/MUST specify a return type using the edm:ReturnType element. The return type must be a
+   * scalar, entity or complex type, or a collection of scalar, entity or complex types.
+   *
+   * @return operation return type.
+   */
+  String returnType() default "";
+
+  /**
+   * A function element MAY specify a Boolean value for the IsComposable attribute. If no value is specified for the
+   * IsComposable attribute, the value defaults to false.
+   * <br/>
+   * Functions whose IsComposable attribute is true are considered composable. A composable function can be invoked with
+   * additional path segments or system query options appended to the path that identifies the composable function as
+   * appropriate for the type returned by the composable function.
+   *
+   * @return <tt>TRUE</tt> if is composable; <tt>FALSE</tt> otherwise.
+   */
+  boolean isComposable() default false;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Parameter.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Parameter.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Parameter.java
new file mode 100644
index 0000000..2ecd79b
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Parameter.java
@@ -0,0 +1,50 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
+import org.apache.olingo.client.api.edm.xml.v3.ParameterMode;
+
+/**
+ * Function import parameter information.
+ *
+ * @see FunctionImport
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PARAMETER)
+public @interface Parameter {
+
+  String name();
+
+  String type();
+
+  boolean nullable() default true;
+
+  ParameterMode mode() default ParameterMode.In;
+
+  int maxLenght() default Integer.MAX_VALUE;
+
+  int precision() default 0;
+
+  int scale() default 0;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Property.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Property.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Property.java
new file mode 100644
index 0000000..86da393
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Property.java
@@ -0,0 +1,76 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+import org.apache.olingo.client.api.edm.StoreGeneratedPattern;
+import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
+
+/**
+ * Bind POJO field to EDM property.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Property {
+
+  String name();
+
+  String type();
+
+  boolean nullable() default true;
+
+  String defaultValue() default "";
+
+  int maxLenght() default Integer.MAX_VALUE;
+
+  boolean fixedLenght() default false;
+
+  int precision() default 0;
+
+  int scale() default 0;
+
+  boolean unicode() default true;
+
+  String collation() default "";
+
+  String srid() default "";
+
+  ConcurrencyMode concurrencyMode() default ConcurrencyMode.None;
+
+  String mimeType() default "";
+
+  /* -- Feed Customization annotations -- */
+  String fcSourcePath() default "";
+
+  String fcTargetPath() default "";
+
+  EdmContentKind fcContentKind() default EdmContentKind.text;
+
+  String fcNSPrefix() default "";
+
+  String fcNSURI() default "";
+
+  boolean fcKeepInContent() default false;
+
+  StoreGeneratedPattern storeGeneratedPattern() default StoreGeneratedPattern.None;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ReferentialConstraint.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ReferentialConstraint.java
new file mode 100644
index 0000000..92ab4db
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/ReferentialConstraint.java
@@ -0,0 +1,42 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotate navigation property with information about referential constraint.
+ *
+ * @see NavigationProperty
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface ReferentialConstraint {
+
+  Class<?> principalRole();
+
+  String[] principalPropertyRefs();
+
+  Class<?> dependentRole();
+
+  String[] dependentPropertyRefs();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/RowType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/RowType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/RowType.java
new file mode 100644
index 0000000..50334d1
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/RowType.java
@@ -0,0 +1,32 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark inner class as EDM row type.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface RowType {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Singleton.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Singleton.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Singleton.java
new file mode 100644
index 0000000..3f85c88
--- /dev/null
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/Singleton.java
@@ -0,0 +1,35 @@
+/*
+ * 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.ext.proxy.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Give singleton a name. If interface extending Singleton is not annotated with this, the effective name will be class'
+ * <tt>getSimpleName()</tt>.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface Singleton {
+
+  String name();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/pojogen-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/pom.xml b/ext/pojogen-maven-plugin/pom.xml
new file mode 100644
index 0000000..2364dac
--- /dev/null
+++ b/ext/pojogen-maven-plugin/pom.xml
@@ -0,0 +1,129 @@
+<?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/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>pojogen-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>${project.artifactId}</name>
+  <description>Java client API for OData services: Maven plugin generating POJOs from metadata.</description>
+  
+  <parent>
+    <groupId>org.apache.olingo</groupId>
+    <artifactId>olingo-ext</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <properties>
+    <serviceRootURL>${test.base.url}</serviceRootURL>
+    <main.basedir>${project.parent.basedir}</main.basedir>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.olingo</groupId>
+      <artifactId>olingo-client-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+     
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <goalPrefix>odatajclient</goalPrefix>
+          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+        </configuration>
+        <executions>
+          <execution>
+            <id>mojo-descriptor</id>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>help-goal</id>
+            <goals>
+              <goal>helpmojo</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+    
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+      <resource>
+        <directory>..</directory>
+        <targetPath>META-INF</targetPath>
+        <includes>
+          <include>LICENSE</include>
+        </includes>
+      </resource>
+    </resources>
+
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+      </testResource>
+    </testResources>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/pojogen-maven-plugin/src/it/actionOverloadingService/pom.xml
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/it/actionOverloadingService/pom.xml b/ext/pojogen-maven-plugin/src/it/actionOverloadingService/pom.xml
new file mode 100644
index 0000000..ba36e81
--- /dev/null
+++ b/ext/pojogen-maven-plugin/src/it/actionOverloadingService/pom.xml
@@ -0,0 +1,92 @@
+<?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>
+
+  <groupId>org.apache.olingo.ext</groupId>
+  <artifactId>odatajclient-maven-plugin</artifactId>
+  <version>@project.version@</version>
+
+  <description>A simple IT verifying the basic use case.</description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+      <version>@velocity.version@</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.olingo.ext</groupId>
+      <artifactId>odatajclient-proxy</artifactId>
+      <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>@project.artifactId@</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <configuration>
+              <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
+              <serviceRootURL>@serviceRootURL@/ActionOverloadingService.svc</serviceRootURL>
+              <basePackage>org.apache.olingo.ext.proxy.actionoverloadingservice</basePackage>
+            </configuration>
+            <id>pojosV3</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>pojosV3</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/pojogen-maven-plugin/src/it/actionOverloadingService/verify.groovy
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/it/actionOverloadingService/verify.groovy b/ext/pojogen-maven-plugin/src/it/actionOverloadingService/verify.groovy
new file mode 100644
index 0000000..a19cf4d
--- /dev/null
+++ b/ext/pojogen-maven-plugin/src/it/actionOverloadingService/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/com/msopentech/odatajclient/proxy" );
+assert basepkg.isDirectory() && basepkg.listFiles().length>0;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/pojogen-maven-plugin/src/it/defaultService/pom.xml
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/it/defaultService/pom.xml b/ext/pojogen-maven-plugin/src/it/defaultService/pom.xml
new file mode 100644
index 0000000..c82709f
--- /dev/null
+++ b/ext/pojogen-maven-plugin/src/it/defaultService/pom.xml
@@ -0,0 +1,92 @@
+<?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>
+
+  <groupId>org.apache.olingo.ext</groupId>
+  <artifactId>odatajclient-maven-plugin</artifactId>
+  <version>@project.version@</version>
+
+  <description>A simple IT verifying the basic use case.</description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+      <version>@velocity.version@</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.olingo.ext</groupId>
+      <artifactId>odatajclient-proxy</artifactId>
+      <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>@project.artifactId@</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <configuration>
+              <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
+              <serviceRootURL>@serviceRootURL@/DefaultService.svc</serviceRootURL>
+              <basePackage>org.apache.olingo.ext.proxy.defaultservice</basePackage>
+            </configuration>
+            <id>pojosV3</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>pojosV3</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/pojogen-maven-plugin/src/it/defaultService/verify.groovy
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/it/defaultService/verify.groovy b/ext/pojogen-maven-plugin/src/it/defaultService/verify.groovy
new file mode 100644
index 0000000..a19cf4d
--- /dev/null
+++ b/ext/pojogen-maven-plugin/src/it/defaultService/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/com/msopentech/odatajclient/proxy" );
+assert basepkg.isDirectory() && basepkg.listFiles().length>0;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f02d9a07/ext/pojogen-maven-plugin/src/it/keyAsSegmentService/pom.xml
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/it/keyAsSegmentService/pom.xml b/ext/pojogen-maven-plugin/src/it/keyAsSegmentService/pom.xml
new file mode 100644
index 0000000..174ee91
--- /dev/null
+++ b/ext/pojogen-maven-plugin/src/it/keyAsSegmentService/pom.xml
@@ -0,0 +1,92 @@
+<?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>
+
+  <groupId>org.apache.olingo.ext</groupId>
+  <artifactId>odatajclient-maven-plugin</artifactId>
+  <version>@project.version@</version>
+
+  <description>A simple IT verifying the basic use case.</description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+      <version>@velocity.version@</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.olingo.ext</groupId>
+      <artifactId>odatajclient-proxy</artifactId>
+      <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>@project.artifactId@</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <configuration>
+              <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
+              <serviceRootURL>@serviceRootURL@/KeyAsSegmentService.svc</serviceRootURL>
+              <basePackage>org.apache.olingo.ext.proxy.keyassegmentservice</basePackage>
+            </configuration>
+            <id>pojosV3</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>pojosV3</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>