You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by tb...@apache.org on 2014/01/02 13:47:26 UTC

[39/47] [OLINGO-99] Re-factor Package Names. Following are the changes

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmBaseView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmBaseView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmBaseView.java
new file mode 100644
index 0000000..56aa8b3
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmBaseView.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import javax.persistence.metamodel.Metamodel;
+
+import org.apache.olingo.odata2.jpa.processor.api.access.JPAEdmBuilder;
+import org.apache.olingo.odata2.jpa.processor.api.access.JPAEdmMappingModelAccess;
+
+/**
+ * <p>
+ * A base view on Java Persistence Model and Entity Data Model.
+ * </p>
+ * <p>
+ * The implementation of the view acts as a base container for containers of
+ * Java Persistence Model and Entity Data Model elements.
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * 
+ */
+public interface JPAEdmBaseView {
+  /**
+   * 
+   * @return Java Persistence Unit Name
+   */
+  public String getpUnitName();
+
+  /**
+   * The method returns the Java Persistence MetaModel
+   * 
+   * @return a meta model of type {@link javax.persistence.metamodel.Metamodel}
+   */
+  public Metamodel getJPAMetaModel();
+
+  /**
+   * The method returns a builder for building Entity Data Model elements from
+   * Java Persistence Model Elements
+   * 
+   * @return a builder of type {@link org.apache.olingo.odata2.jpa.processor.api.access.JPAEdmBuilder}
+   */
+  public JPAEdmBuilder getBuilder();
+
+  /**
+   * The method returns the if the container is consistent without any errors
+   * 
+   * @return <ul>
+   * <li>true - if the container is consistent without errors</li>
+   * <li>false - if the container is inconsistent with errors</li>
+   * </ul>
+   * 
+   */
+  public boolean isConsistent();
+
+  /**
+   * The method cleans the container.
+   */
+  public void clean();
+
+  /**
+   * The method returns a reference to JPA EDM mapping model access.
+   * 
+   * @return an instance to JPA EDM mapping model access
+   */
+  public JPAEdmMappingModelAccess getJPAEdmMappingModelAccess();
+
+  /**
+   * The method returns a reference to JPA EDM extension if available else
+   * null.
+   * 
+   * @return an instance of JPA Edm Extension
+   */
+  public JPAEdmExtension getJPAEdmExtension();
+
+  /**
+   * The method returns whether the default naming logic is skipped for the
+   * current view.
+   * 
+   * @return <ul><li>true - skip default naming logic</li>
+   * <li>false - do not skip default naming logic</li>
+   * </ul>
+   */
+  public boolean isDefaultNamingSkipped();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexPropertyView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexPropertyView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexPropertyView.java
new file mode 100644
index 0000000..6b4918c
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexPropertyView.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import org.apache.olingo.odata2.api.edm.provider.ComplexProperty;
+
+/**
+ * <p>
+ * A view on properties of Java Persistence embeddable type and EDM complex
+ * type. Properties of JPA embeddable types are converted into EDM properties of
+ * EDM complex type.
+ * </p>
+ * <p>
+ * The implementation of the view provides access to properties of EDM complex
+ * type created for a given JPA EDM complex type. The implementation acts as a
+ * container for the properties of EDM complex type.
+ * </p>
+ * 
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmComplexTypeView
+ */
+public interface JPAEdmComplexPropertyView extends JPAEdmBaseView {
+  /**
+   * The method returns a complex property for a complex type.
+   * 
+   * @return an instance of {@link org.apache.olingo.odata2.api.edm.provider.ComplexProperty}
+   */
+  ComplexProperty getEdmComplexProperty();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexTypeView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexTypeView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexTypeView.java
new file mode 100644
index 0000000..8b087c8
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmComplexTypeView.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+import org.apache.olingo.odata2.api.edm.provider.ComplexType;
+import org.apache.olingo.odata2.api.edm.provider.Property;
+
+/**
+ * A view on Java Persistence embeddable types and EDM complex types. Java
+ * persistence embeddable types are converted into EDM entity types. Only those
+ * embeddable types that are
+ * <ol>
+ * <li>used in a java persistence Entity type</li>
+ * <li>used as non embeddable id of a java persistence entity type</li>
+ * </ol>
+ * are converted into EDM complex types.
+ * <p>
+ * The implementation of the view provides access to EDM complex types for the
+ * given JPA EDM model. The view acts as a container for consistent list of EDM
+ * complex types. An EDM complex type is said to be consistent only if it used
+ * in at least one of the EDM entity type.
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmComplexPropertyView
+ * 
+ */
+public interface JPAEdmComplexTypeView extends JPAEdmBaseView {
+
+  /**
+   * The method returns an EDM complex type that is currently being processed.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.ComplexType}
+   */
+  public ComplexType getEdmComplexType();
+
+  /**
+   * The method returns an JPA embeddable type that is currently being
+   * processed.
+   * 
+   * @return an instance of type {@link javax.persistence.metamodel.EmbeddableType}
+   */
+  public javax.persistence.metamodel.EmbeddableType<?> getJPAEmbeddableType();
+
+  /**
+   * The method returns a consistent list of EDM complex types.
+   * 
+   * @return a list of {@link org.apache.olingo.odata2.api.edm.provider.ComplexType}
+   */
+  public List<ComplexType> getConsistentEdmComplexTypes();
+
+  /**
+   * The method searches for the EDM complex type with in the container for
+   * the given JPA embeddable type name.
+   * 
+   * @param embeddableTypeName
+   * is the name of JPA embeddable type
+   * @return a reference to EDM complex type if found else null
+   */
+  public ComplexType searchEdmComplexType(String embeddableTypeName);
+
+  /**
+   * The method add a JPA EDM complex type view to the container.
+   * 
+   * @param view
+   * @param isReferencedInKey
+   * is the complex type referenced in an Entity as a key property
+   * is an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmComplexTypeView}
+   */
+  public void addJPAEdmCompleTypeView(JPAEdmComplexTypeView view);
+
+  /**
+   * The method searches for the EDM complex type with in the container for
+   * the given EDM complex type's fully qualified name.
+   * 
+   * @param type
+   * is the fully qualified name of EDM complex type
+   * @return a reference to EDM complex type if found else null
+   */
+  public ComplexType searchEdmComplexType(FullQualifiedName type);
+
+  /**
+   * The method expands the given EDM complex type into a list of EDM simple
+   * properties.
+   * 
+   * @param complexType
+   * is the EDM complex type to expand
+   * @param expandedPropertyList
+   * is the list to be populated with expanded EDM simple
+   * properties
+   * @param embeddablePropertyName
+   * is the name of the complex property. The name is used as the
+   * qualifier for the expanded simple property names.
+   */
+  public void expandEdmComplexType(ComplexType complexType, List<Property> expandedPropertyList,
+      String embeddablePropertyName);
+
+  /**
+   * The method checks if the given EDM complex type is referenced as a Key property in any Entity
+   * @param complexTypeName
+   * EDM complex type name
+   * @return
+   * <ul><li><b>true</b> : if the complex type is referenced as an entity's key property</li>
+   * <li><b>false</b> : if the complex type is not referenced as an entity's key property</li>
+   * </ul>
+   * 
+   */
+  public boolean isReferencedInKey(String complexTypeName);
+  
+  /**
+   * The method sets the given EDM complex type as referenced in an Entity as a key property
+   * @param complexTypeName
+   *  EDM complex Type name
+   */
+  public void setReferencedInKey(String complexTypeName);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityContainerView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityContainerView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityContainerView.java
new file mode 100644
index 0000000..b0e5e3d
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityContainerView.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.EntityContainer;
+
+/**
+ * A view on JPA EDM entity container. JPA EDM entity container is built from
+ * consistent JPA EDM entity set and consistent JPA EDM association set views.
+ * 
+ * <p>
+ * The implementation of the view provides access to EDM entity containers. The
+ * view acts as container for JPA EDM entity containers. A JPA EDM entity
+ * container is said to be consistent only if the JPA EDM association set and
+ * JPA EDM Entity Set view are consistent.
+ * 
+ * 
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmEntitySetView
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmAssociationSetView
+ * 
+ */
+public interface JPAEdmEntityContainerView extends JPAEdmBaseView {
+  /**
+   * The method returns the EDM entity container that is currently being
+   * processed.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.EntityContainer}
+   */
+  public EntityContainer getEdmEntityContainer();
+
+  /**
+   * The method returns a list of consistent EDM entity containers
+   * 
+   * @return a list of consistent EDM entity containers
+   */
+  public List<EntityContainer> getConsistentEdmEntityContainerList();
+
+  /**
+   * The method returns the JPA EDM entity set view that is currently being
+   * processed.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmEntitySetView}
+   */
+  public JPAEdmEntitySetView getJPAEdmEntitySetView();
+
+  /**
+   * The method returns the JPA EDM association set view that is currently
+   * being processed.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmAssociationSetView}
+   */
+  public JPAEdmAssociationSetView getEdmAssociationSetView();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntitySetView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntitySetView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntitySetView.java
new file mode 100644
index 0000000..7cd5e73
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntitySetView.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.EntitySet;
+
+/**
+ * A view on Java Persistence entity type and EDM entity sets. Java persistence
+ * entity types are converted into EDM entity types and EDM entity sets.
+ * <p>
+ * The implementation of the view provides access to EDM entity sets for the
+ * given JPA EDM entity type. The view acts as a container for consistent list
+ * of EDM entity sets. An EDM entity set is said to be consistent only if it has
+ * consistent EDM entity types.
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmEntityTypeView
+ * 
+ */
+public interface JPAEdmEntitySetView extends JPAEdmBaseView {
+  /**
+   * The method returns an EDM entity set that is currently being processed.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.EntitySet}
+   */
+  public EntitySet getEdmEntitySet();
+
+  /**
+   * The method returns a list of consistent EDM entity sets.
+   * 
+   * @return a list of EDM entity sets
+   */
+  public List<EntitySet> getConsistentEdmEntitySetList();
+
+  /**
+   * The method returns a JPA EDM entity type view that is currently being
+   * processed. JPA EDM entity set view is built from JPA EDM entity type
+   * view.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmEntityTypeView}
+   */
+  public JPAEdmEntityTypeView getJPAEdmEntityTypeView();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityTypeView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityTypeView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityTypeView.java
new file mode 100644
index 0000000..80de084
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmEntityTypeView.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.odata2.jpa.processor.api.model;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.EntityType;
+
+/**
+ * A view on Java Persistence entity types and EDM entity types. Java
+ * persistence entity types are converted into EDM entity types.
+ * <p>
+ * The implementation of the view provides access to EDM entity types for the
+ * given JPA EDM model. The view acts as a container for consistent list of EDM
+ * entity types. An EDM entity type is said to be consistent only if it has at
+ * least one consistent EDM property and at least one consistent EDM key.
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmPropertyView
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmKeyView
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmNavigationPropertyView
+ * 
+ */
+public interface JPAEdmEntityTypeView extends JPAEdmBaseView {
+  /**
+   * The method returns an EDM entity currently being processed.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.EntityType}
+   */
+  public EntityType getEdmEntityType();
+
+  /**
+   * The method returns java persistence Entity type currently being
+   * processed.
+   * 
+   * @return an instance of type {@link javax.persistence.metamodel.EntityType}
+   */
+  public javax.persistence.metamodel.EntityType<?> getJPAEntityType();
+
+  /**
+   * The method returns a consistent list of EDM entity types for a given java
+   * persistence meta model.
+   * 
+   * @return a list of {@link org.apache.olingo.odata2.api.edm.provider.EntityType}
+   */
+  public List<EntityType> getConsistentEdmEntityTypes();
+
+  /**
+   * The method searches in the consistent list of EDM entity types for the
+   * given EDM entity type's name.
+   * 
+   * @param jpaEntityTypeName
+   * is the name of EDM entity type
+   * @return a reference to EDM entity type if found else null
+   */
+  public EntityType searchEdmEntityType(String jpaEntityTypeName);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmExtension.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmExtension.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmExtension.java
new file mode 100644
index 0000000..18f43a0
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmExtension.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.odata2.jpa.processor.api.model;
+
+/**
+ * The interface provides methods to extend JPA EDM containers.
+ * 
+ * 
+ * 
+ */
+public interface JPAEdmExtension {
+
+  /**
+   * The method is used to extend the JPA EDM schema view with custom operations. Use this method to
+   * register custom operations.
+   * 
+   * @param view
+   * is the schema view
+   * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmSchemaView#registerOperations(Class, String[])
+   * 
+   */
+  public void extendWithOperation(JPAEdmSchemaView view);
+
+  /**
+   * The method is used to extend the JPA EDM schema view with Entities, Entity Sets, Navigation Property and
+   * Association.
+   * 
+   * @param view
+   * is the schema view
+   * 
+   */
+  public void extendJPAEdmSchema(JPAEdmSchemaView view);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmFunctionImportView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmFunctionImportView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmFunctionImportView.java
new file mode 100644
index 0000000..214f834
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmFunctionImportView.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.FunctionImport;
+
+/**
+ * <p>
+ * A view on EDM Function Imports. EDM function imports are derived from Java
+ * class methods annotated with EDM Annotations.
+ * </p>
+ * <p>
+ * The implementation of the view provides access to EDM Function Import created
+ * from Java class methods. The implementation act as a container for list of
+ * function imports that are consistent.
+ * </p>
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * 
+ */
+public interface JPAEdmFunctionImportView extends JPAEdmBaseView {
+
+  /**
+   * The method returns a list of consistent Function Imports. A function
+   * import is said to be consistent only if it adheres to the rules defined
+   * in CSDL.
+   * 
+   * @return a list of type {@link org.apache.olingo.odata2.api.edm.provider.FunctionImport}
+   */
+  List<FunctionImport> getConsistentFunctionImportList();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmKeyView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmKeyView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmKeyView.java
new file mode 100644
index 0000000..431a93e
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmKeyView.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import org.apache.olingo.odata2.api.edm.provider.Key;
+
+/**
+ * A view on Java Persistence Entity Key Attributes and EDM Key properties. Java
+ * Persistence Key Attributes of type
+ * <ol>
+ * <li>embedded ID</li>
+ * <li>ID</li>
+ * </ol>
+ * are converted into EDM keys. Embedded IDs are expanded into simple EDM
+ * properties.
+ * <p>
+ * The implementation of the view provides access to EDM key properties for a
+ * given JPA EDM entity type. The view acts as a container for consistent EDM
+ * key property of an EDM entity type.
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmPropertyView
+ * 
+ */
+public interface JPAEdmKeyView extends JPAEdmBaseView {
+  /**
+   * The method returns an instance of EDM key for the given JPA EDM Entity
+   * type.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.api.edm.provider.Key}
+   */
+  public Key getEdmKey();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmMapping.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmMapping.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmMapping.java
new file mode 100644
index 0000000..4b77b6d
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmMapping.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+/**
+ * The interface acts a container for storing Java persistence column name. The
+ * JPA EDM mapping instance can be associated with any EDM simple, EDM complex
+ * property to denote the properties Java persistence column name.
+ * 
+ * 
+ * 
+ */
+public interface JPAEdmMapping {
+  /**
+   * The method sets the Java persistence column name into the mapping
+   * container.
+   * 
+   * @param name
+   * is the Java persistence column name
+   */
+  public void setJPAColumnName(String name);
+
+  /**
+   * The method gets the Java persistence column name from the mapping
+   * container.
+   * 
+   * @return a String representing the Java persistence column name set into
+   * the container
+   */
+  public String getJPAColumnName();
+
+  /**
+   * The method sets the Java persistence entity/property type.
+   * 
+   * @param type
+   * is an instance of type Class<?>
+   */
+  public void setJPAType(Class<?> type);
+
+  /**
+   * The method returns the Java persistence entity/property type.
+   * 
+   * @return type
+   */
+  public Class<?> getJPAType();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmModelView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmModelView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmModelView.java
new file mode 100644
index 0000000..0dcbe87
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmModelView.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+/**
+ * A view on JPA meta model and EDM meta model. The view acts as the base for
+ * the construction of EDM meta model from a JPA meta model.
+ * <p>
+ * The implementation of the view acts as the container for JPA meta model and
+ * EDM meta model. The instance of JPA EDM meta model can be created using
+ * {@link org.apache.olingo.odata2.jpa.processor.api.factory.JPAAccessFactory}. The
+ * instance thus obtained can be used for constructing other elements of the
+ * meta model using {@link org.apache.olingo.odata2.jpa.processor.api.access.JPAEdmBuilder}.
+ * 
+ * 
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.factory.JPAAccessFactory
+ */
+public interface JPAEdmModelView extends JPAEdmBaseView {
+  /**
+   * The method returns a consistent JPA EDM schema view created from the JPA
+   * meta model.
+   * 
+   * @return an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmSchemaView}
+   */
+  public JPAEdmSchemaView getEdmSchemaView();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmNavigationPropertyView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmNavigationPropertyView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmNavigationPropertyView.java
new file mode 100644
index 0000000..f8fce6d
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmNavigationPropertyView.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmPropertyView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmPropertyView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmPropertyView.java
new file mode 100644
index 0000000..c363844
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmPropertyView.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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.jpa.processor.api.model.JPAEdmKeyView
+ * @see org.apache.olingo.odata2.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.model.JPAEdmComplexTypeView}
+   */
+  JPAEdmComplexTypeView getJPAEdmComplexTypeView();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintRoleView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintRoleView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintRoleView.java
new file mode 100644
index 0000000..d90f57f
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintRoleView.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintView.java
new file mode 100644
index 0000000..1d5433d
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmReferentialConstraintView.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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.jpa.processor.api.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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmSchemaView.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmSchemaView.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmSchemaView.java
new file mode 100644
index 0000000..980cf47
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/JPAEdmSchemaView.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.model;
+
+import java.util.HashMap;
+
+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.jpa.processor.api.model.JPAEdmAssociationView}</li>
+ * <li> {@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmEntityContainerView}</li>
+ * <li>{@link org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmComplexTypeView}</li>
+ * </ol>
+ * </p>
+ * 
+ * 
+ * <p>
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmAssociationView
+ * @see org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmEntityContainerView
+ * @see org.apache.olingo.odata2.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.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.jpa.processor.api.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();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAAttributeMapType.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAAttributeMapType.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAAttributeMapType.java
new file mode 100644
index 0000000..e7bcbe9
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAAttributeMapType.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModel.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModel.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModel.java
new file mode 100644
index 0000000..a4175d4
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModel.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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/jpa/processor/api/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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModelFactory.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModelFactory.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEdmMappingModelFactory.java
new file mode 100644
index 0000000..84f8b28
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/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.jpa.processor.api.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.jpa.processor.api.model.mapping.JPARelationshipMapType }
+   * 
+   */
+  public JPARelationshipMapType createJPARelationshipMapType() {
+    return new JPARelationshipMapType();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.jpa.processor.api.model.mapping.JPAAttributeMapType }
+   * 
+   */
+  public JPAAttributeMapType createJPAAttributeMapType() {
+    return new JPAAttributeMapType();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.jpa.processor.api.model.mapping.JPAEdmMappingModel }
+   * 
+   */
+  public JPAEdmMappingModel createJPAEDMMappingModel() {
+    return new JPAEdmMappingModel();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.jpa.processor.api.model.mapping.JPAPersistenceUnitMapType }
+   * 
+   */
+  public JPAPersistenceUnitMapType createJPAPersistenceUnitMapType() {
+    return new JPAPersistenceUnitMapType();
+  }
+
+  /**
+   * Create an instance of {@link org.apache.olingo.odata2.jpa.processor.api.model.mapping.JPAEmbeddableTypeMapType }
+   * 
+   */
+  public JPAEmbeddableTypeMapType createJPAEmbeddableTypeMapType() {
+    return new JPAEmbeddableTypeMapType();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypeMapType.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypeMapType.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypeMapType.java
new file mode 100644
index 0000000..e640673
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypeMapType.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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/jpa/processor/api/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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypesMapType.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypesMapType.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypesMapType.java
new file mode 100644
index 0000000..6293124
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEmbeddableTypesMapType.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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/jpa/processor/api/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/63b621a8/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEntityTypeMapType.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEntityTypeMapType.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEntityTypeMapType.java
new file mode 100644
index 0000000..22e1819
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/model/mapping/JPAEntityTypeMapType.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * 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.jpa.processor.api.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/jpa/processor/api/model/mapping}JPAAttributeMapType"/>
+ * &lt;element name="JPARelationships"
+ * type="{http://www.apache.org/olingo/odata2/jpa/processor/api/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;
+  }
+
+}