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 2015/09/08 18:39:49 UTC
[32/55] [abbrv] olingo-odata4 git commit: [OLINGO-659] Removed v4
from package and class names
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyComposableInvoker.java
new file mode 100644
index 0000000..dca239d
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyComposableInvoker.java
@@ -0,0 +1,232 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.AbstractOpenType;
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+public interface PublicCompanyComposableInvoker
+ extends org.apache.olingo.ext.proxy.api.StructuredComposableInvoker<PublicCompany, PublicCompany.Operations>
+ , AbstractOpenType {
+
+ @Override
+ PublicCompanyComposableInvoker select(String... select);
+
+ @Override
+ PublicCompanyComposableInvoker expand(String... expand);
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CompanyID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getCompanyID();
+
+ void setCompanyID(java.lang.Integer _companyID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CompanyCategory",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.CompanyCategory",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ CompanyCategory
+ getCompanyCategory();
+
+ void
+ setCompanyCategory(
+ CompanyCategory _companyCategory);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Revenue",
+ type = "Edm.Int64",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Long getRevenue();
+
+ void setRevenue(java.lang.Long _revenue);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Name",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getName();
+
+ void setName(java.lang.String _name);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Address",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.Address",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ Address getAddress();
+
+ void
+ setAddress(
+ Address _address);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "StockExchange",
+ type = "Edm.String",
+ nullable = true,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getStockExchange();
+
+ void setStockExchange(java.lang.String _stockExchange);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Employees",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.Employee",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "InMemoryEntities",
+ targetEntitySet = "Employees",
+ containsTarget = false)
+ EmployeeCollection
+ getEmployees();
+
+ void
+ setEmployees(
+ EmployeeCollection _employees);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "VipCustomer",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.Customer",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "InMemoryEntities",
+ targetEntitySet = "VipCustomer",
+ containsTarget = false)
+ Customer
+ getVipCustomer();
+
+ void
+ setVipCustomer(
+ Customer _vipCustomer);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Departments",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.Department",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "InMemoryEntities",
+ targetEntitySet = "Departments",
+ containsTarget = false)
+ DepartmentCollection
+ getDepartments();
+
+ void
+ setDepartments(
+ DepartmentCollection _departments);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "CoreDepartment",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.Department",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "InMemoryEntities",
+ targetEntitySet = "Departments",
+ containsTarget = false)
+ Department
+ getCoreDepartment();
+
+ void
+ setCoreDepartment(
+ Department _coreDepartment);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Club",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.Club",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "",
+ targetEntitySet = "",
+ containsTarget = true)
+ Club getClub();
+
+ void setClub(
+ Club _club);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "LabourUnion",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.LabourUnion",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "InMemoryEntities",
+ targetEntitySet = "LabourUnion",
+ containsTarget = false)
+ LabourUnion
+ getLabourUnion();
+
+ void
+ setLabourUnion(
+ LabourUnion _labourUnion);
+
+ @org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "Assets",
+ type = "Microsoft.Test.OData.Services.ODataWCFService.LabourUnion",
+ targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
+ targetContainer = "InMemoryEntities",
+ targetEntitySet = "LabourUnion",
+ containsTarget = true)
+ PublicCompany.Assets
+ getAssets();
+
+ void
+ setAssets(
+ PublicCompany.Assets _assets);
+
+ @org.apache.olingo.ext.proxy.api.annotations.EntitySet(name = "Assets", contained = true)
+ interface Assets
+ extends
+ org.apache.olingo.ext.proxy.api.EntitySet<Asset, AssetCollection>,
+ org.apache.olingo.ext.proxy.api.StructuredCollectionQuery<Assets>,
+ AbstractEntitySet<Asset, java.lang.Integer, AssetCollection> {
+ // No additional methods needed for now.
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java
new file mode 100644
index 0000000..4062570
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java
@@ -0,0 +1,124 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+
+@org.apache.olingo.ext.proxy.api.annotations.Namespace("Microsoft.Test.OData.Services.ODataWCFService")
+@org.apache.olingo.ext.proxy.api.annotations.EntityType(name = "Statement",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface Statement
+ extends org.apache.olingo.ext.proxy.api.Annotatable,
+ org.apache.olingo.ext.proxy.api.EntityType<Statement>, org.apache.olingo.ext.proxy.api.StructuredQuery<Statement> {
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "StatementID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getStatementID();
+
+ void setStatementID(java.lang.Integer _statementID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "TransactionType",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTransactionType();
+
+ void setTransactionType(java.lang.String _transactionType);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "TransactionDescription",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTransactionDescription();
+
+ void setTransactionDescription(java.lang.String _transactionDescription);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Amount",
+ type = "Edm.Double",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Double getAmount();
+
+ void setAmount(java.lang.Double _amount);
+
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.ext.proxy.api.Operations {
+ // No additional methods needed for now.
+ }
+
+ Annotations annotations();
+
+ interface Annotations {
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "StatementID",
+ type = "Edm.Int32")
+ org.apache.olingo.ext.proxy.api.Annotatable getStatementIDAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "TransactionType",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getTransactionTypeAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "TransactionDescription",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getTransactionDescriptionAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Amount",
+ type = "Edm.Double")
+ org.apache.olingo.ext.proxy.api.Annotatable getAmountAnnotations();
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java
new file mode 100644
index 0000000..2f07e87
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java
@@ -0,0 +1,41 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import java.util.Collection;
+// CHECKSTYLE:ON (Maven checkstyle)
+
+import org.apache.olingo.ext.proxy.api.AbstractTerm;
+
+public interface StatementCollection
+ extends
+ org.apache.olingo.ext.proxy.api.StructuredCollectionQuery<StatementCollection>,
+org.apache.olingo.ext.proxy.api.EntityCollection<Statement, StatementCollection, StatementCollection> {
+
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.ext.proxy.api.Operations {
+ // No additional methods needed for now.
+ }
+
+ Object getAnnotation(Class<? extends AbstractTerm> term);
+
+ Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollectionComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollectionComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollectionComposableInvoker.java
new file mode 100644
index 0000000..df14aac
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollectionComposableInvoker.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+
+public interface StatementCollectionComposableInvoker
+ extends
+ org.apache.olingo.ext.proxy.api.StructuredCollectionComposableInvoker<StatementCollection, StatementCollection.Operations> {
+
+ @Override
+ StatementCollectionComposableInvoker select(String... select);
+
+ @Override
+ StatementCollectionComposableInvoker expand(String... expand);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementComposableInvoker.java
new file mode 100644
index 0000000..c6b290a
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementComposableInvoker.java
@@ -0,0 +1,97 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+
+public interface StatementComposableInvoker
+ extends org.apache.olingo.ext.proxy.api.StructuredComposableInvoker<Statement, Statement.Operations>
+{
+
+ @Override
+ StatementComposableInvoker select(String... select);
+
+ @Override
+ StatementComposableInvoker expand(String... expand);
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "StatementID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getStatementID();
+
+ void setStatementID(java.lang.Integer _statementID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "TransactionType",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTransactionType();
+
+ void setTransactionType(java.lang.String _transactionType);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "TransactionDescription",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTransactionDescription();
+
+ void setTransactionDescription(java.lang.String _transactionDescription);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Amount",
+ type = "Edm.Double",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Double getAmount();
+
+ void setAmount(java.lang.Double _amount);
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java
new file mode 100644
index 0000000..2394581
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java
@@ -0,0 +1,124 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+
+@org.apache.olingo.ext.proxy.api.annotations.Namespace("Microsoft.Test.OData.Services.ODataWCFService")
+@org.apache.olingo.ext.proxy.api.annotations.EntityType(name = "StoredPI",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface StoredPI
+ extends org.apache.olingo.ext.proxy.api.Annotatable,
+ org.apache.olingo.ext.proxy.api.EntityType<StoredPI>, org.apache.olingo.ext.proxy.api.StructuredQuery<StoredPI> {
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "StoredPIID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getStoredPIID();
+
+ void setStoredPIID(java.lang.Integer _storedPIID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "PIName",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getPIName();
+
+ void setPIName(java.lang.String _pIName);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "PIType",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getPIType();
+
+ void setPIType(java.lang.String _pIType);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CreatedDate",
+ type = "Edm.DateTimeOffset",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.sql.Timestamp getCreatedDate();
+
+ void setCreatedDate(java.sql.Timestamp _createdDate);
+
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.ext.proxy.api.Operations {
+ // No additional methods needed for now.
+ }
+
+ Annotations annotations();
+
+ interface Annotations {
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "StoredPIID",
+ type = "Edm.Int32")
+ org.apache.olingo.ext.proxy.api.Annotatable getStoredPIIDAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "PIName",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getPINameAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "PIType",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getPITypeAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "CreatedDate",
+ type = "Edm.DateTimeOffset")
+ org.apache.olingo.ext.proxy.api.Annotatable getCreatedDateAnnotations();
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java
new file mode 100644
index 0000000..b2622d9
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java
@@ -0,0 +1,41 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import java.util.Collection;
+// CHECKSTYLE:ON (Maven checkstyle)
+
+import org.apache.olingo.ext.proxy.api.AbstractTerm;
+
+public interface StoredPICollection
+ extends
+ org.apache.olingo.ext.proxy.api.StructuredCollectionQuery<StoredPICollection>,
+org.apache.olingo.ext.proxy.api.EntityCollection<StoredPI, StoredPICollection, StoredPICollection> {
+
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.ext.proxy.api.Operations {
+ // No additional methods needed for now.
+ }
+
+ Object getAnnotation(Class<? extends AbstractTerm> term);
+
+ Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollectionComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollectionComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollectionComposableInvoker.java
new file mode 100644
index 0000000..a9c65f5
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollectionComposableInvoker.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+
+public interface StoredPICollectionComposableInvoker
+ extends
+ org.apache.olingo.ext.proxy.api.StructuredCollectionComposableInvoker<StoredPICollection, StoredPICollection.Operations> {
+
+ @Override
+ StoredPICollectionComposableInvoker select(String... select);
+
+ @Override
+ StoredPICollectionComposableInvoker expand(String... expand);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPIComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPIComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPIComposableInvoker.java
new file mode 100644
index 0000000..f6d5d49
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPIComposableInvoker.java
@@ -0,0 +1,97 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+
+public interface StoredPIComposableInvoker
+ extends org.apache.olingo.ext.proxy.api.StructuredComposableInvoker<StoredPI, StoredPI.Operations>
+{
+
+ @Override
+ StoredPIComposableInvoker select(String... select);
+
+ @Override
+ StoredPIComposableInvoker expand(String... expand);
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "StoredPIID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getStoredPIID();
+
+ void setStoredPIID(java.lang.Integer _storedPIID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "PIName",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getPIName();
+
+ void setPIName(java.lang.String _pIName);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "PIType",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getPIType();
+
+ void setPIType(java.lang.String _pIType);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CreatedDate",
+ type = "Edm.DateTimeOffset",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.sql.Timestamp getCreatedDate();
+
+ void setCreatedDate(java.sql.Timestamp _createdDate);
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java
new file mode 100644
index 0000000..6a63879
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java
@@ -0,0 +1,144 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+
+@org.apache.olingo.ext.proxy.api.annotations.Namespace("Microsoft.Test.OData.Services.ODataWCFService")
+@org.apache.olingo.ext.proxy.api.annotations.EntityType(name = "Subscription",
+ openType = false,
+ hasStream = false,
+ isAbstract = false)
+public interface Subscription
+ extends org.apache.olingo.ext.proxy.api.Annotatable,
+ org.apache.olingo.ext.proxy.api.EntityType<Subscription>,
+ org.apache.olingo.ext.proxy.api.StructuredQuery<Subscription> {
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "SubscriptionID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getSubscriptionID();
+
+ void setSubscriptionID(java.lang.Integer _subscriptionID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "TemplateGuid",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTemplateGuid();
+
+ void setTemplateGuid(java.lang.String _templateGuid);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Title",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTitle();
+
+ void setTitle(java.lang.String _title);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Category",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getCategory();
+
+ void setCategory(java.lang.String _category);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CreatedDate",
+ type = "Edm.DateTimeOffset",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.sql.Timestamp getCreatedDate();
+
+ void setCreatedDate(java.sql.Timestamp _createdDate);
+
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.ext.proxy.api.Operations {
+ // No additional methods needed for now.
+ }
+
+ Annotations annotations();
+
+ interface Annotations {
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "SubscriptionID",
+ type = "Edm.Int32")
+ org.apache.olingo.ext.proxy.api.Annotatable getSubscriptionIDAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "TemplateGuid",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getTemplateGuidAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Title",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getTitleAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "Category",
+ type = "Edm.String")
+ org.apache.olingo.ext.proxy.api.Annotatable getCategoryAnnotations();
+
+ @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "CreatedDate",
+ type = "Edm.DateTimeOffset")
+ org.apache.olingo.ext.proxy.api.Annotatable getCreatedDateAnnotations();
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java
new file mode 100644
index 0000000..ae35e6a
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java
@@ -0,0 +1,41 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import java.util.Collection;
+// CHECKSTYLE:ON (Maven checkstyle)
+
+import org.apache.olingo.ext.proxy.api.AbstractTerm;
+
+public interface SubscriptionCollection
+ extends
+ org.apache.olingo.ext.proxy.api.StructuredCollectionQuery<SubscriptionCollection>,
+org.apache.olingo.ext.proxy.api.EntityCollection<Subscription, SubscriptionCollection, SubscriptionCollection> {
+
+ Operations operations();
+
+ interface Operations extends org.apache.olingo.ext.proxy.api.Operations {
+ // No additional methods needed for now.
+ }
+
+ Object getAnnotation(Class<? extends AbstractTerm> term);
+
+ Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollectionComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollectionComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollectionComposableInvoker.java
new file mode 100644
index 0000000..82e628c
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollectionComposableInvoker.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+
+public interface SubscriptionCollectionComposableInvoker
+ extends
+ org.apache.olingo.ext.proxy.api.StructuredCollectionComposableInvoker<SubscriptionCollection, SubscriptionCollection.Operations> {
+
+ @Override
+ SubscriptionCollectionComposableInvoker select(String... select);
+
+ @Override
+ SubscriptionCollectionComposableInvoker expand(String... expand);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionComposableInvoker.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionComposableInvoker.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionComposableInvoker.java
new file mode 100644
index 0000000..6c0a2c8
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionComposableInvoker.java
@@ -0,0 +1,112 @@
+/*
+ * 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.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
+// CHECKSTYLE:OFF (Maven checkstyle)
+import org.apache.olingo.ext.proxy.api.annotations.Key;
+
+// CHECKSTYLE:ON (Maven checkstyle)
+
+public interface SubscriptionComposableInvoker
+ extends org.apache.olingo.ext.proxy.api.StructuredComposableInvoker<Subscription, Subscription.Operations>
+{
+
+ @Override
+ SubscriptionComposableInvoker select(String... select);
+
+ @Override
+ SubscriptionComposableInvoker expand(String... expand);
+
+ @Key
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "SubscriptionID",
+ type = "Edm.Int32",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.Integer getSubscriptionID();
+
+ void setSubscriptionID(java.lang.Integer _subscriptionID);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "TemplateGuid",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTemplateGuid();
+
+ void setTemplateGuid(java.lang.String _templateGuid);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Title",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getTitle();
+
+ void setTitle(java.lang.String _title);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "Category",
+ type = "Edm.String",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.lang.String getCategory();
+
+ void setCategory(java.lang.String _category);
+
+ @org.apache.olingo.ext.proxy.api.annotations.Property(name = "CreatedDate",
+ type = "Edm.DateTimeOffset",
+ nullable = false,
+ defaultValue = "",
+ maxLenght = Integer.MAX_VALUE,
+ fixedLenght = false,
+ precision = 0,
+ scale = 0,
+ unicode = true,
+ collation = "",
+ srid = "")
+ java.sql.Timestamp getCreatedDate();
+
+ void setCreatedDate(java.sql.Timestamp _createdDate);
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java
new file mode 100644
index 0000000..bb754bd
--- /dev/null
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.proxy.staticservice.microsoft.test.odata.services.odatawcfservice.types;
+
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
deleted file mode 100644
index 260d35b..0000000
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
+++ /dev/null
@@ -1,622 +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.fit.proxy.v4;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.lang.reflect.Proxy;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Calendar;
-import java.util.TimeZone;
-
-// CHECKSTYLE:OFF (Maven checkstyle)
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.olingo.client.api.EdmEnabledODataClient;
-import org.apache.olingo.commons.api.format.ContentType;
-import org.apache.olingo.ext.proxy.AbstractService;
-import org.apache.olingo.ext.proxy.api.EdmStreamValue;
-import org.apache.olingo.ext.proxy.api.PrimitiveCollection;
-import org.apache.olingo.ext.proxy.commons.AbstractCollectionInvocationHandler;
-import org.apache.olingo.fit.proxy.v4.demo.odatademo.DemoService;
-import org.apache.olingo.fit.proxy.v4.demo.odatademo.types.PersonDetail;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AddressCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CustomerCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.HomeAddress;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PersonCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PersonComposableInvoker;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollectionComposableInvoker;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetail;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollectionComposableInvoker;
-// CHECKSTYLE:ON (Maven checkstyle)
-import org.junit.Test;
-
-public class APIBasicDesignTestITCase extends AbstractTestITCase {
-
- protected AbstractService<EdmEnabledODataClient> getService() {
- return service;
- }
-
- protected InMemoryEntities getContainer() {
- return container;
- }
-
- @Test
- public void readEntitySet() {
- final OrderCollection orders = container.getOrders().execute();
- assertFalse(orders.isEmpty());
-
- final CustomerCollection customers = container.getCustomers().
- orderBy("PersonID").
- select("FirstName", "LastName", "Orders").
- expand("Orders").
- execute();
-
- assertEquals(2, customers.size());
- for (Customer customer : customers) {
- assertNotNull(customer.getFirstName());
- assertNotNull(customer.getLastName());
- }
- }
-
- @Test
- public void readWithReferences() {
- final Person person = container.getOrders().getByKey(8).getCustomerForOrder().refs().load();
- assertEquals("http://localhost:9080/stub/StaticService/V40/Static.svc/Customers(PersonID=1)",
- person.readEntityReferenceID());
-
- final OrderCollection orders = container.getCustomers().getByKey(1).getOrders().refs().execute();
- assertEquals("http://localhost:9080/stub/StaticService/V40/Static.svc/Orders(7)",
- orders.iterator().next().readEntityReferenceID());
- }
-
- @Test
- public void changeSingleNavigationProperty() {
- /*
- * See OData Spec 11.4.6.3
- * Alternatively, a relationship MAY be updated as part of an update to the source entity by including
- * the required binding information for the new target entity.
- *
- * => use PATCH instead of PUT
- */
- final Person person1 = container.getPeople().getByKey(1).load();
- final Person person5 = container.getPeople().getByKey(5).load();
-
- person1.setParent(person5);
- container.flush();
- }
-
- @Test
- public void addViaReference() {
- final Order order = container.getOrders().getByKey(8).load();
-
- final OrderCollection orders = container.newEntityCollection(OrderCollection.class);
- orders.addRef(order);
-
- container.getCustomers().getByKey(1).setOrders(orders);
- container.flush();
- }
-
- @Test
- public void readAndCheckForPrimitive() {
- final Customer customer = getContainer().getCustomers().getByKey(1);
- assertNotNull(customer);
- assertNull(customer.getPersonID());
-
- assertEquals(1, customer.load().getPersonID(), 0);
- service.getContext().detachAll();
- }
-
- @Test
- public void readAndCheckForComplex() {
- Customer customer = container.getCustomers().getByKey(1); // no http request
- Address homeAddress = customer.getHomeAddress();
- assertNotNull(homeAddress);
- assertNull(homeAddress.getCity());
- assertNull(homeAddress.getPostalCode());
- assertNull(homeAddress.getStreet());
-
- homeAddress.load(); // HTTP request at complex loading
- assertEquals("London", homeAddress.getCity());
- assertEquals("98052", homeAddress.getPostalCode());
- assertEquals("1 Microsoft Way", homeAddress.getStreet());
-
- getService().getContext().detachAll();
-
- homeAddress = container.getCustomers().getByKey(1).load().getHomeAddress(); // HTTP request at entity loading
- assertEquals("London", homeAddress.getCity());
- assertEquals("98052", homeAddress.getPostalCode());
- assertEquals("1 Microsoft Way", homeAddress.getStreet());
-
- getService().getContext().detachAll();
-
- customer = container.getOrders().getByKey(8).getCustomerForOrder();
- homeAddress = customer.getHomeAddress().select("City", "PostalCode").expand("SomethingElse"); // no HTTP request
- assertNotNull(homeAddress);
- assertNull(homeAddress.getCity());
- assertNull(homeAddress.getPostalCode());
- assertNull(homeAddress.getStreet());
-
- try {
- homeAddress.load();
- fail();
- } catch (Exception e) {
- // Generated URL
- // "<serviceroot>/Orders(8)/CustomerForOrder/HomeAddress?$select=City,PostalCode&$expand=SomethingElse"
- // curently unsupported by test service server
- homeAddress.clearQueryOptions();
- }
- }
-
- @Test
- public void readWholeEntitySet() {
- PersonCollection person = getContainer().getPeople().execute();
- assertEquals(5, person.size(), 0);
-
- int pageCount = 1;
- while (person.hasNextPage()) {
- pageCount++;
- assertFalse(person.nextPage().execute().isEmpty());
- }
-
- assertEquals(2, pageCount);
- service.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void loadWithSelect() {
- org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order order =
- getContainer().getOrders().getByKey(8);
- assertNull(order.getOrderID());
- assertNull(order.getOrderDate());
-
- order.select("OrderID");
- order.load();
-
- assertNull(order.getOrderDate());
- assertNotNull(order.getOrderID());
-
- order.clearQueryOptions();
- order.load();
- assertNotNull(order.getOrderDate());
- assertNotNull(order.getOrderID());
- service.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void loadWithSelectAndExpand() {
- final Customer customer = getContainer().getCustomers().getByKey(1);
-
- customer.expand("Orders");
- customer.select("Orders", "PersonID");
-
- customer.load();
- assertEquals(1, customer.getOrders().size());
- service.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void navigateLinks() {
- final Customer customer = getContainer().getCustomers().getByKey(1); // No HTTP Request
- assertNotNull(customer.getCompany().load().getCompanyID()); // singleton: single request
- assertEquals(1, customer.getOrders().execute().size()); // collection: single request
-
- final Order order = getContainer().getOrders().getByKey(8); // No HTTP Requests
- assertNotNull(order.getCustomerForOrder().load().getPersonID()); // entity type: single request
-
- service.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void createDelete() {
- // Create order ....
- final Order order = getContainer().newEntityInstance(Order.class);
- order.setOrderID(1105);
-
- final Calendar orderDate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
- orderDate.clear();
- orderDate.set(2011, 3, 4, 16, 3, 57);
- order.setOrderDate(new Timestamp(orderDate.getTimeInMillis()));
-
- order.setShelfLife(BigDecimal.ZERO);
-
- final PrimitiveCollection<BigDecimal> osl = getContainer().newPrimitiveCollection(BigDecimal.class);
- osl.add(BigDecimal.TEN.negate());
- osl.add(BigDecimal.TEN);
-
- order.setOrderShelfLifes(osl);
-
- getContainer().getOrders().add(order);
- getContainer().flush();
-
- Order actual = getContainer().getOrders().getByKey(1105);
- assertNull(actual.getOrderID());
-
- actual.load();
- assertEquals(1105, actual.getOrderID(), 0);
- assertEquals(orderDate.getTimeInMillis(), actual.getOrderDate().getTime());
- assertEquals(BigDecimal.ZERO, actual.getShelfLife());
- assertEquals(2, actual.getOrderShelfLifes().size());
-
- service.getContext().detachAll();
-
- // (1) Delete by key (see EntityCreateTestITCase)
- getContainer().getOrders().delete(1105);
- assertNull(getContainer().getOrders().getByKey(1105));
-
- service.getContext().detachAll(); // detach to show the second delete case
-
- // (2) Delete by object (see EntityCreateTestITCase)
- getContainer().getOrders().delete(getContainer().getOrders().getByKey(1105));
- assertNull(getContainer().getOrders().getByKey(1105));
-
- // (3) Delete by invoking delete method on the object itself
- service.getContext().detachAll(); // detach to show the third delete case
- getContainer().getOrders().getByKey(1105).delete();
- assertNull(getContainer().getOrders().getByKey(1105));
-
- getContainer().flush();
-
- service.getContext().detachAll();
- try {
- getContainer().getOrders().getByKey(1105).load();
- fail();
- } catch (IllegalArgumentException e) {
- // Test
- }
- service.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void deleteSingleProperty() {
- container.getCustomers().getByKey(1).delete("City");
- container.flush();
- }
-
- @Test
- public void deleteComplex() {
- container.getCustomers().getByKey(1).getHomeAddress().delete();
- container.flush();
- }
-
- @Test
- public void deleteCollection() {
- container.getCustomers().getByKey(1).getEmails().delete();
- container.flush();
- }
-
- @Test
- public void deleteEdmStreamProperty() throws IOException {
- // ---------------------------------------
- // Instantiate Demo Service
- // ---------------------------------------
- final org.apache.olingo.fit.proxy.v4.demo.Service<EdmEnabledODataClient> dservice =
- org.apache.olingo.fit.proxy.v4.demo.Service.getV4(testDemoServiceRootURL);
- dservice.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
- final DemoService dcontainer = dservice.getEntityContainer(DemoService.class);
- assertNotNull(dcontainer);
- dservice.getContext().detachAll();
- // ---------------------------------------
- dcontainer.getPersonDetails().getByKey(1).delete("Photo");
- dcontainer.flush();
-
- dservice.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void updateComplexProperty() {
- Address homeAddress = container.getCustomers().getByKey(1).getHomeAddress();
- homeAddress.setCity("Pescara");
- homeAddress.setPostalCode("98052");
- container.flush();
-
- homeAddress = container.getCustomers().getByKey(1).getHomeAddress().load();
- assertEquals("Pescara", homeAddress.getCity());
- assertEquals("98052", homeAddress.getPostalCode());
- }
-
- @Test
- public void updateAndReadEdmStreamProperty() throws IOException {
- // ---------------------------------------
- // Instantiate Demo Service
- // ---------------------------------------
- final org.apache.olingo.fit.proxy.v4.demo.Service<EdmEnabledODataClient> dservice =
- org.apache.olingo.fit.proxy.v4.demo.Service.getV4(testDemoServiceRootURL);
- dservice.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
- final DemoService dcontainer = dservice.getEntityContainer(DemoService.class);
- assertNotNull(dcontainer);
- dservice.getContext().detachAll();
- // ---------------------------------------
- final String random = RandomStringUtils.random(124, "abcdefghijklmnopqrstuvwxyz");
-
- final PersonDetail personDetail = dcontainer.getPersonDetails().getByKey(1); // NO HTTP Request
-
- // 1 HTTP Request to add an Edm.Stream property value about MediaEditLink Photo
- personDetail.setPhoto(dcontainer.newEdmStreamValue("application/octet-stream", IOUtils.toInputStream(random)));
-
- dcontainer.flush();
-
- final EdmStreamValue actual = dcontainer.getPersonDetails().getByKey(1).getPhoto().load(); // 1 HTTP Request
- assertEquals(random, IOUtils.toString(actual.getStream()));
-
- dservice.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void boundOperationsAfterCreate() {
- final Product product = getContainer().newEntityInstance(Product.class);
- product.setProductID(1012);
- product.setName("Latte");
- product.setQuantityPerUnit("100g Bag");
- product.setUnitPrice(3.24f);
- product.setQuantityInStock(100);
- product.setDiscontinued(false);
- product.setUserAccess(AccessLevel.Execute);
- product.setSkinColor(Color.Blue);
-
- final PrimitiveCollection<Color> cc = getContainer().newPrimitiveCollection(Color.class);
- cc.add(Color.Red);
- cc.add(Color.Green);
-
- product.setCoverColors(cc);
-
- final ProductDetail detail = getContainer().newEntityInstance(ProductDetail.class);
- detail.setProductID(product.getProductID());
- detail.setProductDetailID(1012);
- detail.setProductName("LatteHQ");
- detail.setDescription("High-Quality Milk");
-
- final ProductDetailCollection detailCollection = getContainer().newEntityCollection(ProductDetailCollection.class);
- detailCollection.add(detail);
-
- product.setDetails(detailCollection);
-
- getContainer().getProducts().add(product);
-
- // The first HTTP Request to create product and the linked product detail
- getContainer().flush();
-
- // The second HTTP request to access a bound operation via the local object
- assertNotNull(product.operations().addAccessRight(AccessLevel.None).execute());
-
- // The third HTTP Request to access a bound operation via entity URL
- final ProductDetailCollectionComposableInvoker result =
- container.getProducts().getByKey(1012).operations().getProductDetails(1);
- assertEquals(1, result.execute().size());
- }
-
- @Test
- public void workingWithPrimitiveCollections() throws IOException {
- final PrimitiveCollection<String> emails = container.getPeople().getByKey(1).getEmails();
- assertNotNull(emails);
- assertTrue(emails.isEmpty());
- assertFalse(emails.execute().isEmpty());
-
- getService().getContext().detachAll();
-
- // container.getOrders().getByKey(1).getCustomerForOrder().getEmails().execute().isEmpty());
- // Not supported by the test service BTW generates a single request as expected:
- // <service root>/Orders(1)/CustomerForOrder/Emails
- emails.add("fabio.martelli@tirasa.net");
- container.getPeople().getByKey(1).setEmails(emails);
-
- container.flush();
-
- boolean found = false;
- for (String email : container.getPeople().getByKey(1).getEmails().execute()) {
- if (email.equals("fabio.martelli@tirasa.net")) {
- found = true;
- }
- }
-
- assertTrue(found);
-
- getService().getContext().detachAll();
- }
-
- @Test
- public void workingWithSingletons() {
- assertNotNull(container.getCompany().getVipCustomer().load().getPersonID());
-
- container.getCompany().setName("new name");
- container.flush();
-
- assertEquals("new name", container.getCompany().load().getName());
- }
-
- @Test
- public void createAndCallOperation() {
- final Product product = container.newEntityInstance(Product.class);
- product.setProductID(1001);
- container.flush();
-
- container.getProducts().getByKey(1000).operations().getProductDetails(1).execute();
- }
-
- @Test
- public void workingWithOperations() {
- // Primitive collections (available only skip and top)
- final PrimitiveCollection<String> prods1 = container.operations().
- getProductsByAccessLevel(AccessLevel.None).
- skip(2).
- top(3).execute();
- assertNotNull(prods1);
- assertFalse(prods1.isEmpty());
-
- // Complex/Entity collection
- final ProductCollection prods2 = container.operations().getAllProducts().
- filter("name eq XXXX").
- select("Name", "ProductDetail").
- expand("ProductDetail").
- orderBy("Name").skip(3).top(5).execute();
- assertNotNull(prods2);
- assertFalse(prods2.isEmpty());
-
- // Complex/Entity
- final Person person = container.operations().getPerson2("London").
- select("Name").
- expand("Order").execute();
- assertNotNull(person);
-
- // Primitive (no query option available)
- final Double amount = container.getAccounts().getByKey(101).getMyGiftCard().operations().
- getActualAmount(1.1).execute();
- assertNotNull(amount);
-
- // POST ...
- final Address address = container.newComplexInstance(HomeAddress.class);
- address.setStreet("Via Le Mani Dal Naso, 123");
- address.setPostalCode("Tollo");
- address.setCity("66010");
-
- final AddressCollection ac = container.newComplexCollection(AddressCollection.class);
- final Person updated = container.getCustomers().getByKey(2).operations().
- resetAddress(ac, 0).select("Name").expand("Orders").execute();
- assertNotNull(updated);
- }
-
- @Test
- public void workingWithComposableOperations() {
- final ProductCollectionComposableInvoker invoker1 = container.operations().getAllProducts();
-
- // Complex/Entity collection (available filter, select, expand, orderBy, skip and top)
- invoker1.operations().discount(10). // discount is an operation of ProductCollecton
- filter("Name eq XXXX").
- select("Name", "ProductDetail").
- expand("ProductDetail").
- orderBy("Name").skip(3).top(5).execute();
-
- // Complex/Entity
- final PersonComposableInvoker invoker2 = container.operations().getPerson2("London");
-
- // a. whole entity
- final Person person = invoker2.select("Name").expand("Order").execute();
- assertNotNull(person);
- assertEquals(1, person.getPersonID(), 0);
-
- // b. primitive collection property
- final PrimitiveCollection<String> emails = invoker2.getEmails().execute();
- assertNotNull(emails);
- assertFalse(emails.isEmpty());
-
- // c. complex property
- final Address homeAddress = invoker2.getHomeAddress().load();
- assertNotNull(homeAddress);
-
- // d. navigation property
- final Person parent = invoker2.getParent().load();
- assertNotNull(parent);
- assertEquals(2, parent.getPersonID(), 0);
- }
-
- /**
- * Java client should support the deletion based on locally created entity.
- * See also <a href="https://issues.apache.org/jira/browse/OLINGO-395">Olingo Issue 395</a>.
- */
- @Test
- public void issueOLINGO395() {
- Order order = getContainer().newEntityInstance(Order.class);
- order.setOrderID(1105);
-
- final Calendar orderDate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
- orderDate.clear();
- orderDate.set(2011, 3, 4, 16, 3, 57);
- order.setOrderDate(new Timestamp(orderDate.getTimeInMillis()));
-
- order.setShelfLife(BigDecimal.ZERO);
-
- final PrimitiveCollection<BigDecimal> osl = getContainer().newPrimitiveCollection(BigDecimal.class);
- osl.add(BigDecimal.TEN.negate());
- osl.add(BigDecimal.TEN);
-
- order.setOrderShelfLifes(osl);
-
- getContainer().getOrders().add(order);
- getContainer().getOrders().delete(order);
-
- getContainer().flush();
-
- service.getContext().detachAll();
- try {
- getContainer().getOrders().getByKey(1105).load();
- fail();
- } catch (IllegalArgumentException e) {
- // Expected Exception
- }
- service.getContext().detachAll(); // avoid influences
-
- order = getContainer().newEntityInstance(Order.class);
- order.setOrderID(1105);
-
- getContainer().getOrders().delete(order);
- getContainer().flush(); // test service doesn't fail for delete requests about unexisting objects
-
- service.getContext().detachAll();
- try {
- getContainer().getOrders().getByKey(1105).load();
- fail();
- } catch (IllegalArgumentException e) {
- // Expected Exception
- }
- service.getContext().detachAll(); // avoid influences
- }
-
- @Test
- public void issueOLINGO398() {
- AbstractCollectionInvocationHandler<?, ?> handler = AbstractCollectionInvocationHandler.class.cast(
- Proxy.getInvocationHandler(container.getCustomers().getByKey(1).getOrders().
- select("OrderID", "CustomerForOrder").
- expand("CustomerForOrder").
- top(1).
- skip(2)));
-
- assertEquals("http://localhost:9080/stub/StaticService/V40/Static.svc/Customers(1)/Orders?"
- + "%24select=OrderID%2CCustomerForOrder&%24expand=CustomerForOrder&%24top=1&%24skip=2",
- handler.getRequestURI().toASCIIString());
-
- handler = AbstractCollectionInvocationHandler.class.cast(
- Proxy.getInvocationHandler(container.getCustomers().getByKey(1).getOrders().
- select("OrderID", "CustomerForOrder").
- expand("CustomerForOrder").
- top(1).
- skip(2)));
-
- assertEquals("http://localhost:9080/stub/StaticService/V40/Static.svc/Customers(1)/Orders?%24"
- + "select=OrderID%2CCustomerForOrder&%24expand=CustomerForOrder&%24top=1&%24skip=2",
- handler.getRequestURI().toASCIIString());
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
deleted file mode 100644
index 7ef9511..0000000
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
+++ /dev/null
@@ -1,149 +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.fit.proxy.v4;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Calendar;
-import java.util.TimeZone;
-
-import org.apache.olingo.client.api.EdmEnabledODataClient;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.commons.api.format.ContentType;
-import org.apache.olingo.ext.proxy.AbstractService;
-import org.apache.olingo.ext.proxy.api.PrimitiveCollection;
-import org.apache.olingo.fit.AbstractBaseTestITCase;
-import org.apache.olingo.fit.proxy.v4.staticservice.Service;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order;
-import org.junit.BeforeClass;
-
-public abstract class AbstractTestITCase extends AbstractBaseTestITCase {
-
- protected static String testStaticServiceRootURL;
-
- protected static String testDemoServiceRootURL;
-
- protected static String testKeyAsSegmentServiceRootURL;
-
- protected static String testActionOverloadingServiceRootURL;
-
- protected static String testOpenTypeServiceRootURL;
-
- protected static String testLargeModelServiceRootURL;
-
- protected static String testAuthServiceRootURL;
-
- protected static Service<EdmEnabledODataClient> service;
-
- protected static InMemoryEntities container;
-
- @BeforeClass
- public static void setUpODataServiceRoot() throws IOException {
- testStaticServiceRootURL = "http://localhost:9080/stub/StaticService/V40/Static.svc";
- testDemoServiceRootURL = "http://localhost:9080/stub/StaticService/V40/Demo.svc";
- testKeyAsSegmentServiceRootURL = "http://localhost:9080/stub/StaticService/V40/KeyAsSegment.svc";
- testActionOverloadingServiceRootURL = "http://localhost:9080/stub/StaticService/V40/ActionOverloading.svc";
- testOpenTypeServiceRootURL = "http://localhost:9080/stub/StaticService/V40/OpenType.svc";
- testLargeModelServiceRootURL = "http://localhost:9080/stub/StaticService/V40/Static.svc/large";
- testAuthServiceRootURL = "http://localhost:9080/stub/DefaultService.svc/V40/Static.svc";
-
- service = Service.getV4(testStaticServiceRootURL);
- service.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
- container = service.getEntityContainer(InMemoryEntities.class);
- assertNotNull(container);
- service.getContext().detachAll();
- }
-
- protected Customer readCustomer(final InMemoryEntities container, final int id) {
- final Customer customer = container.getCustomers().getByKey(id).load();
- assertNotNull(customer);
- assertEquals(id, customer.getPersonID(), 0);
-
- return customer;
- }
-
- protected void createPatchAndDeleteOrder(
- final InMemoryEntities container, final AbstractService<EdmEnabledODataClient> service) {
-
- // Create order ....
- final Order order = container.newEntityInstance(Order.class);
- order.setOrderID(105);
-
- final Calendar orderDate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
- orderDate.clear();
- orderDate.set(2011, 3, 4, 16, 3, 57);
- order.setOrderDate(new Timestamp(orderDate.getTimeInMillis()));
-
- order.setShelfLife(BigDecimal.ZERO);
-
- final PrimitiveCollection<BigDecimal> value = container.newPrimitiveCollection(BigDecimal.class);
- value.add(BigDecimal.TEN.negate());
- value.add(BigDecimal.TEN);
- order.setOrderShelfLifes(value);
-
- container.getOrders().add(order);
- container.flush();
-
- // Patch order ... (test for OLINGO-353)
- order.setShelfLife(BigDecimal.TEN);
- container.flush();
-
- Order actual = container.getOrders().getByKey(105).load();
- assertEquals(105, actual.getOrderID(), 0);
- assertEquals(orderDate.getTimeInMillis(), actual.getOrderDate().getTime());
- assertEquals(BigDecimal.TEN, actual.getShelfLife());
- assertEquals(2, actual.getOrderShelfLifes().size());
-
- // Delete order ...
- container.getOrders().delete(105);
- actual = container.getOrders().getByKey(105);
- assertNull(actual);
-
- service.getContext().detachAll();
- actual = container.getOrders().getByKey(105);
- assertNotNull(actual);
-
- container.getOrders().delete(105);
- actual = container.getOrders().getByKey(105);
- assertNull(actual);
-
- container.flush();
-
- service.getContext().detachAll();
- try {
- container.getOrders().getByKey(105).load();
- fail();
- } catch (IllegalArgumentException e) {
- // Expected Exception
- }
- }
-
- @Override
- protected ODataClient getClient() {
- throw new RuntimeException("This method should not be used from proxy tests.");
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/78a9539e/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AsyncTestITCase.java
deleted file mode 100644
index b0c1c03..0000000
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AsyncTestITCase.java
+++ /dev/null
@@ -1,101 +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.fit.proxy.v4;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-
-import org.apache.commons.lang3.RandomStringUtils;
-// CHECKSTYLE:OFF (Maven checkstyle)
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CustomerCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PersonComposableInvoker;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection;
-import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollectionComposableInvoker;
-
-// CHECKSTYLE:ON (Maven checkstyle)
-import org.junit.Test;
-
-public class AsyncTestITCase extends AbstractTestITCase {
-
- @Test
- public void retrieveEntitySet() throws InterruptedException, ExecutionException {
- final Future<CustomerCollection> futureCustomers = container.getCustomers().executeAsync();
- assertNotNull(futureCustomers);
-
- while (!futureCustomers.isDone()) {
- Thread.sleep(1000L);
- }
-
- final CustomerCollection customers = futureCustomers.get();
- assertNotNull(customers);
- assertFalse(customers.isEmpty());
- for (Customer customer : customers) {
- assertNotNull(customer);
- }
- }
-
- @Test
- public void updateEntity() throws Exception {
- final String randomFirstName = RandomStringUtils.random(10, "abcedfghijklmnopqrstuvwxyz");
-
- final Person person = container.getPeople().getByKey(1);
- person.setFirstName(randomFirstName);
-
- final Future<Void> futureFlush = container.flushAsync();
- assertNotNull(futureFlush);
-
- while (!futureFlush.isDone()) {
- Thread.sleep(1000L);
- }
-
- final Future<? extends Person> futurePerson = container.getPeople().getByKey(1).loadAsync();
- assertEquals(randomFirstName, futurePerson.get().getFirstName());
- }
-
- @Test
- public void invoke() throws Exception {
- final ProductCollectionComposableInvoker invoker1 = container.operations().getAllProducts();
-
- final Future<ProductCollection> future1 = invoker1.operations().
- discount(10).
- filter("Name eq XXXX").
- select("Name", "ProductDetail").
- expand("ProductDetail").
- orderBy("Name").skip(3).top(5).executeAsync();
- while (!future1.isDone()) {
- Thread.sleep(1000L);
- }
- assertFalse(future1.get().isEmpty());
-
- final PersonComposableInvoker invoker2 = container.operations().getPerson2("London");
-
- final Future<Person> future2 = invoker2.select("Name").
- expand("Order").executeAsync();
- while (!future2.isDone()) {
- Thread.sleep(1000L);
- }
- assertNotNull(future2.get());
- }
-}