You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2013/09/24 14:43:05 UTC
[38/51] [partial] Refactored project structure
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/EdmMockUtilV2.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/EdmMockUtilV2.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/EdmMockUtilV2.java
deleted file mode 100644
index d20f8e9..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/EdmMockUtilV2.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*******************************************************************************
- * 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.mock.data;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.olingo.odata2.api.edm.EdmAssociation;
-import org.apache.olingo.odata2.api.edm.EdmAssociationEnd;
-import org.apache.olingo.odata2.api.edm.EdmComplexType;
-import org.apache.olingo.odata2.api.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.edm.EdmException;
-import org.apache.olingo.odata2.api.edm.EdmMapping;
-import org.apache.olingo.odata2.api.edm.EdmMultiplicity;
-import org.apache.olingo.odata2.api.edm.EdmNavigationProperty;
-import org.apache.olingo.odata2.api.edm.EdmProperty;
-import org.apache.olingo.odata2.api.edm.EdmType;
-import org.apache.olingo.odata2.api.edm.EdmTypeKind;
-import org.apache.olingo.odata2.api.edm.provider.Mapping;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmMapping;
-import org.apache.olingo.odata2.processor.core.jpa.mock.data.JPATypeMock.JPARelatedTypeMock;
-import org.apache.olingo.odata2.processor.core.jpa.mock.data.JPATypeMock.JPATypeEmbeddableMock;
-import org.apache.olingo.odata2.processor.core.jpa.mock.data.JPATypeMock.JPATypeEmbeddableMock2;
-import org.apache.olingo.odata2.processor.core.jpa.model.JPAEdmMappingImpl;
-import org.easymock.EasyMock;
-
-public class EdmMockUtilV2 {
-
- public static interface JPAEdmMappingMock extends JPAEdmMapping, EdmMapping {
-
- }
-
- public static EdmEntityType mockEdmEntityType(final String entityName, final boolean withComplexType)
- throws EdmException {
-
- EdmEntityType entityType = EasyMock.createMock(EdmEntityType.class);
- EasyMock.expect(entityType.getName()).andReturn(entityName).anyTimes();
- EasyMock.expect(entityType.getKeyPropertyNames()).andReturn(mockSimpleKeyPropertyNames(entityName));
- if (withComplexType == false) {
- EasyMock.expect(entityType.getPropertyNames()).andReturn(mockPropertyNames(entityName)).anyTimes();
- } else {
- EasyMock.expect(entityType.getPropertyNames()).andReturn(mockPropertyNamesWithComplexType(entityName)).anyTimes();
- }
-
- EasyMock.expect(entityType.getNavigationPropertyNames()).andReturn(mockNavigationPropertyNames(entityName));
- EasyMock.expect(entityType.getKind()).andReturn(EdmTypeKind.ENTITY);
- EasyMock.expect(entityType.getMapping()).andReturn((EdmMapping) mockEdmMapping(entityName, null, null));
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- EasyMock.expect(entityType.getProperty(JPATypeMock.PROPERTY_NAME_MINT)).andReturn(
- mockEdmProperty(entityName, JPATypeMock.PROPERTY_NAME_MINT)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPATypeMock.PROPERTY_NAME_MSTRING)).andReturn(
- mockEdmProperty(entityName, JPATypeMock.PROPERTY_NAME_MSTRING)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPATypeMock.PROPERTY_NAME_MDATETIME)).andReturn(
- mockEdmProperty(entityName, JPATypeMock.PROPERTY_NAME_MDATETIME)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE)).andReturn(
- mockEdmProperty(entityName, JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPATypeMock.NAVIGATION_PROPERTY_X)).andReturn(
- mockEdmNavigationProperty(JPATypeMock.NAVIGATION_PROPERTY_X, EdmMultiplicity.ONE)).anyTimes();
- } else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
- EasyMock.expect(entityType.getProperty(JPARelatedTypeMock.PROPERTY_NAME_MLONG)).andReturn(
- mockEdmProperty(entityName, JPARelatedTypeMock.PROPERTY_NAME_MLONG)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPARelatedTypeMock.PROPERTY_NAME_MBYTE)).andReturn(
- mockEdmProperty(entityName, JPARelatedTypeMock.PROPERTY_NAME_MBYTE)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY)).andReturn(
- mockEdmProperty(entityName, JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY)).anyTimes();
- EasyMock.expect(entityType.getProperty(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE)).andReturn(
- mockEdmProperty(entityName, JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE)).anyTimes();
- }
- EasyMock.replay(entityType);
- return entityType;
- }
-
- public static List<String> mockNavigationPropertyNames(final String entityName) {
- List<String> propertyNames = new ArrayList<String>();
- propertyNames.add(JPATypeMock.NAVIGATION_PROPERTY_X);
- propertyNames.add(JPATypeMock.NAVIGATION_PROPERTY_XS);
- return propertyNames;
- }
-
- public static List<String> mockSimpleKeyPropertyNames(final String entityName) {
- List<String> keyPropertyNames = new ArrayList<String>();
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- keyPropertyNames.add(JPATypeMock.PROPERTY_NAME_MINT);
- } else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
- keyPropertyNames.add(JPARelatedTypeMock.PROPERTY_NAME_MLONG);
- }
-
- return keyPropertyNames;
- }
-
- public static List<String> mockPropertyNames(final String entityName) {
- List<String> propertyNames = new ArrayList<String>();
-
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- propertyNames.add(JPATypeMock.PROPERTY_NAME_MINT);
- propertyNames.add(JPATypeMock.PROPERTY_NAME_MDATETIME);
- propertyNames.add(JPATypeMock.PROPERTY_NAME_MSTRING);
- } else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
- propertyNames.add(JPARelatedTypeMock.PROPERTY_NAME_MLONG);
- propertyNames.add(JPARelatedTypeMock.PROPERTY_NAME_MBYTE);
- propertyNames.add(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY);
- propertyNames.add(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE);
- } else if (entityName.equals(JPATypeEmbeddableMock.ENTITY_NAME)) {
- propertyNames.add(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT);
- propertyNames.add(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE);
- } else if (entityName.equals(JPATypeEmbeddableMock2.ENTITY_NAME)) {
- propertyNames.add(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT);
- propertyNames.add(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID);
- }
-
- return propertyNames;
- }
-
- public static List<String> mockPropertyNamesWithComplexType(final String entityName) {
- List<String> propertyNames = mockPropertyNames(entityName);
- propertyNames.add(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE);
-
- return propertyNames;
-
- }
-
- public static EdmAssociationEnd mockEdmAssociatioEnd(final String navigationPropertyName, final String role)
- throws EdmException {
- EdmAssociationEnd associationEnd = EasyMock.createMock(EdmAssociationEnd.class);
- EasyMock.expect(associationEnd.getMultiplicity()).andReturn(EdmMultiplicity.ONE);
- EdmEntityType entityType = EasyMock.createMock(EdmEntityType.class);
- EasyMock.expect(entityType.getMapping()).andReturn((EdmMapping) mockEdmMapping("JPARelatedTypeMock", null, null));
- EasyMock.replay(entityType);
-
- EasyMock.expect(associationEnd.getEntityType()).andReturn(entityType);
- EasyMock.replay(associationEnd);
- return associationEnd;
- }
-
- public static EdmAssociation mockEdmAssociation(final String navigationPropertyName) throws EdmException {
- EdmAssociation edmAssociation = EasyMock.createMock(EdmAssociation.class);
- EasyMock.expect(edmAssociation.getEnd("TO")).andReturn(mockEdmAssociatioEnd(navigationPropertyName, "TO"));
- EasyMock.expect(edmAssociation.getEnd("FROM")).andReturn(mockEdmAssociatioEnd(navigationPropertyName, "FROM"));
- EasyMock.replay(edmAssociation);
- return edmAssociation;
- }
-
- public static EdmEntitySet mockEdmEntitySet(final String entityName, final boolean withComplexType)
- throws EdmException {
- EdmEntitySet entitySet = null;
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- entitySet = EasyMock.createMock(EdmEntitySet.class);
- EasyMock.expect(entitySet.getEntityType()).andReturn(mockEdmEntityType(entityName, withComplexType)).anyTimes();
- EasyMock.expect(entitySet.getRelatedEntitySet(EasyMock.isA(EdmNavigationProperty.class))).andReturn(
- mockEdmEntitySet(JPARelatedTypeMock.ENTITY_NAME, false)).anyTimes();
- } else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
- entitySet = EasyMock.createMock(EdmEntitySet.class);
- EasyMock.expect(entitySet.getEntityType()).andReturn(mockEdmEntityType(entityName, withComplexType)).anyTimes();
- }
-
- EasyMock.replay(entitySet);
- return entitySet;
- }
-
- public static EdmNavigationProperty mockEdmNavigationProperty(final String navigationPropertyName,
- final EdmMultiplicity multiplicity) throws EdmException {
-
- EdmEntityType edmEntityType = mockEdmEntityType(JPARelatedTypeMock.ENTITY_NAME, false);
-
- EdmNavigationProperty navigationProperty = EasyMock.createMock(EdmNavigationProperty.class);
- EasyMock.expect(navigationProperty.getType()).andReturn(edmEntityType).anyTimes();
- EasyMock.expect(navigationProperty.getMultiplicity()).andReturn(multiplicity);
- EasyMock.expect(navigationProperty.getMapping()).andReturn(
- (EdmMapping) mockEdmMapping(null, null, navigationPropertyName));
- EasyMock.expect(navigationProperty.getToRole()).andReturn("TO");
- EasyMock.expect(navigationProperty.getRelationship()).andReturn(mockEdmAssociation(navigationPropertyName));
- if (multiplicity.equals(EdmMultiplicity.ONE)) {
- EasyMock.expect(navigationProperty.getName()).andReturn(JPATypeMock.NAVIGATION_PROPERTY_X);
- }
-
- EasyMock.replay(navigationProperty);
-
- return navigationProperty;
- }
-
- public static EdmProperty mockEdmProperty(final String entityName, final String propertyName) throws EdmException {
- EdmProperty edmProperty = EasyMock.createMock(EdmProperty.class);
-
- if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MINT) ||
- propertyName.equals(JPATypeMock.PROPERTY_NAME_MSTRING) ||
- propertyName.equals(JPATypeMock.PROPERTY_NAME_MDATETIME) ||
- propertyName.equals(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT) ||
- propertyName.equals(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT) ||
- propertyName.equals(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID) ||
- propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MLONG) ||
- propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MBYTE) ||
- propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE) ||
- propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY)) {
-
- EdmType edmType = EasyMock.createMock(EdmType.class);
- EasyMock.expect(edmProperty.getType()).andReturn(edmType).anyTimes();
- EasyMock.expect(edmType.getKind()).andReturn(EdmTypeKind.SIMPLE).anyTimes();
- EasyMock.replay(edmType);
- EasyMock.expect(edmProperty.getName()).andReturn(propertyName).anyTimes();
- EasyMock.expect(edmProperty.getMapping()).andReturn((EdmMapping) mockEdmMapping(entityName, propertyName, null))
- .anyTimes();
-
- } else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE) ||
- propertyName.equals(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE)) {
- EdmComplexType complexType = mockComplexType(propertyName);
-
- EasyMock.expect(edmProperty.getType()).andReturn(complexType).anyTimes();
- EasyMock.expect(edmProperty.getName()).andReturn(propertyName).anyTimes();
- EasyMock.expect(edmProperty.getMapping()).andReturn((EdmMapping) mockEdmMapping(null, propertyName, null))
- .anyTimes();
-
- }
-
- EasyMock.replay(edmProperty);
- return edmProperty;
- }
-
- public static EdmComplexType mockComplexType(final String complexPropertyName) throws EdmException {
-
- String complexTypeName = null;
- if (complexPropertyName.equals(JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE)) {
- complexTypeName = JPATypeEmbeddableMock2.ENTITY_NAME;
- } else if (complexPropertyName.equals(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE)) {
- complexTypeName = JPATypeEmbeddableMock.ENTITY_NAME;
- }
-
- EdmComplexType edmComplexType = EasyMock.createMock(EdmComplexType.class);
- EasyMock.expect(edmComplexType.getKind()).andReturn(EdmTypeKind.COMPLEX);
- EasyMock.expect(edmComplexType.getPropertyNames()).andReturn(mockPropertyNames(complexTypeName)).anyTimes();
- EasyMock.expect(edmComplexType.getMapping()).andReturn((EdmMapping) mockEdmMapping(complexTypeName, null, null));
-
- if (complexTypeName.equals(JPATypeEmbeddableMock.ENTITY_NAME)) {
- EasyMock.expect(edmComplexType.getProperty(JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT)).andReturn(
- mockEdmProperty(complexTypeName, JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT)).anyTimes();
- EasyMock.expect(edmComplexType.getProperty(JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE)).andReturn(
- mockEdmProperty(complexTypeName, JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE)).anyTimes();
- } else if (complexTypeName.equals(JPATypeEmbeddableMock2.ENTITY_NAME)) {
- EasyMock.expect(edmComplexType.getProperty(JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT)).andReturn(
- mockEdmProperty(complexTypeName, JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT)).anyTimes();
- EasyMock.expect(edmComplexType.getProperty(JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID)).andReturn(
- mockEdmProperty(complexTypeName, JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID)).anyTimes();
- }
-
- EasyMock.replay(edmComplexType);
- return edmComplexType;
- }
-
- public static JPAEdmMapping mockEdmMapping(final String entityName, final String propertyName,
- final String navigationPropertyName) {
- JPAEdmMapping mapping = new JPAEdmMappingImpl();
-
- if (propertyName == null && entityName != null) {
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- mapping.setJPAType(JPATypeMock.class);
- } else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
- mapping.setJPAType(JPARelatedTypeMock.class);
- } else if (entityName.equals(JPATypeEmbeddableMock.ENTITY_NAME)) {
- mapping.setJPAType(JPATypeEmbeddableMock.class);
- } else if (entityName.equals(JPATypeEmbeddableMock2.ENTITY_NAME)) {
- mapping.setJPAType(JPATypeEmbeddableMock2.class);
- }
- } else if (entityName == null && navigationPropertyName != null) {
- mapping.setJPAType(JPARelatedTypeMock.class);
- mapping.setJPAColumnName(JPATypeMock.NAVIGATION_PROPERTY_X);
- } else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MINT)) {
- mapping.setJPAType(int.class);
- ((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MINT);
- } else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MSTRING)) {
- mapping.setJPAType(String.class);
- ((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MSTRING);
- } else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MDATETIME)) {
- mapping.setJPAType(Calendar.class);
- ((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MDATETIME);
- } else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MLONG)) {
- mapping.setJPAType(long.class);
- ((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MLONG);
- } else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE)) {
- mapping.setJPAType(double.class);
- ((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE);
- } else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MBYTE)) {
- mapping.setJPAType(byte.class);
- ((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MBYTE);
- } else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY)) {
- mapping.setJPAType(byte[].class);
- ((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY);
- } else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT)) {
- mapping.setJPAType(Short.TYPE);
- ((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT);
- } else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT)) {
- mapping.setJPAType(Float.TYPE);
- ((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT);
- } else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID)) {
- mapping.setJPAType(UUID.class);
- ((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID);
- } else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE)) {
- mapping.setJPAType(JPATypeEmbeddableMock2.class);
- ((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE);
- } else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE)) {
- mapping.setJPAType(JPATypeEmbeddableMock.class);
- ((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE);
- }
- return mapping;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/JPATypeMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/JPATypeMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/JPATypeMock.java
deleted file mode 100644
index 1360b6d..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/JPATypeMock.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * 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.mock.data;
-
-import java.util.Calendar;
-import java.util.List;
-import java.util.UUID;
-
-/* ========================================================================= */
-public class JPATypeMock {
-
- public static final String ENTITY_NAME = "JPATypeMock";
- public static final String PROPERTY_NAME_MINT = "mInt";
- public static final String PROPERTY_NAME_MSTRING = "mString";
- public static final String PROPERTY_NAME_MDATETIME = "mDateTime";
- public static final String PROPERTY_NAME_MKEY = "key";
- public static final String PROPERTY_NAME_MCOMPLEXTYPE = "complexType";
-
- public static final String NAVIGATION_PROPERTY_X = "mRelatedEntity";
- public static final String NAVIGATION_PROPERTY_XS = "mRelatedEntities";
-
- private JPATypeEmbeddableMock key;
- private JPATypeEmbeddableMock complexType;
- private int mInt;
- private String mString;
- private Calendar mDateTime;
- private JPARelatedTypeMock mRelatedEntity;
- private List<JPARelatedTypeMock> mRelatedEntities;
-
- public String getMString() {
- return mString;
- }
-
- public void setMString(final String mString) {
- this.mString = mString;
- }
-
- public JPATypeEmbeddableMock getKey() {
- return key;
- }
-
- public void setKey(final JPATypeEmbeddableMock key) {
- this.key = key;
- }
-
- public int getMInt() {
- return mInt;
- }
-
- public void setMInt(final int mInt) {
- this.mInt = mInt;
- }
-
- public Calendar getMDateTime() {
- return mDateTime;
- }
-
- public void setMDateTime(final Calendar mDateTime) {
- this.mDateTime = mDateTime;
- }
-
- public JPARelatedTypeMock getMRelatedEntity() {
- return mRelatedEntity;
- }
-
- public void setMRelatedEntity(final JPARelatedTypeMock mRelatedEntity) {
- this.mRelatedEntity = mRelatedEntity;
- }
-
- public List<JPARelatedTypeMock> getMRelatedEntities() {
- return mRelatedEntities;
- }
-
- public void setMRelatedEntities(final List<JPARelatedTypeMock> mRelatedEntities) {
- this.mRelatedEntities = mRelatedEntities;
- }
-
- public JPATypeEmbeddableMock getComplexType() {
- return complexType;
- }
-
- public void setComplexType(final JPATypeEmbeddableMock complexType) {
- this.complexType = complexType;
- }
-
- /* ========================================================================= */
- public static class JPATypeEmbeddableMock {
-
- public static final String ENTITY_NAME = "JPATypeEmbeddableMock";
- public static final String PROPERTY_NAME_MSHORT = "mShort";
- public static final String PROPERTY_NAME_MEMBEDDABLE = "mEmbeddable";
-
- private short mShort;
- private JPATypeEmbeddableMock2 mEmbeddable;
-
- public short getMShort() {
- return mShort;
- }
-
- public void setMShort(final short mShort) {
- this.mShort = mShort;
- }
-
- public JPATypeEmbeddableMock2 getMEmbeddable() {
- return mEmbeddable;
- }
-
- public void setMEmbeddable(final JPATypeEmbeddableMock2 mEmbeddable) {
- this.mEmbeddable = mEmbeddable;
- }
-
- }
-
- /* ========================================================================= */
- public static class JPATypeEmbeddableMock2 {
-
- public static final String ENTITY_NAME = "JPATypeEmbeddableMock2";
- public static final String PROPERTY_NAME_MUUID = "mUUID";
- public static final String PROPERTY_NAME_MFLOAT = "mFloat";
-
- private UUID mUUID;
- private float mFloat;
-
- public UUID getMUUID() {
- return mUUID;
- }
-
- public void setMUUID(final UUID mUUID) {
- this.mUUID = mUUID;
- }
-
- public float getMFloat() {
- return mFloat;
- }
-
- public void setMFloat(final float mFloat) {
- this.mFloat = mFloat;
- }
-
- }
-
- /* ========================================================================= */
- public static final class JPARelatedTypeMock {
- public static final String ENTITY_NAME = "JPARelatedTypeMock";
- public static final String PROPERTY_NAME_MLONG = "mLong";
- public static final String PROPERTY_NAME_MDOUBLE = "mDouble";
- public static final String PROPERTY_NAME_MBYTE = "mByte";
- public static final String PROPERTY_NAME_MBYTEARRAY = "mByteArray";
-
- private long mLong;
- private double mDouble;
- private byte mByte;
- private byte mByteArray[];
-
- public long getMLong() {
- return mLong;
- }
-
- public void setMLong(final long key) {
- mLong = key;
- }
-
- public double getMDouble() {
- return mDouble;
- }
-
- public void setMDouble(final double mDouble) {
- this.mDouble = mDouble;
- }
-
- public byte getMByte() {
- return mByte;
- }
-
- public void setMByte(final byte mByte) {
- this.mByte = mByte;
- }
-
- public byte[] getMByteArray() {
- return mByteArray;
- }
-
- public void setMByteArray(final byte mByteArray[]) {
- this.mByteArray = mByteArray;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java
deleted file mode 100644
index 609017b..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * 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.mock.data;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TimeZone;
-import java.util.UUID;
-
-import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
-import org.apache.olingo.odata2.api.ep.feed.ODataFeed;
-import org.apache.olingo.odata2.processor.core.jpa.mock.data.JPATypeMock.JPARelatedTypeMock;
-import org.apache.olingo.odata2.processor.core.jpa.mock.data.JPATypeMock.JPATypeEmbeddableMock;
-import org.apache.olingo.odata2.processor.core.jpa.mock.data.JPATypeMock.JPATypeEmbeddableMock2;
-import org.easymock.EasyMock;
-
-public class ODataEntryMockUtil {
-
- public static final int VALUE_MINT = 20;
- public static Calendar VALUE_DATE_TIME = null;
- public static final String VALUE_MSTRING = "Mock";
- public static final long VALUE_MLONG = 1234567890L;
- public static final double VALUE_MDOUBLE = 20.12;
- public static final byte VALUE_MBYTE = 0XA;
- public static final byte[] VALUE_MBYTEARRAY = { 0XA, 0XB };
- public static final float VALUE_MFLOAT = 2.00F;
- public static final UUID VALUE_UUID = UUID.fromString("38400000-8cf0-11bd-b23e-10b96e4ef00d");
- public static final short VALUE_SHORT = 2;
-
- public static ODataEntry mockODataEntry(final String entityName) {
- ODataEntry oDataEntry = EasyMock.createMock(ODataEntry.class);
- EasyMock.expect(oDataEntry.getProperties()).andReturn(mockODataEntryProperties(entityName)).anyTimes();
-
- EasyMock.expect(oDataEntry.containsInlineEntry()).andReturn(false);
- EasyMock.replay(oDataEntry);
- return oDataEntry;
- }
-
- public static ODataEntry mockODataEntryWithComplexType(final String entityName) {
- ODataEntry oDataEntry = EasyMock.createMock(ODataEntry.class);
- EasyMock.expect(oDataEntry.getProperties()).andReturn(mockODataEntryPropertiesWithComplexType(entityName))
- .anyTimes();
-
- EasyMock.expect(oDataEntry.containsInlineEntry()).andReturn(false);
- EasyMock.replay(oDataEntry);
- return oDataEntry;
- }
-
- public static Map<String, Object> mockODataEntryProperties(final String entityName) {
- Map<String, Object> propertyMap = new HashMap<String, Object>();
-
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- propertyMap.put(JPATypeMock.PROPERTY_NAME_MINT, VALUE_MINT);
-
- VALUE_DATE_TIME = Calendar.getInstance(TimeZone.getDefault());
- VALUE_DATE_TIME.set(2013, 1, 1, 1, 1, 1);
- propertyMap.put(JPATypeMock.PROPERTY_NAME_MDATETIME, VALUE_DATE_TIME);
-
- propertyMap.put(JPATypeMock.PROPERTY_NAME_MSTRING, VALUE_MSTRING);
- } else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
- propertyMap.put(JPARelatedTypeMock.PROPERTY_NAME_MLONG, VALUE_MLONG);
- propertyMap.put(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE, VALUE_MDOUBLE);
- propertyMap.put(JPARelatedTypeMock.PROPERTY_NAME_MBYTE, VALUE_MBYTE);
- propertyMap.put(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY, VALUE_MBYTEARRAY);
- } else if (entityName.equals(JPATypeEmbeddableMock.ENTITY_NAME)) {
- propertyMap.put(JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT, VALUE_SHORT);
- propertyMap.put(JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE,
- mockODataEntryProperties(JPATypeEmbeddableMock2.ENTITY_NAME));
- } else if (entityName.equals(JPATypeEmbeddableMock2.ENTITY_NAME)) {
- propertyMap.put(JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT, VALUE_MFLOAT);
- propertyMap.put(JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID, VALUE_UUID);
- }
-
- return propertyMap;
- }
-
- public static Map<String, Object> mockODataEntryPropertiesWithComplexType(final String entityName) {
- Map<String, Object> propertyMap = mockODataEntryProperties(entityName);
- propertyMap
- .put(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE, mockODataEntryProperties(JPATypeEmbeddableMock.ENTITY_NAME));
- return propertyMap;
- }
-
- public static Map<String, Object> mockODataEntryPropertiesWithInline(final String entityName) {
- Map<String, Object> propertyMap = mockODataEntryProperties(entityName);
- List<ODataEntry> relatedEntries = new ArrayList<ODataEntry>();
- relatedEntries.add(mockODataEntry(JPARelatedTypeMock.ENTITY_NAME));
- ODataFeed feed = EasyMock.createMock(ODataFeed.class);
- EasyMock.expect(feed.getEntries()).andReturn(relatedEntries);
- EasyMock.replay(feed);
- propertyMap.put(JPATypeMock.NAVIGATION_PROPERTY_X, feed);
-
- return propertyMap;
-
- }
-
- public static ODataEntry mockODataEntryWithInline(final String entityName) {
- ODataEntry oDataEntry = EasyMock.createMock(ODataEntry.class);
- EasyMock.expect(oDataEntry.getProperties()).andReturn(mockODataEntryPropertiesWithInline(entityName)).anyTimes();
- if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
- EasyMock.expect(oDataEntry.containsInlineEntry()).andReturn(true);
- } else {
- EasyMock.expect(oDataEntry.containsInlineEntry()).andReturn(false);
- }
- EasyMock.replay(oDataEntry);
- return oDataEntry;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java
deleted file mode 100644
index c54411e..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.mock.data;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SalesOrderHeader {
-
- private int id;
- private String description;
-
- public SalesOrderHeader() {}
-
- public SalesOrderHeader(final int id, final String description) {
- super();
- this.id = id;
- this.description = description;
- }
-
- private List<SalesOrderLineItem> salesOrderLineItems = new ArrayList<SalesOrderLineItem>();
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(final int id) {
- this.id = id;
- }
-
- public List<SalesOrderLineItem> getSalesOrderLineItems() {
- return salesOrderLineItems;
- }
-
- public void setSalesOrderLineItems(final List<SalesOrderLineItem> salesOrderLineItems) {
- this.salesOrderLineItems = salesOrderLineItems;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java
deleted file mode 100644
index ba9c09a..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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.mock.data;
-
-public class SalesOrderLineItem {
-
- private int price;
-
- public SalesOrderLineItem(final int price) {
- super();
- this.price = price;
- }
-
- public int getPrice() {
- return price;
- }
-
- public void setPrice(final int price) {
- this.price = price;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java
deleted file mode 100644
index d8b7ee3..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.mock.data;
-
-public class SalesOrderLineItemKey {
-
- private int soId;
- private int liId;
-
- public SalesOrderLineItemKey() {
-
- }
-
- public SalesOrderLineItemKey(final int soId, final int liId) {
- super();
- this.soId = soId;
- this.liId = liId;
- }
-
- public int getSoId() {
- return soId;
- }
-
- public void setSoId(final int soId) {
- this.soId = soId;
- }
-
- public int getLiId() {
- return liId;
- }
-
- public void setLiId(final int liId) {
- this.liId = liId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java
deleted file mode 100644
index 879c2c2..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.edm.EdmMultiplicity;
-import org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind;
-import org.apache.olingo.odata2.api.edm.FullQualifiedName;
-import org.apache.olingo.odata2.api.edm.provider.Association;
-import org.apache.olingo.odata2.api.edm.provider.AssociationEnd;
-import org.apache.olingo.odata2.api.edm.provider.AssociationSet;
-import org.apache.olingo.odata2.api.edm.provider.AssociationSetEnd;
-import org.apache.olingo.odata2.api.edm.provider.ComplexType;
-import org.apache.olingo.odata2.api.edm.provider.EntityContainer;
-import org.apache.olingo.odata2.api.edm.provider.EntitySet;
-import org.apache.olingo.odata2.api.edm.provider.EntityType;
-import org.apache.olingo.odata2.api.edm.provider.FunctionImport;
-import org.apache.olingo.odata2.api.edm.provider.Key;
-import org.apache.olingo.odata2.api.edm.provider.Mapping;
-import org.apache.olingo.odata2.api.edm.provider.Property;
-import org.apache.olingo.odata2.api.edm.provider.PropertyRef;
-import org.apache.olingo.odata2.api.edm.provider.Schema;
-import org.apache.olingo.odata2.api.edm.provider.SimpleProperty;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmMapping;
-import org.apache.olingo.odata2.processor.core.jpa.model.JPAEdmMappingImpl;
-
-public class EdmSchemaMock {
-
- private static final String ASSOCIATION_ROLE_NAME_ONE = "SalesOrderHeader";
- private static final String ASSOCIATION_NAME = "SalesOrderHeader_SalesOrderItem";
- private static final String ASSOCIATION_SET_NAME = "SalesOrderHeader_SalesOrderItemSet";
- private static final String ASSOCIATION_ROLE_NAME_TWO = "SalesOrderItem";
- private static final String NAMESPACE = "salesorderprocessing";
- private static final String ENTITY_CONTAINER_NAME = "salesorderprocessingContainer";
- private static final String ENTITY_NAME_ONE = "SalesOrderHeader";
- private static final String ENTITY_NAME_TWO = "SalesOrderItem";
- private static final String ENTITY_SET_NAME_ONE = "SalesOrderHeaders";
- private static final String FUNCTION_IMPORT_NAME_ONE = "SalesOrder_FunctionImport1";
- private static final String FUNCTION_IMPORT_NAME_TWO = "SalesOrder_FunctionImport2";
- private static final String ENTITY_SET_NAME_TWO = "SalesOrderItems";
- private static final String COMPLEX_TYPE_NAME_ONE = "Address";
- private static final String COMPLEX_TYPE_NAME_TWO = "SalesOrderItemKey";
-
- public static Schema createMockEdmSchema() {
- Schema schema = new Schema();
- schema.setNamespace(NAMESPACE);
- schema.setComplexTypes(createComplexTypes());
- schema.setEntityContainers(createEntityContainer());
- schema.setEntityTypes(createEntityTypes());
- schema.setAssociations(createAssociations());
- return schema;
- }
-
- private static List<EntityContainer> createEntityContainer() {
- List<EntityContainer> entityContainers = new ArrayList<EntityContainer>();
- EntityContainer entityContainer = new EntityContainer();
- entityContainer.setDefaultEntityContainer(true);
- entityContainer.setName(ENTITY_CONTAINER_NAME);
- entityContainer.setEntitySets(createEntitySets());
- entityContainer.setAssociationSets(createAssociationSets());
- entityContainer.setFunctionImports(createFunctionImports());
- entityContainers.add(entityContainer);
- return entityContainers;
- }
-
- private static List<AssociationSet> createAssociationSets() {
- List<AssociationSet> associationSets = new ArrayList<AssociationSet>();
- AssociationSet associationSet = new AssociationSet();
- associationSet.setName(ASSOCIATION_SET_NAME);
- associationSet.setAssociation(new FullQualifiedName(NAMESPACE, ASSOCIATION_NAME));
- associationSet
- .setEnd1(new AssociationSetEnd().setEntitySet(ENTITY_SET_NAME_ONE).setRole(ASSOCIATION_ROLE_NAME_ONE));
- associationSet
- .setEnd2(new AssociationSetEnd().setEntitySet(ENTITY_SET_NAME_TWO).setRole(ASSOCIATION_ROLE_NAME_TWO));
- associationSets.add(associationSet);
- return associationSets;
- }
-
- private static List<EntitySet> createEntitySets() {
- List<EntitySet> entitySets = new ArrayList<EntitySet>();
- EntitySet entitySet = new EntitySet();
- entitySet.setName(ENTITY_SET_NAME_ONE);
- entitySet.setEntityType(new FullQualifiedName(NAMESPACE, ENTITY_NAME_ONE));
- entitySets.add(entitySet);
- entitySet = new EntitySet();
- entitySet.setName(ENTITY_SET_NAME_TWO);
- entitySet.setEntityType(new FullQualifiedName(NAMESPACE, ENTITY_NAME_TWO));
- entitySets.add(entitySet);
- return entitySets;
- }
-
- private static List<FunctionImport> createFunctionImports() {
- List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
- FunctionImport functionImport = new FunctionImport();
- functionImport.setName(FUNCTION_IMPORT_NAME_ONE);
- functionImports.add(functionImport);
- functionImport = new FunctionImport();
- functionImport.setName(FUNCTION_IMPORT_NAME_TWO);
- functionImports.add(functionImport);
- return functionImports;
- }
-
- private static List<Association> createAssociations() {
- List<Association> associations = new ArrayList<Association>();
- Association association = new Association();
- association.setName(ASSOCIATION_NAME);
- association.setEnd1(new AssociationEnd().setMultiplicity(EdmMultiplicity.ONE).setRole(ASSOCIATION_ROLE_NAME_ONE)
- .setType(new FullQualifiedName(NAMESPACE, ENTITY_NAME_ONE)));
- association.setEnd2(new AssociationEnd().setMultiplicity(EdmMultiplicity.MANY).setRole(ASSOCIATION_ROLE_NAME_TWO)
- .setType(new FullQualifiedName(NAMESPACE, ENTITY_NAME_TWO)));
- associations.add(association);
- return associations;
- }
-
- private static List<EntityType> createEntityTypes() {
- List<EntityType> entityTypes = new ArrayList<EntityType>();
- EntityType entityType = new EntityType();
- entityType.setName(ENTITY_NAME_ONE);
- String[] keyNamesOne = { "SoId" };
- entityType.setKey(createKey(keyNamesOne));
- entityTypes.add(entityType);
-
- entityType = new EntityType();
- entityType.setName(ENTITY_NAME_TWO);
- String[] keyNamesTwo = { "SoId", "LiId" };
- entityType.setKey(createKey(keyNamesTwo));
- entityTypes.add(entityType);
- return entityTypes;
-
- }
-
- private static Key createKey(final String[] keyNames) {
- Key key = new Key();
- List<PropertyRef> keys = new ArrayList<PropertyRef>();
- for (String keyName : keyNames) {
- keys.add(new PropertyRef().setName(keyName));
- }
- key.setKeys(keys);
- return null;
- }
-
- private static List<ComplexType> createComplexTypes() {
- List<ComplexType> complexTypes = new ArrayList<ComplexType>();
- ComplexType complexTypeOne = new ComplexType();
- complexTypeOne.setName(COMPLEX_TYPE_NAME_ONE);
- complexTypeOne.setProperties(createComplexTypePropertiesOne());
- complexTypes.add(complexTypeOne);
- ComplexType complexTypeTwo = new ComplexType();
- complexTypeTwo.setName(COMPLEX_TYPE_NAME_TWO);
- complexTypeTwo.setProperties(createComplexTypePropertiesTwo());
- complexTypes.add(complexTypeTwo);
- return complexTypes;
- }
-
- private static List<Property> createComplexTypePropertiesTwo() {
- List<Property> properties = new ArrayList<Property>();
- SimpleProperty property = new SimpleProperty();
- property.setName("SoId");
- property.setType(EdmSimpleTypeKind.Int64);
- JPAEdmMapping mapping = new JPAEdmMappingImpl();
- mapping.setJPAColumnName("Sales_Order_Id");
- ((Mapping) mapping).setInternalName("SalesOrderItemKey.SoId");
- property.setMapping((Mapping) mapping);
- properties.add(property);
- property = new SimpleProperty();
- property.setName("LiId");
- property.setType(EdmSimpleTypeKind.Int64);
- mapping = new JPAEdmMappingImpl();
- mapping.setJPAColumnName("Sales_Order_Item_Id");
- property.setMapping((Mapping) mapping);
- properties.add(property);
- return properties;
-
- }
-
- private static List<Property> createComplexTypePropertiesOne() {
- List<Property> properties = new ArrayList<Property>();
- SimpleProperty property = new SimpleProperty();
- property.setName("StreetName");
- property.setType(EdmSimpleTypeKind.String);
- JPAEdmMapping mapping = new JPAEdmMappingImpl();
- mapping.setJPAColumnName("STREET_NAME");
- property.setMapping((Mapping) mapping);
- properties.add(property);
- property = new SimpleProperty();
- property.setName("City");
- property.setType(EdmSimpleTypeKind.String);
- mapping = new JPAEdmMappingImpl();
- mapping.setJPAColumnName("CITY");
- property.setMapping((Mapping) mapping);
- properties.add(property);
- return properties;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java
deleted file mode 100644
index 9d6bad1..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.lang.reflect.Member;
-
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.ManagedType;
-
-public abstract class JPAAttributeMock<X, Y> implements Attribute<X, Y> {
-
- @Override
- public ManagedType<X> getDeclaringType() {
- return null;
- }
-
- @Override
- public Member getJavaMember() {
- return null;
- }
-
- @Override
- public Class<Y> getJavaType() {
- return null;
- }
-
- @Override
- public String getName() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Attribute.PersistentAttributeType getPersistentAttributeType() {
- return null;
- }
-
- @Override
- public boolean isAssociation() {
- return false;
- }
-
- @Override
- public boolean isCollection() {
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java
deleted file mode 100644
index a91442a..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.Facets;
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport;
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport.Multiplicity;
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport.ReturnType;
-import org.apache.olingo.odata2.api.annotation.edm.Parameter;
-import org.apache.olingo.odata2.api.annotation.edm.Parameter.Mode;
-
-public class JPACustomProcessorMock {
-
- public static final String className = "JPACustomProcessorMock";
- public static final String edmName = "JPACustomProcessor";
-
- @FunctionImport(name = "Method1", entitySet = "MockSet", returnType = ReturnType.ENTITY_TYPE,
- multiplicity = Multiplicity.MANY)
- public List<JPACustomProcessorMock> method1(@Parameter(name = "Param1", facets = @Facets(nullable = true,
- maxLength = 2), mode = Mode.IN) final String param1, final int param2, @Parameter(name = "Param3",
- facets = @Facets(precision = 10, scale = 2), mode = Mode.IN) final double param3) {
- return new ArrayList<JPACustomProcessorMock>();
- }
-
- @FunctionImport(name = "Method2", entitySet = "MockSet", returnType = ReturnType.ENTITY_TYPE,
- multiplicity = Multiplicity.MANY)
- public List<JPACustomProcessorMock> method2(
- @Parameter(facets = @Facets(maxLength = 2), name = "Param2") final String param2) {
- return new ArrayList<JPACustomProcessorMock>();
- }
-
- @FunctionImport(returnType = ReturnType.SCALAR)
- public int method3(@Parameter(name = "Param3") final String param3) {
- return 0;
- }
-
- @FunctionImport(returnType = ReturnType.NONE)
- public void method4() {
- return;
- }
-
- @FunctionImport(returnType = ReturnType.ENTITY_TYPE, entitySet = "MockSet", multiplicity = Multiplicity.ONE)
- public JPACustomProcessorMock method7() {
- return null;
- }
-
- @FunctionImport(returnType = ReturnType.COMPLEX_TYPE, multiplicity = Multiplicity.ONE)
- public JPACustomProcessorMock method9() {
- return null;
- }
-
- @FunctionImport(returnType = ReturnType.COMPLEX_TYPE, multiplicity = Multiplicity.MANY)
- public List<JPACustomProcessorMock> method10() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorNegativeMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorNegativeMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorNegativeMock.java
deleted file mode 100644
index 2d0ef23..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorNegativeMock.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport;
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport.Multiplicity;
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport.ReturnType;
-import org.apache.olingo.odata2.api.annotation.edm.Parameter;
-
-public class JPACustomProcessorNegativeMock {
-
- @FunctionImport(returnType = ReturnType.ENTITY_TYPE, multiplicity = Multiplicity.MANY)
- public List<JPACustomProcessorNegativeMock> method5() {
- return null;
- }
-
- @FunctionImport(returnType = ReturnType.ENTITY_TYPE, entitySet = "MockSet", multiplicity = Multiplicity.MANY)
- public void method6() {
- return;
- }
-
- @FunctionImport(returnType = ReturnType.ENTITY_TYPE, entitySet = "MockSet", multiplicity = Multiplicity.MANY)
- public JPACustomProcessorNegativeMock method8() {
- return null;
- }
-
- @FunctionImport(returnType = ReturnType.COMPLEX_TYPE, multiplicity = Multiplicity.ONE)
- public JPACustomProcessorNegativeMock method11() {
- return null;
- }
-
- @FunctionImport(returnType = ReturnType.SCALAR, multiplicity = Multiplicity.ONE)
- public JPACustomProcessorMock method12() {
- return null;
- }
-
- @FunctionImport(returnType = ReturnType.SCALAR, multiplicity = Multiplicity.ONE)
- public int method13(@Parameter(name = "") final int y) {
- return 0;
- }
-
- @FunctionImport(returnType = ReturnType.SCALAR, multiplicity = Multiplicity.ONE)
- public void method16(@Parameter(name = "") final int y) {
- return;
- }
-
- @FunctionImport(returnType = ReturnType.COMPLEX_TYPE, multiplicity = Multiplicity.ONE)
- public void method17(@Parameter(name = "") final int y) {
- return;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java
deleted file mode 100644
index 9b25115..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import org.apache.olingo.odata2.processor.core.jpa.mock.model.JPAEdmMockData.EntityType.EntityTypeA;
-
-public interface JPAEdmMockData {
- /*
- * Edm Complex Type Mock Data
- */
- public interface ComplexType {
-
- public interface ComplexTypeA {
- public static final String name = "ComplexTypeA";
- public static final Class<ComplexTypeA> clazz = ComplexTypeA.class;
-
- public interface Property {
- public static final String PROPERTY_A = "A";
- public static final String PROPERTY_B = "B";
- public static final String PROPERTY_C = "C";
- }
-
- }
-
- public interface ComplexTypeB {
- public static final String name = "ComplexTypeB";
-
- public interface Property {
- public static final String PROPERTY_D = "D";
- public static final String PROPERTY_E = "E";
- }
-
- }
- }
-
- public interface EntityType {
- public interface EntityTypeA {
- public static final String name = "SalesOrderHeader";
- public static final Class<EntityTypeA> entityClazz = EntityTypeA.class;
-
- public interface Property {
- public static final String PROPERTY_A = SimpleType.SimpleTypeA.NAME;
-
- }
-
- }
- }
-
- public interface SimpleType {
- public interface SimpleTypeA {
- public static final String NAME = "SOID";
- public static final Class<String> clazz = String.class;
- public static final Class<EntityTypeA> declaringClazz = EntityType.EntityTypeA.class;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java
deleted file mode 100644
index 397f971..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.util.Set;
-
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.CollectionAttribute;
-import javax.persistence.metamodel.EmbeddableType;
-import javax.persistence.metamodel.ListAttribute;
-import javax.persistence.metamodel.MapAttribute;
-import javax.persistence.metamodel.PluralAttribute;
-import javax.persistence.metamodel.SetAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-
-public class JPAEmbeddableMock<X> implements EmbeddableType<X> {
-
- @Override
- public Attribute<? super X, ?> getAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public Set<Attribute<? super X, ?>> getAttributes() {
- return null;
- }
-
- @Override
- public CollectionAttribute<? super X, ?> getCollection(final String arg0) {
- return null;
- }
-
- @Override
- public <E> CollectionAttribute<? super X, E> getCollection(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public Attribute<X, ?> getDeclaredAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public Set<Attribute<X, ?>> getDeclaredAttributes() {
- return null;
- }
-
- @Override
- public CollectionAttribute<X, ?> getDeclaredCollection(final String arg0) {
- return null;
- }
-
- @Override
- public <E> CollectionAttribute<X, E> getDeclaredCollection(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public ListAttribute<X, ?> getDeclaredList(final String arg0) {
- return null;
- }
-
- @Override
- public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public MapAttribute<X, ?, ?> getDeclaredMap(final String arg0) {
- return null;
- }
-
- @Override
- public <K, V> MapAttribute<X, K, V> getDeclaredMap(final String arg0, final Class<K> arg1, final Class<V> arg2) {
- return null;
- }
-
- @Override
- public Set<PluralAttribute<X, ?, ?>> getDeclaredPluralAttributes() {
- return null;
- }
-
- @Override
- public SetAttribute<X, ?> getDeclaredSet(final String arg0) {
- return null;
- }
-
- @Override
- public <E> SetAttribute<X, E> getDeclaredSet(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public SingularAttribute<X, ?> getDeclaredSingularAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(final String arg0, final Class<Y> arg1) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<X, ?>> getDeclaredSingularAttributes() {
- return null;
- }
-
- @Override
- public ListAttribute<? super X, ?> getList(final String arg0) {
- return null;
- }
-
- @Override
- public <E> ListAttribute<? super X, E> getList(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public MapAttribute<? super X, ?, ?> getMap(final String arg0) {
- return null;
- }
-
- @Override
- public <K, V> MapAttribute<? super X, K, V> getMap(final String arg0, final Class<K> arg1, final Class<V> arg2) {
- return null;
- }
-
- @Override
- public Set<PluralAttribute<? super X, ?, ?>> getPluralAttributes() {
- return null;
- }
-
- @Override
- public SetAttribute<? super X, ?> getSet(final String arg0) {
- return null;
- }
-
- @Override
- public <E> SetAttribute<? super X, E> getSet(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public SingularAttribute<? super X, ?> getSingularAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<? super X, Y> getSingularAttribute(final String arg0, final Class<Y> arg1) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<? super X, ?>> getSingularAttributes() {
- return null;
- }
-
- @Override
- public Class<X> getJavaType() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Type.PersistenceType getPersistenceType() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java
deleted file mode 100644
index 7f6adc8..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.util.Set;
-
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.CollectionAttribute;
-import javax.persistence.metamodel.EmbeddableType;
-import javax.persistence.metamodel.ListAttribute;
-import javax.persistence.metamodel.MapAttribute;
-import javax.persistence.metamodel.PluralAttribute;
-import javax.persistence.metamodel.SetAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-
-public class JPAEmbeddableTypeMock<X> implements EmbeddableType<X> {
-
- @Override
- public Attribute<? super X, ?> getAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public Set<Attribute<? super X, ?>> getAttributes() {
- return null;
- }
-
- @Override
- public CollectionAttribute<? super X, ?> getCollection(final String arg0) {
- return null;
- }
-
- @Override
- public <E> CollectionAttribute<? super X, E> getCollection(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public Attribute<X, ?> getDeclaredAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public Set<Attribute<X, ?>> getDeclaredAttributes() {
- return null;
- }
-
- @Override
- public CollectionAttribute<X, ?> getDeclaredCollection(final String arg0) {
- return null;
- }
-
- @Override
- public <E> CollectionAttribute<X, E> getDeclaredCollection(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public ListAttribute<X, ?> getDeclaredList(final String arg0) {
- return null;
- }
-
- @Override
- public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public MapAttribute<X, ?, ?> getDeclaredMap(final String arg0) {
- return null;
- }
-
- @Override
- public <K, V> MapAttribute<X, K, V> getDeclaredMap(final String arg0, final Class<K> arg1, final Class<V> arg2) {
- return null;
- }
-
- @Override
- public Set<PluralAttribute<X, ?, ?>> getDeclaredPluralAttributes() {
- return null;
- }
-
- @Override
- public SetAttribute<X, ?> getDeclaredSet(final String arg0) {
- return null;
- }
-
- @Override
- public <E> SetAttribute<X, E> getDeclaredSet(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public SingularAttribute<X, ?> getDeclaredSingularAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(final String arg0, final Class<Y> arg1) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<X, ?>> getDeclaredSingularAttributes() {
- return null;
- }
-
- @Override
- public ListAttribute<? super X, ?> getList(final String arg0) {
- return null;
- }
-
- @Override
- public <E> ListAttribute<? super X, E> getList(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public MapAttribute<? super X, ?, ?> getMap(final String arg0) {
- return null;
- }
-
- @Override
- public <K, V> MapAttribute<? super X, K, V> getMap(final String arg0, final Class<K> arg1, final Class<V> arg2) {
- return null;
- }
-
- @Override
- public Set<PluralAttribute<? super X, ?, ?>> getPluralAttributes() {
- return null;
- }
-
- @Override
- public SetAttribute<? super X, ?> getSet(final String arg0) {
- return null;
- }
-
- @Override
- public <E> SetAttribute<? super X, E> getSet(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public SingularAttribute<? super X, ?> getSingularAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<? super X, Y> getSingularAttribute(final String arg0, final Class<Y> arg1) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<? super X, ?>> getSingularAttributes() {
- return null;
- }
-
- @Override
- public Class<X> getJavaType() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Type.PersistenceType getPersistenceType() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java
deleted file mode 100644
index 602d430..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.util.Set;
-
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.CollectionAttribute;
-import javax.persistence.metamodel.EntityType;
-import javax.persistence.metamodel.IdentifiableType;
-import javax.persistence.metamodel.ListAttribute;
-import javax.persistence.metamodel.MapAttribute;
-import javax.persistence.metamodel.PluralAttribute;
-import javax.persistence.metamodel.SetAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.Type;
-
-public abstract class JPAEntityTypeMock<X> implements EntityType<X> {
-
- @Override
- public <Y> SingularAttribute<X, Y> getDeclaredId(final Class<Y> arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<X, Y> getDeclaredVersion(final Class<Y> arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<? super X, Y> getId(final Class<Y> arg0) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<? super X, ?>> getIdClassAttributes() {
- return null;
- }
-
- @Override
- public Type<?> getIdType() {
- return null;
- }
-
- @Override
- public IdentifiableType<? super X> getSupertype() {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<? super X, Y> getVersion(final Class<Y> arg0) {
- return null;
- }
-
- @Override
- public boolean hasSingleIdAttribute() {
- return false;
- }
-
- @Override
- public boolean hasVersionAttribute() {
- return false;
- }
-
- @Override
- public Attribute<? super X, ?> getAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public Set<Attribute<? super X, ?>> getAttributes() {
- return null;
- }
-
- @Override
- public CollectionAttribute<? super X, ?> getCollection(final String arg0) {
- return null;
- }
-
- @Override
- public <E> CollectionAttribute<? super X, E> getCollection(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public Attribute<X, ?> getDeclaredAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public Set<Attribute<X, ?>> getDeclaredAttributes() {
- return null;
- }
-
- @Override
- public CollectionAttribute<X, ?> getDeclaredCollection(final String arg0) {
- return null;
- }
-
- @Override
- public <E> CollectionAttribute<X, E> getDeclaredCollection(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public ListAttribute<X, ?> getDeclaredList(final String arg0) {
- return null;
- }
-
- @Override
- public <E> ListAttribute<X, E> getDeclaredList(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public MapAttribute<X, ?, ?> getDeclaredMap(final String arg0) {
- return null;
- }
-
- @Override
- public <K, V> MapAttribute<X, K, V> getDeclaredMap(final String arg0, final Class<K> arg1, final Class<V> arg2) {
- return null;
- }
-
- @Override
- public Set<PluralAttribute<X, ?, ?>> getDeclaredPluralAttributes() {
- return null;
- }
-
- @Override
- public SetAttribute<X, ?> getDeclaredSet(final String arg0) {
- return null;
- }
-
- @Override
- public <E> SetAttribute<X, E> getDeclaredSet(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public SingularAttribute<X, ?> getDeclaredSingularAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(final String arg0, final Class<Y> arg1) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<X, ?>> getDeclaredSingularAttributes() {
- return null;
- }
-
- @Override
- public ListAttribute<? super X, ?> getList(final String arg0) {
- return null;
- }
-
- @Override
- public <E> ListAttribute<? super X, E> getList(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public MapAttribute<? super X, ?, ?> getMap(final String arg0) {
- return null;
- }
-
- @Override
- public <K, V> MapAttribute<? super X, K, V> getMap(final String arg0, final Class<K> arg1, final Class<V> arg2) {
- return null;
- }
-
- @Override
- public Set<PluralAttribute<? super X, ?, ?>> getPluralAttributes() {
- return null;
- }
-
- @Override
- public SetAttribute<? super X, ?> getSet(final String arg0) {
- return null;
- }
-
- @Override
- public <E> SetAttribute<? super X, E> getSet(final String arg0, final Class<E> arg1) {
- return null;
- }
-
- @Override
- public SingularAttribute<? super X, ?> getSingularAttribute(final String arg0) {
- return null;
- }
-
- @Override
- public <Y> SingularAttribute<? super X, Y> getSingularAttribute(final String arg0, final Class<Y> arg1) {
- return null;
- }
-
- @Override
- public Set<SingularAttribute<? super X, ?>> getSingularAttributes() {
- return null;
- }
-
- @Override
- public Class<X> getJavaType() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Type.PersistenceType getPersistenceType() {
- return null;
- }
-
- @Override
- public Class<X> getBindableJavaType() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Bindable.BindableType getBindableType() {
- return null;
- }
-
- @Override
- public String getName() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java b/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java
deleted file mode 100644
index 740a2ec..0000000
--- a/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.mock.model;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Member;
-
-import javax.persistence.JoinColumns;
-
-public class JPAJavaMemberMock implements Member, AnnotatedElement, Annotation {
-
- @Override
- public Class<?> getDeclaringClass() {
- return null;
- }
-
- @Override
- public String getName() {
- return null;
- }
-
- @Override
- public int getModifiers() {
- return 0;
- }
-
- @Override
- public boolean isSynthetic() {
- return false;
- }
-
- @Override
- public boolean isAnnotationPresent(final Class<? extends Annotation> annotationClass) {
- return false;
- }
-
- @Override
- public Annotation[] getAnnotations() {
- return null;
- }
-
- @Override
- public Annotation[] getDeclaredAnnotations() {
- return null;
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return JoinColumns.class;
- }
-
- @Override
- public <T extends Annotation> T getAnnotation(final Class<T> annotationClass) {
- return null;
- }
-
-}