You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/12/28 15:18:01 UTC
[03/31] [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-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/ODataEntryMockUtil.java
deleted file mode 100644
index 609017b..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderHeader.java
deleted file mode 100644
index c54411e..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItem.java
deleted file mode 100644
index ba9c09a..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/data/SalesOrderLineItemKey.java
deleted file mode 100644
index d8b7ee3..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/EdmSchemaMock.java
deleted file mode 100644
index 879c2c2..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAAttributeMock.java
deleted file mode 100644
index 9d6bad1..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.java
deleted file mode 100644
index 54a6871..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPACustomProcessorMock.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.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmFacets;
-import org.apache.olingo.odata2.api.annotation.edm.EdmFunctionImport;
-import org.apache.olingo.odata2.api.annotation.edm.EdmFunctionImport.ReturnType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmFunctionImport.ReturnType.Type;
-import org.apache.olingo.odata2.api.annotation.edm.EdmFunctionImportParameter;
-
-public class JPACustomProcessorMock {
-
- public static final String className = "JPACustomProcessorMock";
- public static final String edmName = "JPACustomProcessor";
-
- @EdmFunctionImport(name = "Method1", entitySet = "MockSet", returnType = @ReturnType(type = Type.ENTITY,
- isCollection = true))
- public List<JPACustomProcessorMock> method1(@EdmFunctionImportParameter(name = "Param1", facets = @EdmFacets(
- nullable = true,
- maxLength = 2)) final String param1, final int param2, @EdmFunctionImportParameter(name = "Param3",
- facets = @EdmFacets(precision = 10, scale = 2)) final double param3) {
- return new ArrayList<JPACustomProcessorMock>();
- }
-
- @EdmFunctionImport(name = "Method2", entitySet = "MockSet", returnType = @ReturnType(type = Type.ENTITY,
- isCollection = true))
- public List<JPACustomProcessorMock> method2(
- @EdmFunctionImportParameter(facets = @EdmFacets(maxLength = 2), name = "Param2") final String param2) {
- return new ArrayList<JPACustomProcessorMock>();
- }
-
- @EdmFunctionImport(returnType = @ReturnType(type = Type.SIMPLE))
- public int method3(@EdmFunctionImportParameter(name = "Param3") final String param3) {
- return 0;
- }
-
- @EdmFunctionImport(returnType = @ReturnType(type = Type.ENTITY,
- isCollection = false), entitySet = "MockSet")
- public JPACustomProcessorMock method7() {
- return null;
- }
-
- @EdmFunctionImport(returnType = @ReturnType(type = Type.COMPLEX,
- isCollection = false))
- public JPACustomProcessorMock method9() {
- return null;
- }
-
- @EdmFunctionImport(returnType = @ReturnType(type = Type.COMPLEX,
- isCollection = true))
- public List<JPACustomProcessorMock> method10() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEdmMockData.java
deleted file mode 100644
index 9b25115..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableMock.java
deleted file mode 100644
index 397f971..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEmbeddableTypeMock.java
deleted file mode 100644
index 7f6adc8..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAEntityTypeMock.java
deleted file mode 100644
index 602d430..0000000
--- a/odata2-jpa-processor/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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAJavaMemberMock.java
deleted file mode 100644
index 740a2ec..0000000
--- a/odata2-jpa-processor/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;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAManagedTypeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAManagedTypeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAManagedTypeMock.java
deleted file mode 100644
index 915c562..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAManagedTypeMock.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.ListAttribute;
-import javax.persistence.metamodel.ManagedType;
-import javax.persistence.metamodel.MapAttribute;
-import javax.persistence.metamodel.PluralAttribute;
-import javax.persistence.metamodel.SetAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-
-public class JPAManagedTypeMock<X> implements ManagedType<X> {
-
- @Override
- public Class<X> getJavaType() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Type.PersistenceType getPersistenceType() {
- return null;
- }
-
- @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;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAMetaModelMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAMetaModelMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAMetaModelMock.java
deleted file mode 100644
index 8e528b2..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAMetaModelMock.java
+++ /dev/null
@@ -1,60 +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.EmbeddableType;
-import javax.persistence.metamodel.EntityType;
-import javax.persistence.metamodel.ManagedType;
-import javax.persistence.metamodel.Metamodel;
-
-public class JPAMetaModelMock implements Metamodel {
-
- @Override
- public <X> EmbeddableType<X> embeddable(final Class<X> arg0) {
- return null;
- }
-
- @Override
- public <X> EntityType<X> entity(final Class<X> arg0) {
- return null;
- }
-
- @Override
- public Set<EmbeddableType<?>> getEmbeddables() {
- return null;
- }
-
- @Override
- public Set<EntityType<?>> getEntities() {
- return null;
- }
-
- @Override
- public Set<ManagedType<?>> getManagedTypes() {
- return null;
- }
-
- @Override
- public <X> ManagedType<X> managedType(final Class<X> arg0) {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAPluralAttributeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAPluralAttributeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAPluralAttributeMock.java
deleted file mode 100644
index a4aa2b5..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPAPluralAttributeMock.java
+++ /dev/null
@@ -1,95 +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 java.util.ArrayList;
-
-import javax.persistence.metamodel.ManagedType;
-import javax.persistence.metamodel.PluralAttribute;
-import javax.persistence.metamodel.Type;
-
-public class JPAPluralAttributeMock implements PluralAttribute<Object, ArrayList<String>, String> {
-
- @Override
- public String getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Attribute.PersistentAttributeType getPersistentAttributeType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ManagedType<Object> getDeclaringType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Class<ArrayList<String>> getJavaType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Member getJavaMember() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public boolean isAssociation() {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean isCollection() {
- return false;
- }
-
- @Override
- public javax.persistence.metamodel.Bindable.BindableType getBindableType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Class<String> getBindableJavaType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.PluralAttribute.CollectionType getCollectionType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Type<String> getElementType() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPASingularAttributeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPASingularAttributeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPASingularAttributeMock.java
deleted file mode 100644
index 41124fe..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/JPASingularAttributeMock.java
+++ /dev/null
@@ -1,94 +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.ManagedType;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.Type;
-
-public class JPASingularAttributeMock<X, T> implements SingularAttribute<X, T> {
-
- @Override
- public ManagedType<X> getDeclaringType() {
- return null;
- }
-
- @Override
- public Member getJavaMember() {
- return null;
- }
-
- @Override
- public Class<T> 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;
- }
-
- @Override
- public Class<T> getBindableJavaType() {
- return null;
- }
-
- @Override
- public javax.persistence.metamodel.Bindable.BindableType getBindableType() {
- return null;
- }
-
- @Override
- public Type<T> getType() {
- return null;
- }
-
- @Override
- public boolean isId() {
- return false;
- }
-
- @Override
- public boolean isOptional() {
- return false;
- }
-
- @Override
- public boolean isVersion() {
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorMock.java
deleted file mode 100644
index dbc6d7a..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorMock.java
+++ /dev/null
@@ -1,77 +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;
-
-@Deprecated
-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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorNegativeMock.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorNegativeMock.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorNegativeMock.java
deleted file mode 100644
index 6799949..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/mock/model/_JPACustomProcessorNegativeMock.java
+++ /dev/null
@@ -1,70 +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;
-
-@Deprecated
-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/63b621a8/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmAssociationEndTest.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmAssociationEndTest.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmAssociationEndTest.java
deleted file mode 100644
index 05db5ab..0000000
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmAssociationEndTest.java
+++ /dev/null
@@ -1,177 +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.model;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import javax.persistence.metamodel.Attribute;
-
-import org.apache.olingo.odata2.api.edm.EdmMultiplicity;
-import org.apache.olingo.odata2.api.edm.FullQualifiedName;
-import org.apache.olingo.odata2.api.edm.provider.AssociationEnd;
-import org.apache.olingo.odata2.api.edm.provider.EntityType;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.processor.core.jpa.common.ODataJPATestConstants;
-import org.apache.olingo.odata2.processor.core.jpa.mock.model.JPAAttributeMock;
-import org.apache.olingo.odata2.processor.core.jpa.mock.model.JPAEdmMockData.SimpleType;
-import org.apache.olingo.odata2.processor.core.jpa.mock.model.JPAEdmMockData.SimpleType.SimpleTypeA;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class JPAEdmAssociationEndTest extends JPAEdmTestModelView {
-
- private final static int VARIANT1 = 1;
- private final static int VARIANT2 = 2;
- private final static int VARIANT3 = 3;
-
- private static int variant;
-
- private static final String PUNIT_NAME = "salesorderprocessing";
- private static JPAEdmAssociationEnd objJPAEdmAssociationEnd = null;
- private static JPAEdmAssociationEndTest objJPAEdmAssociationEndTest = null;
-
- @BeforeClass
- public static void setup() {
- objJPAEdmAssociationEndTest = new JPAEdmAssociationEndTest();
- objJPAEdmAssociationEnd = new JPAEdmAssociationEnd(objJPAEdmAssociationEndTest, objJPAEdmAssociationEndTest);
- try {
- objJPAEdmAssociationEnd.getBuilder().build();
- } catch (ODataJPAModelException e) {
- fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
- } catch (ODataJPARuntimeException e) {
- fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
- }
- }
-
- @Test
- public void testGetBuilder() {
- JPAEdmBuilder builder = objJPAEdmAssociationEnd.getBuilder();
- assertNotNull(builder);
-
- }
-
- @Test
- public void testGetBuilderIdempotent() {
- JPAEdmBuilder builder1 = objJPAEdmAssociationEnd.getBuilder();
- JPAEdmBuilder builder2 = objJPAEdmAssociationEnd.getBuilder();
-
- assertEquals(builder1.hashCode(), builder2.hashCode());
- }
-
- @Test
- public void testGetAssociationEnd1() {
- AssociationEnd associationEnd = objJPAEdmAssociationEnd.getEdmAssociationEnd1();
- assertEquals(associationEnd.getType().getName(), "SOID");
- }
-
- @Test
- public void testGetAssociationEnd2() {
- AssociationEnd associationEnd = objJPAEdmAssociationEnd.getEdmAssociationEnd2();
- assertEquals(associationEnd.getType().getName(), "String");
- }
-
- @Test
- public void testCompare() {
- assertTrue(objJPAEdmAssociationEnd.compare(getAssociationEnd("SOID", 1), getAssociationEnd("String", 1)));
- assertFalse(objJPAEdmAssociationEnd.compare(getAssociationEnd("String", 2), getAssociationEnd("SOID", 1)));
- }
-
- @Test
- public void testBuildAssociationEnd() {
- assertEquals("SOID", objJPAEdmAssociationEnd.getEdmAssociationEnd1().getType().getName());
- assertEquals(new FullQualifiedName("salesorderprocessing", "SOID"), objJPAEdmAssociationEnd.getEdmAssociationEnd1()
- .getType());
- assertTrue(objJPAEdmAssociationEnd.isConsistent());
-
- }
-
- private AssociationEnd getAssociationEnd(final String typeName, final int variant) {
- AssociationEnd associationEnd = new AssociationEnd();
- associationEnd.setType(getFullQualifiedName(typeName));
- if (variant == VARIANT1) {
- associationEnd.setMultiplicity(EdmMultiplicity.MANY);
- } else if (variant == VARIANT2) {
- associationEnd.setMultiplicity(EdmMultiplicity.ONE);
- } else if (variant == VARIANT3) {
- associationEnd.setMultiplicity(EdmMultiplicity.ZERO_TO_ONE);
- } else {
- associationEnd.setMultiplicity(EdmMultiplicity.MANY);//
- }
- return associationEnd;
- }
-
- private FullQualifiedName getFullQualifiedName(final String typeName) {
- FullQualifiedName fullQualifiedName = new FullQualifiedName(PUNIT_NAME, typeName);
- return fullQualifiedName;
- }
-
- private Attribute<?, ?> getJPAAttributeLocal() {
- AttributeMock<Object, String> attr = new AttributeMock<Object, String>();
- return attr;
- }
-
- @Override
- public Attribute<?, ?> getJPAAttribute() {
- return getJPAAttributeLocal();
- }
-
- @Override
- public String getpUnitName() {
- return PUNIT_NAME;
- }
-
- @Override
- public EntityType getEdmEntityType() {
- EntityType entityType = new EntityType();
- entityType.setName(SimpleTypeA.NAME);
- return entityType;
- }
-
- // The inner class which gives us an replica of the jpa attribute
- @SuppressWarnings("hiding")
- public class AttributeMock<Object, String> extends JPAAttributeMock<Object, String> {
-
- @SuppressWarnings("unchecked")
- @Override
- public Class<String> getJavaType() {
- return (Class<String>) SimpleType.SimpleTypeA.clazz;
- }
-
- @Override
- public PersistentAttributeType getPersistentAttributeType() {
- if (variant == VARIANT1) {
- return PersistentAttributeType.ONE_TO_MANY;
- } else if (variant == VARIANT2) {
- return PersistentAttributeType.ONE_TO_ONE;
- } else if (variant == VARIANT3) {
- return PersistentAttributeType.MANY_TO_ONE;
- } else {
- return PersistentAttributeType.MANY_TO_MANY;
- }
-
- }
- }
-
-}