olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sklev...@apache.org
Subject [12/43] source distribution
Date Wed, 28 Aug 2013 13:34:16 GMT
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmNavigationPropertyView.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmNavigationPropertyView.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmNavigationPropertyView.java
new file mode 100644
index 0000000..fd7731f
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmNavigationPropertyView.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.NavigationProperty;
+
+/**
+ * A view on Java persistence entity relationship and EDM navigation property.
+ * Java persistence entity relationships annotated as
+ * <ol>
+ * <li>Many To Many</li>
+ * <li>One To Many</li>
+ * <li>One To One</li>
+ * <li>Many To One</li>
+ * </ol>
+ * are transformed into navigation properties.
+ * <p>
+ * The implementation of the view provides access to EDM navigation properties
+ * for a given JPA EDM entity type. The view acts as a container for consistent
+ * list of EDM navigation properties of an EDM entity type. EDM navigation
+ * property is consistent only if there exists a consistent EDM association.
+ * 
+ *  
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView
+ * 
+ */
+public interface JPAEdmNavigationPropertyView extends JPAEdmBaseView {
+  /**
+   * The method adds a navigation property view to its container.
+   * 
+   * @param view
+   *            is an instance of type
+   *            {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmNavigationPropertyView}
+   */
+  void addJPAEdmNavigationPropertyView(JPAEdmNavigationPropertyView view);
+
+  /**
+   * The method returns a consistent list of EDM navigation property. A
+   * navigation property is consistent only if all its mandatory properties
+   * can be built with no errors from Java persistence entity relationship.
+   * 
+   * @return a list of consistent EDM navigation property for the Entity
+   */
+  List<NavigationProperty> getConsistentEdmNavigationProperties();
+
+  /**
+   * The method returns the navigation property that is currently being
+   * processed.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.api.edm.provider.NavigationProperty}
+   */
+  NavigationProperty getEdmNavigationProperty();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmPropertyView.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmPropertyView.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmPropertyView.java
new file mode 100644
index 0000000..17c8bdc
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmPropertyView.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model;
+
+import java.util.List;
+
+import javax.persistence.metamodel.Attribute;
+
+import org.apache.olingo.odata2.api.edm.provider.Property;
+import org.apache.olingo.odata2.api.edm.provider.SimpleProperty;
+
+/**
+ * A view on Java Persistence Entity Attributes and EDM properties. Java
+ * Persistence Attributes of type
+ * <ol>
+ * <li>embedded ID - are converted into EDM keys</li>
+ * <li>ID - are converted into EDM keys</li>
+ * <li>attributes - are converted into EDM properties</li>
+ * <li>embeddable type - are converted into EDM complex properties</li>
+ * <li>relationships - are converted into Associations/Navigation properties</li>
+ * </ol>
+ * <p>
+ * The implementation of the view provides access to EDM properties for a given
+ * JPA EDM entity type. The view acts as a container for consistent list of EDM
+ * properties of an EDM entity type. EDM property is consistent only if there
+ * exists at least one property in the entity type and there is at least one key
+ * property.
+ * 
+ *  
+ *         <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmKeyView
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmNavigationPropertyView
+ * 
+ */
+public interface JPAEdmPropertyView extends JPAEdmBaseView {
+  /**
+   * The method returns a simple EDM property.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.api.edm.provider.SimpleProperty}
+   */
+  SimpleProperty getEdmSimpleProperty();
+
+  /**
+   * The method returns a JPA EDM key view.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmKeyView}
+   */
+  JPAEdmKeyView getJPAEdmKeyView();
+
+  /**
+   * The method returns a list of Properties for the given Entity Type.
+   * 
+   * @return a list of {@link org.apache.olingo.odata2.api.edm.provider.Property}
+   */
+  List<Property> getEdmPropertyList();
+
+  /**
+   * The method returns a JPA Attribute for the given JPA entity type.
+   * 
+   * @return an instance of type {@link javax.persistence.metamodel.Attribute
+   *         <?, ?>}
+   */
+  Attribute<?, ?> getJPAAttribute();
+
+  /**
+   * The method returns a JPA EDM navigation property view.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmNavigationPropertyView}
+   */
+  JPAEdmNavigationPropertyView getJPAEdmNavigationPropertyView();
+
+  /**
+   * The method returns a JPA EDM Entity Type view that holds the property
+   * view.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityTypeView}
+   */
+  JPAEdmEntityTypeView getJPAEdmEntityTypeView();
+
+  /**
+   * The method returns a JPA EDM Complex Type view that holds the property
+   * view.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView}
+   */
+  JPAEdmComplexTypeView getJPAEdmComplexTypeView();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintRoleView.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintRoleView.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintRoleView.java
new file mode 100644
index 0000000..ee8a3be
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintRoleView.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model;
+
+import org.apache.olingo.odata2.api.edm.provider.ReferentialConstraintRole;
+
+/**
+ * <p>
+ * A view on Java Persistence Entity Join Column's "name" and
+ * "referenced column name" attributes and Entity Data Model Referential
+ * Constraint's dependent and principal roles respectively. Each java
+ * persistence entity with properties annotated with Join Columns are
+ * transformed into Referential constraints and Referential constraint roles.
+ * </p>
+ * <p>
+ * The implementation of the view provides access to EDM referential constraint
+ * roles created from Java Persistence Entity Join Columns. The implementation
+ * acts as a container for EDM referential constraint roles. A referential
+ * constraint role is consistent only if the principal role and dependent roles
+ * can be created from JPA Entity relationships.
+ * </p>
+ * 
+ *  
+ *         <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintView
+ * 
+ */
+public interface JPAEdmReferentialConstraintRoleView extends JPAEdmBaseView {
+  /**
+   * Two types of EDM roles of a referential constraint.
+   */
+  public enum RoleType {
+    PRINCIPAL, DEPENDENT
+  }
+
+  /**
+   * The method returns the role type (PRINCIPAL or DEPENDENT)
+   * 
+   * @return a
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintRoleView.RoleType}
+   */
+  RoleType getRoleType();
+
+  /**
+   * The method returns the Referential constraint role that is currently
+   * being processed.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.api.edm.provider.ReferentialConstraintRole}
+   */
+  ReferentialConstraintRole getEdmReferentialConstraintRole();
+
+  /**
+   * The method returns the name of JPA attribute's column name (annotated
+   * with @Column). The returned Column Name acts as the PRINCIPAL entity
+   * type.
+   * 
+   * @return name of JPA Column name
+   */
+  String getJPAColumnName();
+
+  /**
+   * The method returns the EDM entity type name that holds the
+   * relationship/referential constraint. The entity type that acts as a
+   * DEPENDENT entity type.
+   * 
+   * @return name of EDM entity type
+   */
+  String getEdmEntityTypeName();
+
+  /**
+   * The method returns the EDM association name.
+   * 
+   * @return name of EDM association
+   */
+  String getEdmAssociationName();
+
+  /**
+   * The method tells if there exists a valid referential constraint for a
+   * given association.
+   * 
+   * @return true - if valid referential constraint exits else false
+   */
+  boolean isExists();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintView.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintView.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintView.java
new file mode 100644
index 0000000..f6215e8
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmReferentialConstraintView.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model;
+
+import org.apache.olingo.odata2.api.edm.provider.ReferentialConstraint;
+
+/**
+ * <p>
+ * A view on Java Persistence Entity Join Columns and Entity Data Model
+ * Referential Constraint. Each java persistence entity with properties
+ * annotated with Join Columns are transformed into Referential constraints.
+ * </p>
+ * <p>
+ * The implementation of the view provides access to EDM referential constraint
+ * created from Java Persistence Entity Join Columns. The implementation acts as
+ * a container for EDM referential constraint. A referential constraint is said
+ * to be consistent only if referential constraint role is consistent.
+ * </p>
+ * 
+ *  <br>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * <br>
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintRoleView
+ * 
+ */
+public interface JPAEdmReferentialConstraintView extends JPAEdmBaseView {
+
+  /**
+   * The method returns EDM referential constraint created from Java
+   * persistence Entity Join Columns.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.api.edm.provider.ReferentialConstraint}
+   */
+  public ReferentialConstraint getEdmReferentialConstraint();
+
+  /**
+   * The method returns if a valid referential constraint exists for a given
+   * EDM association. If there exists a JPA entity relationship with join
+   * column having a valid "Name" and "ReferenceColumnName", that can be
+   * mapped to EDM properties in dependent and source EDM entities
+   * respectively then a valid EDM referential constraint exists.
+   * 
+   * @return true if there exists a valid referential constraint else false.
+   */
+  public boolean isExists();
+
+  /**
+   * The method returns the name of EDM Association.
+   * 
+   * @return name of an EDM association
+   */
+  public String getEdmRelationShipName();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmSchemaView.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmSchemaView.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmSchemaView.java
new file mode 100644
index 0000000..cfe19e8
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/JPAEdmSchemaView.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.Schema;
+
+/**
+ * <p>
+ * A view on Java Persistence Model and Entity Data Model Schema. Each java
+ * persistence unit corresponds to a one EDM schema.
+ * </p>
+ * <p>
+ * The implementation of the view provides access to EDM schema created from
+ * Java Persistence unit. The implementation acts as a container for schema. The
+ * schema is consistent only if following elements are consistent
+ * <ol>
+ * <li>{@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView}</li>
+ * <li>
+ * {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityContainerView}</li>
+ * <li>{@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView}</li>
+ * </ol>
+ * </p>
+ * 
+ *  
+ *         <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityContainerView
+ * @see org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView
+ * 
+ */
+public interface JPAEdmSchemaView extends JPAEdmBaseView {
+  /**
+   * The method returns the EDM schema present in the container.
+   * 
+   * @return an instance EDM schema of type
+   *         {@link org.apache.olingo.odata2.api.edm.provider.Schema}
+   */
+  public Schema getEdmSchema();
+
+  /**
+   * The method returns JPA EDM container view. The JPA EDM container view can
+   * be used to access EDM Entity Container elements.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityContainerView}
+   */
+  public JPAEdmEntityContainerView getJPAEdmEntityContainerView();
+
+  /**
+   * The method returns JPA EDM complex view. The JPA EDM complex view can be
+   * used to access EDM complex types and JPA Embeddable Types.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView}
+   */
+  public JPAEdmComplexTypeView getJPAEdmComplexTypeView();
+
+  /**
+   * The method returns JPA EDM association view. The JPA EDM association view
+   * can be used to access EDM associations and JPA Relationships.
+   * 
+   * @return an instance of type
+   *         {@link org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView}
+   */
+  public JPAEdmAssociationView getJPAEdmAssociationView();
+
+  /**
+   * The method registers custom operations that shall be represented as Edm
+   * Function Imports. Custom operations are created using Edm Annotation
+   * {@link org.apache.olingo.odata2.api.annotation.edm.FunctionImport}.
+   * <p>
+   * Custom Operations can be part of JPA Entity or can be created in a class
+   * other than JPA Entity. Such custom operations can be registered using
+   * this method.
+   * <p>
+   * The method is a callback.
+   * 
+   * @param customClass
+   *            is the class that contains custom operations
+   * @param methodNames
+   *            is the name of the method that needs to be transformed into
+   *            Function Imports. It is an optional parameter. If null is
+   *            passed then all annotated methods are transformed into
+   *            Function Imports.
+   * 
+   */
+  public void registerOperations(Class<?> customClass, String methodNames[]);
+
+  /**
+   * The method returns an Hash Map containing the registered custom
+   * operations.
+   * 
+   * @return a HashMap of Class and the methods in the class
+   */
+  public HashMap<Class<?>, String[]> getRegisteredOperations();
+
+  public List<String> getNonKeyComplexTypeList();
+
+  public void addNonKeyComplexName(String complexTypeName);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAAttributeMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAAttributeMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAAttributeMapType.java
new file mode 100644
index 0000000..20cb3c7
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAAttributeMapType.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * 
+ * 				The default name for EDM
+ * 				property is derived from JPA attribute name. This can be overriden
+ * 				using
+ * 				JPAAttributeMapType.
+ * 			
+ * 
+ * <p>Java class for JPAAttributeMapType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPAAttributeMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="JPAAttribute" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 &lt;attribute name="exclude" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPAAttributeMapType", propOrder = { "jpaAttribute" })
+public class JPAAttributeMapType {
+
+  @XmlElement(name = "JPAAttribute")
+  protected List<JPAAttributeMapType.JPAAttribute> jpaAttribute;
+
+  /**
+   * Gets the value of the jpaAttribute property.
+   * 
+   * <p>
+   * This accessor method returns a reference to the live list,
+   * not a snapshot. Therefore any modification you make to the
+   * returned list will be present inside the JAXB object.
+   * This is why there is not a <CODE>set</CODE> method for the jpaAttribute property.
+   * 
+   * <p>
+   * For example, to add a new item, do as follows:
+   * <pre>
+   *    getJPAAttribute().add(newItem);
+   * </pre>
+   * 
+   * 
+   * <p>
+   * Objects of the following type(s) are allowed in the list
+   * {@link JPAAttributeMapType.JPAAttribute }
+   * 
+   * 
+   */
+  public List<JPAAttributeMapType.JPAAttribute> getJPAAttribute() {
+    if (jpaAttribute == null) {
+      jpaAttribute = new ArrayList<JPAAttributeMapType.JPAAttribute>();
+    }
+    return jpaAttribute;
+  }
+
+  /**
+   * <p>Java class for anonymous complex type.
+   * 
+   * <p>The following schema fragment specifies the expected content contained within this class.
+   * 
+   * <pre>
+   * &lt;complexType>
+   *   &lt;simpleContent>
+   *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+   *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+   *       &lt;attribute name="exclude" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+   *     &lt;/extension>
+   *   &lt;/simpleContent>
+   * &lt;/complexType>
+   * </pre>
+   * 
+   * 
+   */
+  @XmlAccessorType(XmlAccessType.FIELD)
+  @XmlType(name = "", propOrder = { "value" })
+  public static class JPAAttribute {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "name", required = true)
+    protected String name;
+    @XmlAttribute(name = "exclude")
+    protected Boolean exclude;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+      return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(final String value) {
+      this.value = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+      return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(final String value) {
+      name = value;
+    }
+
+    /**
+     * Gets the value of the exclude property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isExclude() {
+      if (exclude == null) {
+        return false;
+      } else {
+        return exclude;
+      }
+    }
+
+    /**
+     * Sets the value of the exclude property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setExclude(final Boolean value) {
+      exclude = value;
+    }
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModel.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModel.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModel.java
new file mode 100644
index 0000000..dbb2d54
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModel.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for anonymous complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="PersistenceUnit" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAPersistenceUnitMapType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = { "persistenceUnit" })
+@XmlRootElement(name = "JPAEDMMappingModel")
+public class JPAEdmMappingModel {
+
+  @XmlElement(name = "PersistenceUnit", required = true)
+  protected JPAPersistenceUnitMapType persistenceUnit;
+
+  /**
+   * Gets the value of the persistenceUnit property.
+   * 
+   * @return possible object is {@link JPAPersistenceUnitMapType }
+   * 
+   */
+  public JPAPersistenceUnitMapType getPersistenceUnit() {
+    return persistenceUnit;
+  }
+
+  /**
+   * Sets the value of the persistenceUnit property.
+   * 
+   * @param value
+   *            allowed object is {@link JPAPersistenceUnitMapType }
+   * 
+   */
+  public void setPersistenceUnit(final JPAPersistenceUnitMapType value) {
+    persistenceUnit = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModelFactory.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModelFactory.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModelFactory.java
new file mode 100644
index 0000000..3cc8681
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEdmMappingModelFactory.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.odata2.processor.api.jpa.model.mapping;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+/**
+ * This object contains factory methods for each Java content interface and Java
+ * element interface generated in the
+ * org.apache.olingo.odata2.processor.api.jpa.model.mapping package.
+ * <p>
+ * An ObjectFactory allows you to programatically construct new instances of the
+ * Java representation for XML content. The Java representation of XML content
+ * can consist of schema derived interfaces and classes representing the binding
+ * of schema type definitions, element declarations and model groups. Factory
+ * methods for each of these are provided in this class.
+ * 
+ */
+@XmlRegistry
+public class JPAEdmMappingModelFactory {
+
+  /**
+   * Create a new ObjectFactory that can be used to create new instances of
+   * schema derived classes for package:
+   * org.apache.olingo.odata2.processor.api.jpa.model.mapping
+   * 
+   */
+  public JPAEdmMappingModelFactory() {}
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.processor.api.jpa.model.mapping.JPARelationshipMapType }
+   * 
+   */
+  public JPARelationshipMapType createJPARelationshipMapType() {
+    return new JPARelationshipMapType();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.processor.api.jpa.model.mapping.JPAAttributeMapType }
+   * 
+   */
+  public JPAAttributeMapType createJPAAttributeMapType() {
+    return new JPAAttributeMapType();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.processor.api.jpa.model.mapping.JPAEdmMappingModel }
+   * 
+   */
+  public JPAEdmMappingModel createJPAEDMMappingModel() {
+    return new JPAEdmMappingModel();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.processor.api.jpa.model.mapping.JPAPersistenceUnitMapType }
+   * 
+   */
+  public JPAPersistenceUnitMapType createJPAPersistenceUnitMapType() {
+    return new JPAPersistenceUnitMapType();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.processor.api.jpa.model.mapping.JPAEmbeddableTypeMapType }
+   * 
+   */
+  public JPAEmbeddableTypeMapType createJPAEmbeddableTypeMapType() {
+    return new JPAEmbeddableTypeMapType();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypeMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypeMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypeMapType.java
new file mode 100644
index 0000000..2e8a01a
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypeMapType.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * 
+ * 				The default name for EDM
+ * 				complex type is derived from JPA Embeddable type name. This can be
+ * 				overriden using JPAEmbeddableTypeMapType.
+ * 			
+ * 
+ * <p>Java class for JPAEmbeddableTypeMapType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPAEmbeddableTypeMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="EDMComplexType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="JPAAttributes" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAAttributeMapType"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="exclude" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPAEmbeddableTypeMapType", propOrder = { "edmComplexType", "jpaAttributes" })
+public class JPAEmbeddableTypeMapType {
+
+  @XmlElement(name = "EDMComplexType")
+  protected String edmComplexType;
+  @XmlElement(name = "JPAAttributes", required = true)
+  protected JPAAttributeMapType jpaAttributes;
+  @XmlAttribute(name = "name", required = true)
+  protected String name;
+  @XmlAttribute(name = "exclude")
+  protected Boolean exclude;
+
+  /**
+   * Gets the value of the edmComplexType property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link String }
+   *     
+   */
+  public String getEDMComplexType() {
+    return edmComplexType;
+  }
+
+  /**
+   * Sets the value of the edmComplexType property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link String }
+   *     
+   */
+  public void setEDMComplexType(final String value) {
+    edmComplexType = value;
+  }
+
+  /**
+   * Gets the value of the jpaAttributes property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link JPAAttributeMapType }
+   *     
+   */
+  public JPAAttributeMapType getJPAAttributes() {
+    return jpaAttributes;
+  }
+
+  /**
+   * Sets the value of the jpaAttributes property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link JPAAttributeMapType }
+   *     
+   */
+  public void setJPAAttributes(final JPAAttributeMapType value) {
+    jpaAttributes = value;
+  }
+
+  /**
+   * Gets the value of the name property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link String }
+   *     
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Sets the value of the name property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link String }
+   *     
+   */
+  public void setName(final String value) {
+    name = value;
+  }
+
+  /**
+   * Gets the value of the exclude property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link Boolean }
+   *     
+   */
+  public boolean isExclude() {
+    if (exclude == null) {
+      return false;
+    } else {
+      return exclude;
+    }
+  }
+
+  /**
+   * Sets the value of the exclude property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link Boolean }
+   *     
+   */
+  public void setExclude(final Boolean value) {
+    exclude = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypesMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypesMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypesMapType.java
new file mode 100644
index 0000000..9d18d0b
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEmbeddableTypesMapType.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for JPAEmbeddableTypesMapType complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPAEmbeddableTypesMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="JPAEmbeddableType" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAEmbeddableTypeMapType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPAEmbeddableTypesMapType", propOrder = { "jpaEmbeddableType" })
+public class JPAEmbeddableTypesMapType {
+
+  @XmlElement(name = "JPAEmbeddableType")
+  protected List<JPAEmbeddableTypeMapType> jpaEmbeddableType;
+
+  /**
+   * Gets the value of the jpaEmbeddableType property.
+   * 
+   * <p>
+   * This accessor method returns a reference to the live list, not a
+   * snapshot. Therefore any modification you make to the returned list will
+   * be present inside the JAXB object. This is why there is not a
+   * <CODE>set</CODE> method for the jpaEmbeddableType property.
+   * 
+   * <p>
+   * For example, to add a new item, do as follows:
+   * 
+   * <pre>
+   * getJPAEmbeddableType().add(newItem);
+   * </pre>
+   * 
+   * 
+   * <p>
+   * Objects of the following type(s) are allowed in the list
+   * {@link JPAEmbeddableTypeMapType }
+   * 
+   * 
+   */
+  public List<JPAEmbeddableTypeMapType> getJPAEmbeddableType() {
+    if (jpaEmbeddableType == null) {
+      jpaEmbeddableType = new ArrayList<JPAEmbeddableTypeMapType>();
+    }
+    return jpaEmbeddableType;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypeMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypeMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypeMapType.java
new file mode 100644
index 0000000..fe94216
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypeMapType.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * 
+ * 				The default name for EDM
+ * 				entity type is derived from JPA entity type name. This can be
+ * 				overriden using JPAEntityTypeMapType.
+ * 			
+ * 
+ * <p>Java class for JPAEntityTypeMapType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPAEntityTypeMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="EDMEntityType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="EDMEntitySet" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="JPAAttributes" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAAttributeMapType"/>
+ *         &lt;element name="JPARelationships" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPARelationshipMapType"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="exclude" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPAEntityTypeMapType", propOrder = { "edmEntityType", "edmEntitySet", "jpaAttributes", "jpaRelationships" })
+public class JPAEntityTypeMapType {
+
+  @XmlElement(name = "EDMEntityType")
+  protected String edmEntityType;
+  @XmlElement(name = "EDMEntitySet")
+  protected String edmEntitySet;
+  @XmlElement(name = "JPAAttributes", required = true)
+  protected JPAAttributeMapType jpaAttributes;
+  @XmlElement(name = "JPARelationships", required = true)
+  protected JPARelationshipMapType jpaRelationships;
+  @XmlAttribute(name = "name", required = true)
+  protected String name;
+  @XmlAttribute(name = "exclude")
+  protected Boolean exclude;
+
+  /**
+   * Gets the value of the edmEntityType property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link String }
+   *     
+   */
+  public String getEDMEntityType() {
+    return edmEntityType;
+  }
+
+  /**
+   * Sets the value of the edmEntityType property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link String }
+   *     
+   */
+  public void setEDMEntityType(final String value) {
+    edmEntityType = value;
+  }
+
+  /**
+   * Gets the value of the edmEntitySet property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link String }
+   *     
+   */
+  public String getEDMEntitySet() {
+    return edmEntitySet;
+  }
+
+  /**
+   * Sets the value of the edmEntitySet property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link String }
+   *     
+   */
+  public void setEDMEntitySet(final String value) {
+    edmEntitySet = value;
+  }
+
+  /**
+   * Gets the value of the jpaAttributes property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link JPAAttributeMapType }
+   *     
+   */
+  public JPAAttributeMapType getJPAAttributes() {
+    return jpaAttributes;
+  }
+
+  /**
+   * Sets the value of the jpaAttributes property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link JPAAttributeMapType }
+   *     
+   */
+  public void setJPAAttributes(final JPAAttributeMapType value) {
+    jpaAttributes = value;
+  }
+
+  /**
+   * Gets the value of the jpaRelationships property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link JPARelationshipMapType }
+   *     
+   */
+  public JPARelationshipMapType getJPARelationships() {
+    return jpaRelationships;
+  }
+
+  /**
+   * Sets the value of the jpaRelationships property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link JPARelationshipMapType }
+   *     
+   */
+  public void setJPARelationships(final JPARelationshipMapType value) {
+    jpaRelationships = value;
+  }
+
+  /**
+   * Gets the value of the name property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link String }
+   *     
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Sets the value of the name property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link String }
+   *     
+   */
+  public void setName(final String value) {
+    name = value;
+  }
+
+  /**
+   * Gets the value of the exclude property.
+   * 
+   * @return
+   *     possible object is
+   *     {@link Boolean }
+   *     
+   */
+  public boolean isExclude() {
+    if (exclude == null) {
+      return false;
+    } else {
+      return exclude;
+    }
+  }
+
+  /**
+   * Sets the value of the exclude property.
+   * 
+   * @param value
+   *     allowed object is
+   *     {@link Boolean }
+   *     
+   */
+  public void setExclude(final Boolean value) {
+    exclude = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypesMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypesMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypesMapType.java
new file mode 100644
index 0000000..a6832a2
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAEntityTypesMapType.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for JPAEntityTypesMapType complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPAEntityTypesMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="JPAEntityType" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAEntityTypeMapType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPAEntityTypesMapType", propOrder = { "jpaEntityType" })
+public class JPAEntityTypesMapType {
+
+  @XmlElement(name = "JPAEntityType")
+  protected List<JPAEntityTypeMapType> jpaEntityType;
+
+  /**
+   * Gets the value of the jpaEntityType property.
+   * 
+   * <p>
+   * This accessor method returns a reference to the live list, not a
+   * snapshot. Therefore any modification you make to the returned list will
+   * be present inside the JAXB object. This is why there is not a
+   * <CODE>set</CODE> method for the jpaEntityType property.
+   * 
+   * <p>
+   * For example, to add a new item, do as follows:
+   * 
+   * <pre>
+   * getJPAEntityType().add(newItem);
+   * </pre>
+   * 
+   * 
+   * <p>
+   * Objects of the following type(s) are allowed in the list
+   * {@link JPAEntityTypeMapType }
+   * 
+   * 
+   */
+  public List<JPAEntityTypeMapType> getJPAEntityType() {
+    if (jpaEntityType == null) {
+      jpaEntityType = new ArrayList<JPAEntityTypeMapType>();
+    }
+    return jpaEntityType;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAPersistenceUnitMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAPersistenceUnitMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAPersistenceUnitMapType.java
new file mode 100644
index 0000000..b60215e
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPAPersistenceUnitMapType.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * 
+ * By default Java Persistence Unit name is taken as EDM schema name. This can
+ * be overriden using JPAPersistenceUnitMapType.
+ * 
+ * 
+ * <p>
+ * Java class for JPAPersistenceUnitMapType complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPAPersistenceUnitMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="EDMSchemaNamespace" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="JPAEntityTypes" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAEntityTypesMapType"/>
+ *         &lt;element name="JPAEmbeddableTypes" type="{http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping}JPAEmbeddableTypesMapType"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPAPersistenceUnitMapType", propOrder = { "edmSchemaNamespace", "jpaEntityTypes", "jpaEmbeddableTypes" })
+public class JPAPersistenceUnitMapType {
+
+  @XmlElement(name = "EDMSchemaNamespace")
+  protected String edmSchemaNamespace;
+  @XmlElement(name = "JPAEntityTypes", required = true)
+  protected JPAEntityTypesMapType jpaEntityTypes;
+  @XmlElement(name = "JPAEmbeddableTypes", required = true)
+  protected JPAEmbeddableTypesMapType jpaEmbeddableTypes;
+  @XmlAttribute(name = "name", required = true)
+  protected String name;
+
+  /**
+   * Gets the value of the edmSchemaNamespace property.
+   * 
+   * @return possible object is {@link String }
+   * 
+   */
+  public String getEDMSchemaNamespace() {
+    return edmSchemaNamespace;
+  }
+
+  /**
+   * Sets the value of the edmSchemaNamespace property.
+   * 
+   * @param value
+   *            allowed object is {@link String }
+   * 
+   */
+  public void setEDMSchemaNamespace(final String value) {
+    edmSchemaNamespace = value;
+  }
+
+  /**
+   * Gets the value of the jpaEntityTypes property.
+   * 
+   * @return possible object is {@link JPAEntityTypesMapType }
+   * 
+   */
+  public JPAEntityTypesMapType getJPAEntityTypes() {
+    return jpaEntityTypes;
+  }
+
+  /**
+   * Sets the value of the jpaEntityTypes property.
+   * 
+   * @param value
+   *            allowed object is {@link JPAEntityTypesMapType }
+   * 
+   */
+  public void setJPAEntityTypes(final JPAEntityTypesMapType value) {
+    jpaEntityTypes = value;
+  }
+
+  /**
+   * Gets the value of the jpaEmbeddableTypes property.
+   * 
+   * @return possible object is {@link JPAEmbeddableTypesMapType }
+   * 
+   */
+  public JPAEmbeddableTypesMapType getJPAEmbeddableTypes() {
+    return jpaEmbeddableTypes;
+  }
+
+  /**
+   * Sets the value of the jpaEmbeddableTypes property.
+   * 
+   * @param value
+   *            allowed object is {@link JPAEmbeddableTypesMapType }
+   * 
+   */
+  public void setJPAEmbeddableTypes(final JPAEmbeddableTypesMapType value) {
+    jpaEmbeddableTypes = value;
+  }
+
+  /**
+   * Gets the value of the name property.
+   * 
+   * @return possible object is {@link String }
+   * 
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Sets the value of the name property.
+   * 
+   * @param value
+   *            allowed object is {@link String }
+   * 
+   */
+  public void setName(final String value) {
+    name = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPARelationshipMapType.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPARelationshipMapType.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPARelationshipMapType.java
new file mode 100644
index 0000000..5c88792
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/JPARelationshipMapType.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * 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.odata2.processor.api.jpa.model.mapping;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * 
+ * The default name for EDM navigation property is derived from JPA relationship
+ * name. This can be overriden using JPARelationshipMapType.
+ * 
+ * 
+ * <p>
+ * Java class for JPARelationshipMapType complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ * 
+ * <pre>
+ * &lt;complexType name="JPARelationshipMapType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="JPARelationship" maxOccurs="unbounded" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "JPARelationshipMapType", propOrder = { "jpaRelationship" })
+public class JPARelationshipMapType {
+
+  @XmlElement(name = "JPARelationship")
+  protected List<JPARelationshipMapType.JPARelationship> jpaRelationship;
+
+  /**
+   * Gets the value of the jpaRelationship property.
+   * 
+   * <p>
+   * This accessor method returns a reference to the live list, not a
+   * snapshot. Therefore any modification you make to the returned list will
+   * be present inside the JAXB object. This is why there is not a
+   * <CODE>set</CODE> method for the jpaRelationship property.
+   * 
+   * <p>
+   * For example, to add a new item, do as follows:
+   * 
+   * <pre>
+   * getJPARelationship().add(newItem);
+   * </pre>
+   * 
+   * 
+   * <p>
+   * Objects of the following type(s) are allowed in the list
+   * {@link JPARelationshipMapType.JPARelationship }
+   * 
+   * 
+   */
+  public List<JPARelationshipMapType.JPARelationship> getJPARelationship() {
+    if (jpaRelationship == null) {
+      jpaRelationship = new ArrayList<JPARelationshipMapType.JPARelationship>();
+    }
+    return jpaRelationship;
+  }
+
+  /**
+   * <p>
+   * Java class for anonymous complex type.
+   * 
+   * <p>
+   * The following schema fragment specifies the expected content contained
+   * within this class.
+   * 
+   * <pre>
+   * &lt;complexType>
+   *   &lt;simpleContent>
+   *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+   *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+   *     &lt;/extension>
+   *   &lt;/simpleContent>
+   * &lt;/complexType>
+   * </pre>
+   * 
+   * 
+   */
+  @XmlAccessorType(XmlAccessType.FIELD)
+  @XmlType(name = "", propOrder = { "value" })
+  public static class JPARelationship {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "name", required = true)
+    protected String name;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return possible object is {@link String }
+     * 
+     */
+    public String getValue() {
+      return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *            allowed object is {@link String }
+     * 
+     */
+    public void setValue(final String value) {
+      this.value = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return possible object is {@link String }
+     * 
+     */
+    public String getName() {
+      return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *            allowed object is {@link String }
+     * 
+     */
+    public void setName(final String value) {
+      name = value;
+    }
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/package-info.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/package-info.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/package-info.java
new file mode 100644
index 0000000..615b993
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/mapping/package-info.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+/**
+ * <h3>OData JPA Processor API Library - Mapping Model</h3>
+ * The JPA EDM Mapping model (XML document) is represented as JAXB annotated Java Classes.
+ * 
+ *  
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.apache.org/olingo/odata2/processor/api/jpa/model/mapping", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.olingo.odata2.processor.api.jpa.model.mapping;
+

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/package-info.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/package-info.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/package-info.java
new file mode 100644
index 0000000..75279e8
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/model/package-info.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+/**
+ * <h3>OData JPA Processor API Library - JPA EDM Model</h3>
+ * The library provides a set of views over the JPA/EDM element containers. 
+ * The views can used to access the elements that form EDM.
+ * 
+ *  
+ */
+package org.apache.olingo.odata2.processor.api.jpa.model;
+

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/package-info.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/package-info.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/package-info.java
new file mode 100644
index 0000000..4ca40de
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/api/jpa/package-info.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+/**
+ * <h3>OData JPA Processor API Library</h3>
+ * The library provides a way for the developers to create an OData Service from a Java Persistence Model.
+ * The library supports Java Persistence 2.0 and is dependent on OData library.
+ * 
+ * To create an OData service from JPA models
+ * <ol><li>extend the service factory class {@link org.apache.olingo.odata2.processor.api.jpa.ODataJPAServiceFactory}
+ * and implement the methods</li>
+ * <li>define a JAX-RS servlet in web.xml and configure the service factory as servlet init parameter. 
+ * <p><b>See Also:</b>{@link org.apache.olingo.odata2.processor.api.jpa.ODataJPAServiceFactory}</li></ol>
+ * 
+ *  
+ */
+package org.apache.olingo.odata2.processor.api.jpa;
+

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/c5b266a6/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/core/jpa/ODataEntityParser.java
----------------------------------------------------------------------
diff --git a/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/core/jpa/ODataEntityParser.java b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/core/jpa/ODataEntityParser.java
new file mode 100644
index 0000000..f4df2c5
--- /dev/null
+++ b/aggregated-sources/org.apache.olingo.odata2-parent-sources/org/apache/olingo/odata2/processor/core/jpa/ODataEntityParser.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * 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.odata2.processor.core.jpa;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.olingo.odata2.api.edm.Edm;
+import org.apache.olingo.odata2.api.edm.EdmEntitySet;
+import org.apache.olingo.odata2.api.ep.EntityProvider;
+import org.apache.olingo.odata2.api.ep.EntityProviderException;
+import org.apache.olingo.odata2.api.ep.EntityProviderReadProperties;
+import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
+import org.apache.olingo.odata2.api.exception.ODataBadRequestException;
+import org.apache.olingo.odata2.api.exception.ODataException;
+import org.apache.olingo.odata2.api.processor.ODataContext;
+import org.apache.olingo.odata2.api.uri.PathSegment;
+import org.apache.olingo.odata2.api.uri.UriInfo;
+import org.apache.olingo.odata2.api.uri.UriParser;
+import org.apache.olingo.odata2.processor.api.jpa.ODataJPAContext;
+import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
+
+public final class ODataEntityParser {
+
+  private ODataJPAContext context;
+
+  public ODataEntityParser(final ODataJPAContext context) {
+    this.context = context;
+  }
+
+  public final ODataEntry parseEntry(final EdmEntitySet entitySet,
+      final InputStream content, final String requestContentType, final boolean merge)
+      throws ODataBadRequestException {
+    ODataEntry entryValues;
+    try {
+      EntityProviderReadProperties entityProviderProperties = EntityProviderReadProperties.init().mergeSemantic(merge).build();
+      entryValues = EntityProvider.readEntry(requestContentType, entitySet, content, entityProviderProperties);
+    } catch (EntityProviderException e) {
+      throw new ODataBadRequestException(ODataBadRequestException.BODY, e);
+    }
+    return entryValues;
+
+  }
+
+  public final UriInfo parseLinkURI() throws ODataJPARuntimeException {
+    UriInfo uriInfo = null;
+
+    Edm edm;
+    try {
+      edm = context.getODataContext().getService().getEntityDataModel();
+
+      List<PathSegment> pathSegments = context.getODataContext().getPathInfo().getODataSegments();
+      List<PathSegment> subPathSegments = pathSegments.subList(0, pathSegments.size() - 2);
+
+      uriInfo = UriParser.parse(edm, subPathSegments, Collections.<String, String> emptyMap());
+    } catch (ODataException e) {
+      throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()), e);
+    }
+
+    return uriInfo;
+  }
+
+  public final UriInfo parseLink(final EdmEntitySet entitySet, final InputStream content, final String contentType) throws ODataJPARuntimeException {
+
+    String uriString = null;
+    UriInfo uri = null;
+
+    try {
+      uriString = EntityProvider.readLink(contentType, entitySet, content);
+      ODataContext odataContext = context.getODataContext();
+      final String serviceRoot = odataContext.getPathInfo().getServiceRoot().toString();
+
+      final String path = uriString.startsWith(serviceRoot.toString()) ? uriString.substring(serviceRoot.length()) : uriString;
+
+      final PathSegment pathSegment = new PathSegment() {
+        @Override
+        public String getPath() {
+          return path;
+        }
+
+        @Override
+        public Map<String, List<String>> getMatrixParameters() {
+          return null;
+        }
+      };
+
+      final Edm edm = odataContext.getService().getEntityDataModel();
+
+      uri = UriParser.parse(edm, Arrays.asList(pathSegment), Collections.<String, String> emptyMap());
+
+    } catch (ODataException e) {
+      throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()), e);
+    }
+
+    return uri;
+
+  }
+
+  public List<UriInfo> parseLinks(final EdmEntitySet entitySet, final InputStream content, final String contentType) throws ODataJPARuntimeException {
+
+    List<String> uriList = new ArrayList<String>();
+    List<UriInfo> uriInfoList = new ArrayList<UriInfo>();
+
+    try {
+
+      uriList = EntityProvider.readLinks(contentType, entitySet, content);
+      ODataContext odataContext = context.getODataContext();
+      final String serviceRoot = odataContext.getPathInfo().getServiceRoot().toString();
+      final int length = serviceRoot.length();
+      final Edm edm = odataContext.getService().getEntityDataModel();
+
+      for (String uriString : uriList) {
+        final String path = uriString.startsWith(serviceRoot) ? uriString.substring(length) : uriString;
+
+        final PathSegment pathSegment = new PathSegment() {
+          @Override
+          public String getPath() {
+            return path;
+          }
+
+          @Override
+          public Map<String, List<String>> getMatrixParameters() {
+            return null;
+          }
+        };
+
+        UriInfo uriInfo = UriParser.parse(edm, Arrays.asList(pathSegment), Collections.<String, String> emptyMap());
+        uriInfoList.add(uriInfo);
+      }
+    } catch (EntityProviderException e) {
+      return null;
+    } catch (ODataException e) {
+      throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()), e);
+    }
+
+    return uriInfoList;
+  }
+
+}


Mime
View raw message