[OLINGO-266] Merge remote-tracking branch 'origin/master' into olingo-266-tecsvc
This commit is contained in:
commit
92a4404dd4
|
@ -0,0 +1,96 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>olingo-client-proxy-android</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>${project.artifactId}</name>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.olingo</groupId>
|
||||||
|
<artifactId>olingo-ext</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>..</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.olingo</groupId>
|
||||||
|
<artifactId>olingo-client-proxy</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.plugins</groupId>
|
||||||
|
<artifactId>jarjar-maven-plugin</artifactId>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jarjar</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<includes>
|
||||||
|
<include>org.apache.olingo:olingo-client-proxy-android</include>
|
||||||
|
<include>org.apache.olingo:olingo-client-proxy</include>
|
||||||
|
<include>org.apache.olingo:olingo-client-core-android</include>
|
||||||
|
<include>org.apache.olingo:olingo-client-core</include>
|
||||||
|
<include>org.apache.olingo:olingo-client-api</include>
|
||||||
|
<include>org.apache.olingo:olingo-commons-api</include>
|
||||||
|
<include>org.apache.commons:commons-lang3</include>
|
||||||
|
<include>org.slf4j:slf4j-api</include>
|
||||||
|
<include>commons-io:commons-io</include>
|
||||||
|
<include>commons-beanutils:commons-beanutils</include>
|
||||||
|
<include>org.apache.httpcomponents:httpclient</include>
|
||||||
|
<include>org.apache.httpcomponents:httpcore</include>
|
||||||
|
<include>commons-logging:commons-logging</include>
|
||||||
|
<include>org.apache.olingo:olingo-commons-core</include>
|
||||||
|
<include>commons-codec:commons-codec</include>
|
||||||
|
<include>com.fasterxml.jackson.core:jackson-core</include>
|
||||||
|
<include>com.fasterxml.jackson.core:jackson-databind</include>
|
||||||
|
<include>com.fasterxml.jackson.core:jackson-annotations</include>
|
||||||
|
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-xml</include>
|
||||||
|
<include>com.fasterxml.jackson.module:jackson-module-jaxb-annotations</include>
|
||||||
|
<include>org.codehaus.woodstox:stax2-api</include>
|
||||||
|
<include>javax.xml.stream:stax-api</include>
|
||||||
|
<include>com.fasterxml:aalto-xml</include>
|
||||||
|
</includes>
|
||||||
|
<rules>
|
||||||
|
<rule>
|
||||||
|
<pattern>javax.xml.stream.**</pattern>
|
||||||
|
<result>org.apache.olingo.javax.xml.stream.@1</result>
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -51,7 +51,7 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils-core</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
|
|
|
@ -21,7 +21,7 @@ package org.apache.olingo.ext.proxy.api;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
public interface AbstractAnnotatable extends Serializable {
|
public interface Annotatable extends Serializable {
|
||||||
|
|
||||||
void addAnnotation(Class<? extends AbstractTerm> term, Object value);
|
void addAnnotation(Class<? extends AbstractTerm> term, Object value);
|
||||||
|
|
|
@ -16,19 +16,19 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.client.api.communication.request.batch.v4;
|
package org.apache.olingo.ext.proxy.api.annotations;
|
||||||
|
|
||||||
/**
|
import java.lang.annotation.ElementType;
|
||||||
* Batch request payload management.
|
import java.lang.annotation.Retention;
|
||||||
*/
|
import java.lang.annotation.RetentionPolicy;
|
||||||
public interface BatchStreamManager
|
import java.lang.annotation.Target;
|
||||||
extends org.apache.olingo.client.api.communication.request.batch.BatchStreamManager {
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
public @interface AnnotationsForNavigationProperty {
|
||||||
|
|
||||||
|
String name();
|
||||||
|
|
||||||
|
String type();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets an outside update batch item instance. An outside update item can be submitted embedded into a batch request
|
|
||||||
* only.
|
|
||||||
*
|
|
||||||
* @return ODataOutsideUpdate instance.
|
|
||||||
*/
|
|
||||||
ODataOutsideUpdate addOutsideUpdate();
|
|
||||||
}
|
}
|
|
@ -16,11 +16,19 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.client.api.communication.request.batch.v3;
|
package org.apache.olingo.ext.proxy.api.annotations;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
public @interface AnnotationsForProperty {
|
||||||
|
|
||||||
|
String name();
|
||||||
|
|
||||||
|
String type();
|
||||||
|
|
||||||
/**
|
|
||||||
* Batch request payload management.
|
|
||||||
*/
|
|
||||||
public interface BatchStreamManager
|
|
||||||
extends org.apache.olingo.client.api.communication.request.batch.BatchStreamManager {
|
|
||||||
}
|
}
|
|
@ -35,12 +35,17 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
||||||
|
import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
|
||||||
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
import org.apache.olingo.commons.api.domain.CommonODataEntity;
|
import org.apache.olingo.commons.api.domain.CommonODataEntity;
|
||||||
import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
|
import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
|
||||||
import org.apache.olingo.commons.api.domain.CommonODataProperty;
|
import org.apache.olingo.commons.api.domain.CommonODataProperty;
|
||||||
import org.apache.olingo.commons.api.domain.ODataInvokeResult;
|
import org.apache.olingo.commons.api.domain.ODataInvokeResult;
|
||||||
import org.apache.olingo.commons.api.domain.ODataValue;
|
import org.apache.olingo.commons.api.domain.ODataValue;
|
||||||
|
import org.apache.olingo.commons.api.edm.EdmFunction;
|
||||||
import org.apache.olingo.commons.api.edm.EdmOperation;
|
import org.apache.olingo.commons.api.edm.EdmOperation;
|
||||||
|
import org.apache.olingo.commons.api.edm.EdmReturnType;
|
||||||
|
import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
|
||||||
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
|
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
|
||||||
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
|
@ -156,6 +161,25 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
|
||||||
handler);
|
handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private <RES extends ODataInvokeResult> Class<RES> getResultReference(final EdmReturnType returnType) {
|
||||||
|
Class<RES> result;
|
||||||
|
|
||||||
|
if (returnType == null) {
|
||||||
|
result = (Class<RES>) ODataNoContent.class;
|
||||||
|
} else {
|
||||||
|
if (returnType.isCollection() && returnType.getType().getKind() == EdmTypeKind.ENTITY) {
|
||||||
|
result = (Class<RES>) CommonODataEntitySet.class;
|
||||||
|
} else if (!returnType.isCollection() && returnType.getType().getKind() == EdmTypeKind.ENTITY) {
|
||||||
|
result = (Class<RES>) CommonODataEntity.class;
|
||||||
|
} else {
|
||||||
|
result = (Class<RES>) CommonODataProperty.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
protected Object invokeOperation(
|
protected Object invokeOperation(
|
||||||
final Operation annotation,
|
final Operation annotation,
|
||||||
final Method method,
|
final Method method,
|
||||||
|
@ -193,7 +217,11 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
|
||||||
|
|
||||||
// 3. invoke
|
// 3. invoke
|
||||||
final ODataInvokeResult result = client.getInvokeRequestFactory().getInvokeRequest(
|
final ODataInvokeResult result = client.getInvokeRequestFactory().getInvokeRequest(
|
||||||
target, edmOperation, parameterValues).execute().getBody();
|
edmOperation instanceof EdmFunction ? HttpMethod.GET : HttpMethod.POST,
|
||||||
|
target,
|
||||||
|
getResultReference(edmOperation.getReturnType()),
|
||||||
|
parameterValues).
|
||||||
|
execute().getBody();
|
||||||
|
|
||||||
// 4. process invoke result
|
// 4. process invoke result
|
||||||
if (StringUtils.isBlank(annotation.returnType())) {
|
if (StringUtils.isBlank(annotation.returnType())) {
|
||||||
|
|
|
@ -26,6 +26,8 @@ import java.lang.reflect.Type;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
||||||
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
|
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
|
||||||
|
@ -66,6 +68,12 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
|
|
||||||
protected Object internal;
|
protected Object internal;
|
||||||
|
|
||||||
|
private final Map<String, AnnotatableInvocationHandler> propAnnotatableHandlers =
|
||||||
|
new HashMap<String, AnnotatableInvocationHandler>();
|
||||||
|
|
||||||
|
private final Map<String, AnnotatableInvocationHandler> navPropAnnotatableHandlers =
|
||||||
|
new HashMap<String, AnnotatableInvocationHandler>();
|
||||||
|
|
||||||
protected AbstractStructuredInvocationHandler(
|
protected AbstractStructuredInvocationHandler(
|
||||||
final CommonEdmEnabledODataClient<?> client,
|
final CommonEdmEnabledODataClient<?> client,
|
||||||
final Class<?> typeRef,
|
final Class<?> typeRef,
|
||||||
|
@ -91,6 +99,10 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
this.entityHandler = entityHandler == this ? null : entityHandler;
|
this.entityHandler = entityHandler == this ? null : entityHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object getInternal() {
|
||||||
|
return internal;
|
||||||
|
}
|
||||||
|
|
||||||
public EntityInvocationHandler getEntityHandler() {
|
public EntityInvocationHandler getEntityHandler() {
|
||||||
return entityHandler == null
|
return entityHandler == null
|
||||||
? this instanceof EntityInvocationHandler
|
? this instanceof EntityInvocationHandler
|
||||||
|
@ -126,6 +138,13 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
Thread.currentThread().getContextClassLoader(),
|
Thread.currentThread().getContextClassLoader(),
|
||||||
new Class<?>[] {returnType},
|
new Class<?>[] {returnType},
|
||||||
ComplexFactoryInvocationHandler.getInstance(getEntityHandler(), this));
|
ComplexFactoryInvocationHandler.getInstance(getEntityHandler(), this));
|
||||||
|
} else if ("annotations".equals(method.getName()) && ArrayUtils.isEmpty(args)) {
|
||||||
|
final Class<?> returnType = method.getReturnType();
|
||||||
|
|
||||||
|
return Proxy.newProxyInstance(
|
||||||
|
Thread.currentThread().getContextClassLoader(),
|
||||||
|
new Class<?>[] {returnType},
|
||||||
|
AnnotatationsInvocationHandler.getInstance(getEntityHandler(), this));
|
||||||
} else if (method.getName().startsWith("get")) {
|
} else if (method.getName().startsWith("get")) {
|
||||||
// Assumption: for each getter will always exist a setter and viceversa.
|
// Assumption: for each getter will always exist a setter and viceversa.
|
||||||
// get method annotation and check if it exists as expected
|
// get method annotation and check if it exists as expected
|
||||||
|
@ -222,7 +241,7 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
null,
|
null,
|
||||||
((ODataInlineEntity) link).getEntity(),
|
((ODataInlineEntity) link).getEntity(),
|
||||||
property.targetContainer(),
|
property.targetContainer(),
|
||||||
client.getURIBuilder(serviceRoot).appendEntitySetSegment(property.targetEntitySet()).build(),
|
client.newURIBuilder(serviceRoot).appendEntitySetSegment(property.targetEntitySet()).build(),
|
||||||
type,
|
type,
|
||||||
false);
|
false);
|
||||||
} else if (link instanceof ODataInlineEntitySet) {
|
} else if (link instanceof ODataInlineEntitySet) {
|
||||||
|
@ -259,7 +278,7 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
uri,
|
uri,
|
||||||
res.getBody(),
|
res.getBody(),
|
||||||
property.targetContainer(),
|
property.targetContainer(),
|
||||||
client.getURIBuilder(serviceRoot).appendEntitySetSegment(property.targetEntitySet()).build(),
|
client.newURIBuilder(serviceRoot).appendEntitySetSegment(property.targetEntitySet()).build(),
|
||||||
type,
|
type,
|
||||||
res.getETag(),
|
res.getETag(),
|
||||||
true);
|
true);
|
||||||
|
@ -269,18 +288,6 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
return navPropValue;
|
return navPropValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract Object getPropertyValue(final String name, final Type type);
|
|
||||||
|
|
||||||
public void addAdditionalProperty(final String name, final Object value) {
|
|
||||||
addPropertyChanges(name, value);
|
|
||||||
attach(AttachedEntityStatus.CHANGED);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeAdditionalProperty(final String name) {
|
|
||||||
removePropertyChanges(name);
|
|
||||||
attach(AttachedEntityStatus.CHANGED);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object getAdditionalProperty(final String name) {
|
public Object getAdditionalProperty(final String name) {
|
||||||
return getPropertyValue(name, null);
|
return getPropertyValue(name, null);
|
||||||
}
|
}
|
||||||
|
@ -316,13 +323,31 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
|
||||||
addLinkChanges(property, value);
|
addLinkChanges(property, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, AnnotatableInvocationHandler> getPropAnnotatableHandlers() {
|
||||||
|
return propAnnotatableHandlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putPropAnnotatableHandler(final String propName, final AnnotatableInvocationHandler handler) {
|
||||||
|
propAnnotatableHandlers.put(propName, handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, AnnotatableInvocationHandler> getNavPropAnnotatableHandlers() {
|
||||||
|
return navPropAnnotatableHandlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putNavPropAnnotatableHandler(final String navPropName, final AnnotatableInvocationHandler handler) {
|
||||||
|
navPropAnnotatableHandlers.put(navPropName, handler);
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract void setPropertyValue(final Property property, final Object value);
|
protected abstract void setPropertyValue(final Property property, final Object value);
|
||||||
|
|
||||||
protected abstract void addPropertyChanges(final String name, final Object value);
|
|
||||||
|
|
||||||
protected abstract void removePropertyChanges(final String name);
|
|
||||||
|
|
||||||
protected abstract void addLinkChanges(final NavigationProperty navProp, final Object value);
|
protected abstract void addLinkChanges(final NavigationProperty navProp, final Object value);
|
||||||
|
|
||||||
|
protected abstract Object getPropertyValue(final String name, final Type type);
|
||||||
|
|
||||||
|
public abstract void addAdditionalProperty(final String name, final Object value);
|
||||||
|
|
||||||
|
public abstract void removeAdditionalProperty(final String name);
|
||||||
|
|
||||||
public abstract boolean isChanged();
|
public abstract boolean isChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,180 @@
|
||||||
|
/*
|
||||||
|
* 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.ext.proxy.commons;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationHandler;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.Proxy;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
||||||
|
import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
|
||||||
|
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
|
||||||
|
import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractTerm;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.Term;
|
||||||
|
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
||||||
|
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
||||||
|
|
||||||
|
public class AnnotatableInvocationHandler extends AbstractInvocationHandler implements Annotatable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3111228269617223332L;
|
||||||
|
|
||||||
|
private final String propName;
|
||||||
|
|
||||||
|
private final String navPropName;
|
||||||
|
|
||||||
|
private final EntityInvocationHandler entityHandler;
|
||||||
|
|
||||||
|
private final AbstractStructuredInvocationHandler targetHandler;
|
||||||
|
|
||||||
|
private final Map<Class<? extends AbstractTerm>, Object> annotations =
|
||||||
|
new HashMap<Class<? extends AbstractTerm>, Object>();
|
||||||
|
|
||||||
|
public AnnotatableInvocationHandler(
|
||||||
|
final CommonEdmEnabledODataClient<?> client,
|
||||||
|
final EntityContainerInvocationHandler containerHandler,
|
||||||
|
final String propName,
|
||||||
|
final String navPropName,
|
||||||
|
final EntityInvocationHandler entityHandler,
|
||||||
|
final AbstractStructuredInvocationHandler targetHandler) {
|
||||||
|
|
||||||
|
super(client, containerHandler);
|
||||||
|
|
||||||
|
this.propName = propName;
|
||||||
|
this.navPropName = navPropName;
|
||||||
|
this.entityHandler = entityHandler;
|
||||||
|
this.targetHandler = targetHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
|
||||||
|
return invokeSelfMethod(method, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Class<? extends AbstractTerm>, Object> getAnnotations() {
|
||||||
|
return annotations;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ODataAnnotation> internalAnnotations() {
|
||||||
|
List<ODataAnnotation> result = Collections.<ODataAnnotation>emptyList();
|
||||||
|
|
||||||
|
if (entityHandler.getEntity() instanceof ODataEntity) {
|
||||||
|
if (targetHandler.getInternal() instanceof ODataEntity) {
|
||||||
|
result = propName == null
|
||||||
|
? ((org.apache.olingo.commons.api.domain.v4.ODataLink) ((ODataEntity) targetHandler.getInternal()).
|
||||||
|
getNavigationLink(navPropName)).getAnnotations()
|
||||||
|
: ((ODataEntity) targetHandler.getInternal()).getProperty(propName).getAnnotations();
|
||||||
|
} else if (targetHandler.getInternal() instanceof ODataLinkedComplexValue) {
|
||||||
|
result = propName == null
|
||||||
|
? ((org.apache.olingo.commons.api.domain.v4.ODataLink) ((ODataLinkedComplexValue) targetHandler.
|
||||||
|
getInternal()).getNavigationLink(navPropName)).getAnnotations()
|
||||||
|
: ((ODataLinkedComplexValue) targetHandler.getInternal()).get(propName).getAnnotations();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addAnnotation(final Class<? extends AbstractTerm> term, final Object value) {
|
||||||
|
this.annotations.put(term, value);
|
||||||
|
|
||||||
|
if (value != null) {
|
||||||
|
Collection<?> coll;
|
||||||
|
if (Collection.class.isAssignableFrom(value.getClass())) {
|
||||||
|
coll = Collection.class.cast(value);
|
||||||
|
} else {
|
||||||
|
coll = Collections.singleton(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Object item : coll) {
|
||||||
|
if (item instanceof Proxy) {
|
||||||
|
final InvocationHandler handler = Proxy.getInvocationHandler(item);
|
||||||
|
if ((handler instanceof ComplexInvocationHandler)
|
||||||
|
&& ((ComplexInvocationHandler) handler).getEntityHandler() == null) {
|
||||||
|
((ComplexInvocationHandler) handler).setEntityHandler(entityHandler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
entityHandler.attach(AttachedEntityStatus.CHANGED);
|
||||||
|
if (navPropName == null) {
|
||||||
|
targetHandler.putPropAnnotatableHandler(propName, this);
|
||||||
|
} else {
|
||||||
|
targetHandler.putNavPropAnnotatableHandler(navPropName, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeAnnotation(final Class<? extends AbstractTerm> term) {
|
||||||
|
this.annotations.remove(term);
|
||||||
|
|
||||||
|
entityHandler.attach(AttachedEntityStatus.CHANGED);
|
||||||
|
if (navPropName == null) {
|
||||||
|
targetHandler.putPropAnnotatableHandler(propName, this);
|
||||||
|
} else {
|
||||||
|
targetHandler.putNavPropAnnotatableHandler(navPropName, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getAnnotation(final Class<? extends AbstractTerm> term) {
|
||||||
|
Object res = null;
|
||||||
|
|
||||||
|
if (annotations.containsKey(term)) {
|
||||||
|
res = annotations.get(term);
|
||||||
|
} else if (entityHandler.getEntity() instanceof ODataEntity) {
|
||||||
|
try {
|
||||||
|
final Term termAnn = term.getAnnotation(Term.class);
|
||||||
|
final Namespace namespaceAnn = term.getAnnotation(Namespace.class);
|
||||||
|
ODataAnnotation annotation = null;
|
||||||
|
for (ODataAnnotation _annotation : internalAnnotations()) {
|
||||||
|
if ((namespaceAnn.value() + "." + termAnn.name()).equals(_annotation.getTerm())) {
|
||||||
|
annotation = _annotation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
res = annotation == null || annotation.hasNullValue()
|
||||||
|
? null
|
||||||
|
: CoreUtils.getObjectFromODataValue(
|
||||||
|
client, annotation.getValue(), null, targetHandler.getEntityHandler());
|
||||||
|
if (res != null) {
|
||||||
|
annotations.put(term, res);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new IllegalArgumentException("Error getting annotation for term '" + term.getName() + "'", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<Class<? extends AbstractTerm>> getAnnotationTerms() {
|
||||||
|
return entityHandler.getEntity() instanceof ODataEntity
|
||||||
|
? CoreUtils.getAnnotationTerms(internalAnnotations())
|
||||||
|
: Collections.<Class<? extends AbstractTerm>>emptyList();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
/*
|
||||||
|
* 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.ext.proxy.commons;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.Proxy;
|
||||||
|
import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
||||||
|
|
||||||
|
public class AnnotatationsInvocationHandler extends AbstractInvocationHandler {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -1993362719908718985L;
|
||||||
|
|
||||||
|
private final EntityInvocationHandler entityHandler;
|
||||||
|
|
||||||
|
private final AbstractStructuredInvocationHandler targetHandler;
|
||||||
|
|
||||||
|
static AnnotatationsInvocationHandler getInstance(
|
||||||
|
final EntityInvocationHandler entityHandler,
|
||||||
|
final AbstractStructuredInvocationHandler targetHandler) {
|
||||||
|
|
||||||
|
return new AnnotatationsInvocationHandler(
|
||||||
|
entityHandler == null ? null : entityHandler.containerHandler.client,
|
||||||
|
targetHandler == null
|
||||||
|
? entityHandler == null ? null : entityHandler.containerHandler : targetHandler.containerHandler,
|
||||||
|
entityHandler,
|
||||||
|
targetHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AnnotatationsInvocationHandler(
|
||||||
|
final CommonEdmEnabledODataClient<?> client,
|
||||||
|
final EntityContainerInvocationHandler containerHandler,
|
||||||
|
final EntityInvocationHandler entityHandler,
|
||||||
|
final AbstractStructuredInvocationHandler targetHandler) {
|
||||||
|
|
||||||
|
super(client, containerHandler);
|
||||||
|
this.targetHandler = targetHandler;
|
||||||
|
this.entityHandler = entityHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
|
||||||
|
if (isSelfMethod(method, args)) {
|
||||||
|
return invokeSelfMethod(method, args);
|
||||||
|
} else if (method.getName().startsWith("get") && method.getName().endsWith("Annotations")) {
|
||||||
|
final Method getter = proxy.getClass().getInterfaces()[0].getMethod(method.getName());
|
||||||
|
|
||||||
|
String propName = null;
|
||||||
|
String navPropName = null;
|
||||||
|
|
||||||
|
final AnnotationsForProperty annForProp = ClassUtils.getAnnotation(AnnotationsForProperty.class, getter);
|
||||||
|
if (annForProp == null) {
|
||||||
|
final AnnotationsForNavigationProperty annForNavProp =
|
||||||
|
ClassUtils.getAnnotation(AnnotationsForNavigationProperty.class, getter);
|
||||||
|
if (annForNavProp == null) {
|
||||||
|
throw new UnsupportedOperationException("Unsupported method " + method.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
navPropName = annForNavProp.name();
|
||||||
|
} else {
|
||||||
|
propName = annForProp.name();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Proxy.newProxyInstance(
|
||||||
|
Thread.currentThread().getContextClassLoader(),
|
||||||
|
new Class<?>[] {method.getReturnType()},
|
||||||
|
new AnnotatableInvocationHandler(
|
||||||
|
client, containerHandler, propName, navPropName, entityHandler, targetHandler));
|
||||||
|
} else {
|
||||||
|
throw new NoSuchMethodException(method.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -45,6 +45,7 @@ class ComplexFactoryInvocationHandler extends AbstractInvocationHandler implemen
|
||||||
static ComplexFactoryInvocationHandler getInstance(
|
static ComplexFactoryInvocationHandler getInstance(
|
||||||
final EntityInvocationHandler entityHandler,
|
final EntityInvocationHandler entityHandler,
|
||||||
final AbstractStructuredInvocationHandler targetHandler) {
|
final AbstractStructuredInvocationHandler targetHandler) {
|
||||||
|
|
||||||
return new ComplexFactoryInvocationHandler(
|
return new ComplexFactoryInvocationHandler(
|
||||||
entityHandler == null ? null : entityHandler.containerHandler.client,
|
entityHandler == null ? null : entityHandler.containerHandler.client,
|
||||||
targetHandler == null
|
targetHandler == null
|
||||||
|
|
|
@ -131,13 +131,21 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void setPropertyValue(final Property property, final Object value) {
|
protected void setPropertyValue(final Property property, final Object value) {
|
||||||
final FullQualifiedName fqn =
|
final FullQualifiedName fqn =
|
||||||
new FullQualifiedName(ClassUtils.getNamespace(typeRef), typeRef.getAnnotation(ComplexType.class).name());
|
new FullQualifiedName(ClassUtils.getNamespace(typeRef), typeRef.getAnnotation(ComplexType.class).name());
|
||||||
|
|
||||||
final EdmElement edmProperty = client.getCachedEdm().getComplexType(fqn).getProperty(property.name());
|
final EdmElement edmProperty = client.getCachedEdm().getComplexType(fqn).getProperty(property.name());
|
||||||
|
|
||||||
|
final EdmTypeInfo type = new EdmTypeInfo.Builder().setEdm(client.getCachedEdm()).setTypeExpression(
|
||||||
|
edmProperty.isCollection() ? "Collection(" + property.type() + ")" : property.type()).build();
|
||||||
|
|
||||||
|
setPropertyValue(property.name(), type, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private void setPropertyValue(final String name, final EdmTypeInfo type, final Object value) {
|
||||||
|
|
||||||
final Object toBeAdded;
|
final Object toBeAdded;
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
@ -145,7 +153,7 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
|
||||||
} else if (Collection.class.isAssignableFrom(value.getClass())) {
|
} else if (Collection.class.isAssignableFrom(value.getClass())) {
|
||||||
toBeAdded = new ArrayList<Object>();
|
toBeAdded = new ArrayList<Object>();
|
||||||
for (Object obj : (Collection) value) {
|
for (Object obj : (Collection) value) {
|
||||||
((Collection) toBeAdded).add(obj instanceof Proxy ? Proxy.getInvocationHandler(obj) : obj);
|
Collection.class.cast(toBeAdded).add(obj instanceof Proxy ? Proxy.getInvocationHandler(obj) : obj);
|
||||||
}
|
}
|
||||||
} else if (value instanceof Proxy) {
|
} else if (value instanceof Proxy) {
|
||||||
toBeAdded = Proxy.getInvocationHandler(value);
|
toBeAdded = Proxy.getInvocationHandler(value);
|
||||||
|
@ -153,10 +161,7 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
|
||||||
toBeAdded = value;
|
toBeAdded = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
final EdmTypeInfo type = new EdmTypeInfo.Builder().setEdm(client.getCachedEdm()).setTypeExpression(
|
client.getBinder().add(getComplex(), CoreUtils.getODataProperty(client, name, type, toBeAdded));
|
||||||
edmProperty.isCollection() ? "Collection(" + property.type() + ")" : property.type()).build();
|
|
||||||
|
|
||||||
client.getBinder().add(getComplex(), CoreUtils.getODataProperty(client, property.name(), type, toBeAdded));
|
|
||||||
|
|
||||||
if (getEntityHandler() != null && !entityContext.isAttached(getEntityHandler())) {
|
if (getEntityHandler() != null && !entityContext.isAttached(getEntityHandler())) {
|
||||||
entityContext.attach(getEntityHandler(), AttachedEntityStatus.CHANGED);
|
entityContext.attach(getEntityHandler(), AttachedEntityStatus.CHANGED);
|
||||||
|
@ -173,13 +178,18 @@ public class ComplexInvocationHandler extends AbstractStructuredInvocationHandle
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addPropertyChanges(final String name, final Object value) {
|
public void addAdditionalProperty(final String name, final Object value) {
|
||||||
// do nothing ....
|
setPropertyValue(name, null, value);
|
||||||
|
attach(AttachedEntityStatus.CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void removePropertyChanges(final String name) {
|
public void removeAdditionalProperty(final String name) {
|
||||||
// do nothing ....
|
final CommonODataProperty property = getComplex().get(name);
|
||||||
|
if(property !=null && !property.hasNullValue()){
|
||||||
|
setPropertyValue(name, null, null);
|
||||||
|
attach(AttachedEntityStatus.CHANGED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
|
||||||
import org.apache.olingo.client.api.communication.header.ODataPreferences;
|
import org.apache.olingo.client.api.communication.header.ODataPreferences;
|
||||||
import org.apache.olingo.client.api.communication.request.ODataRequest;
|
import org.apache.olingo.client.api.communication.request.ODataRequest;
|
||||||
import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
|
import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.BatchStreamManager;
|
import org.apache.olingo.client.api.communication.request.batch.BatchManager;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
|
import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
|
import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
|
import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
|
||||||
|
@ -90,7 +90,7 @@ class ContainerImpl implements Container {
|
||||||
final CommonODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(client.getServiceRoot());
|
final CommonODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(client.getServiceRoot());
|
||||||
((ODataRequest) request).setAccept(client.getConfiguration().getDefaultBatchAcceptFormat());
|
((ODataRequest) request).setAccept(client.getConfiguration().getDefaultBatchAcceptFormat());
|
||||||
|
|
||||||
final BatchStreamManager streamManager = (BatchStreamManager) ((ODataStreamedRequest) request).execute();
|
final BatchManager streamManager = (BatchManager) ((ODataStreamedRequest) request).payloadManager();
|
||||||
|
|
||||||
final ODataChangeset changeset = streamManager.addChangeset();
|
final ODataChangeset changeset = streamManager.addChangeset();
|
||||||
|
|
||||||
|
@ -113,8 +113,9 @@ class ContainerImpl implements Container {
|
||||||
|
|
||||||
final ODataBatchResponse response = streamManager.getResponse();
|
final ODataBatchResponse response = streamManager.getResponse();
|
||||||
|
|
||||||
if ((client.getServiceVersion().compareTo(ODataServiceVersion.V30) <= 0 && response.getStatusCode() != 202)
|
// This should be 202 for service version <= 3.0 and 200 for service version >= 4.0 but it seems that
|
||||||
|| (client.getServiceVersion().compareTo(ODataServiceVersion.V30) > 0 && response.getStatusCode() != 200)) {
|
// many service implementations are not fully compliant with this respect.
|
||||||
|
if (response.getStatusCode() != 202 && response.getStatusCode() != 200) {
|
||||||
throw new IllegalStateException("Operation failed");
|
throw new IllegalStateException("Operation failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +201,7 @@ class ContainerImpl implements Container {
|
||||||
LOG.debug("Update media entity '{}'", uri);
|
LOG.debug("Update media entity '{}'", uri);
|
||||||
|
|
||||||
final ODataMediaEntityUpdateRequest<?> req =
|
final ODataMediaEntityUpdateRequest<?> req =
|
||||||
client.getStreamedRequestFactory().getMediaEntityUpdateRequest(uri, input);
|
client.getCUDRequestFactory().getMediaEntityUpdateRequest(uri, input);
|
||||||
|
|
||||||
req.setContentType(StringUtils.isBlank(handler.getEntity().getMediaContentType())
|
req.setContentType(StringUtils.isBlank(handler.getEntity().getMediaContentType())
|
||||||
? ODataMediaFormat.WILDCARD.toString()
|
? ODataMediaFormat.WILDCARD.toString()
|
||||||
|
@ -221,7 +222,7 @@ class ContainerImpl implements Container {
|
||||||
|
|
||||||
LOG.debug("Update media entity '{}'", uri);
|
LOG.debug("Update media entity '{}'", uri);
|
||||||
|
|
||||||
final ODataStreamUpdateRequest req = client.getStreamedRequestFactory().getStreamUpdateRequest(uri, input);
|
final ODataStreamUpdateRequest req = client.getCUDRequestFactory().getStreamUpdateRequest(uri, input);
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(handler.getETag())) {
|
if (StringUtils.isNotBlank(handler.getETag())) {
|
||||||
req.setIfMatch(handler.getETag());
|
req.setIfMatch(handler.getETag());
|
||||||
|
@ -321,6 +322,11 @@ class ContainerImpl implements Container {
|
||||||
if (entity instanceof ODataEntity) {
|
if (entity instanceof ODataEntity) {
|
||||||
((ODataEntity) entity).getAnnotations().clear();
|
((ODataEntity) entity).getAnnotations().clear();
|
||||||
CoreUtils.addAnnotations(client, handler.getAnnotations(), (ODataEntity) entity);
|
CoreUtils.addAnnotations(client, handler.getAnnotations(), (ODataEntity) entity);
|
||||||
|
|
||||||
|
for (Map.Entry<String, AnnotatableInvocationHandler> entry : handler.getPropAnnotatableHandlers().entrySet()) {
|
||||||
|
CoreUtils.addAnnotations(client,
|
||||||
|
entry.getValue().getAnnotations(), ((ODataEntity) entity).getProperty(entry.getKey()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,6 +382,16 @@ class ContainerImpl implements Container {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entity instanceof ODataEntity) {
|
||||||
|
for (Map.Entry<String, AnnotatableInvocationHandler> entry
|
||||||
|
: handler.getNavPropAnnotatableHandlers().entrySet()) {
|
||||||
|
|
||||||
|
CoreUtils.addAnnotations(client,
|
||||||
|
entry.getValue().getAnnotations(),
|
||||||
|
(org.apache.olingo.commons.api.domain.v4.ODataLink) entity.getNavigationLink(entry.getKey()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// insert into the batch
|
// insert into the batch
|
||||||
LOG.debug("{}: Insert '{}' into the batch", pos, handler);
|
LOG.debug("{}: Insert '{}' into the batch", pos, handler);
|
||||||
final AttachedEntityStatus processedStatus = batch(handler, entity, changeset);
|
final AttachedEntityStatus processedStatus = batch(handler, entity, changeset);
|
||||||
|
|
|
@ -44,6 +44,7 @@ import org.apache.olingo.commons.api.domain.v4.ODataEntity;
|
||||||
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
|
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
|
||||||
import org.apache.olingo.commons.api.format.ODataMediaFormat;
|
import org.apache.olingo.commons.api.format.ODataMediaFormat;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractTerm;
|
import org.apache.olingo.ext.proxy.api.AbstractTerm;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
@ -53,7 +54,7 @@ import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
|
||||||
import org.apache.olingo.ext.proxy.context.EntityUUID;
|
import org.apache.olingo.ext.proxy.context.EntityUUID;
|
||||||
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
import org.apache.olingo.ext.proxy.utils.CoreUtils;
|
||||||
|
|
||||||
public class EntityInvocationHandler extends AbstractStructuredInvocationHandler {
|
public class EntityInvocationHandler extends AbstractStructuredInvocationHandler implements Annotatable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 2629912294765040037L;
|
private static final long serialVersionUID = 2629912294765040037L;
|
||||||
|
|
||||||
|
@ -180,6 +181,12 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
return propertyChanges;
|
return propertyChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addAdditionalProperty(final String name, final Object value) {
|
||||||
|
propertyChanges.put(name, value);
|
||||||
|
attach(AttachedEntityStatus.CHANGED);
|
||||||
|
}
|
||||||
|
|
||||||
public Map<NavigationProperty, Object> getLinkChanges() {
|
public Map<NavigationProperty, Object> getLinkChanges() {
|
||||||
return linkChanges;
|
return linkChanges;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +264,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
if (EdmPrimitiveTypeKind.Stream.getFullQualifiedName().toString().equalsIgnoreCase(property.type())) {
|
if (EdmPrimitiveTypeKind.Stream.getFullQualifiedName().toString().equalsIgnoreCase(property.type())) {
|
||||||
setStreamedProperty(property, (InputStream) value);
|
setStreamedProperty(property, (InputStream) value);
|
||||||
} else {
|
} else {
|
||||||
addPropertyChanges(property.name(), value);
|
propertyChanges.put(property.name(), value);
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
Collection<?> coll;
|
Collection<?> coll;
|
||||||
|
@ -316,7 +323,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
final String contentType =
|
final String contentType =
|
||||||
StringUtils.isBlank(getEntity().getMediaContentType()) ? "*/*" : getEntity().getMediaContentType();
|
StringUtils.isBlank(getEntity().getMediaContentType()) ? "*/*" : getEntity().getMediaContentType();
|
||||||
|
|
||||||
final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaRequest(contentSource);
|
final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaEntityRequest(contentSource);
|
||||||
retrieveReq.setFormat(ODataMediaFormat.fromFormat(contentType));
|
retrieveReq.setFormat(ODataMediaFormat.fromFormat(contentType));
|
||||||
|
|
||||||
this.stream = retrieveReq.execute().getBody();
|
this.stream = retrieveReq.execute().getBody();
|
||||||
|
@ -326,7 +333,6 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getStreamedProperty(final String name) {
|
public Object getStreamedProperty(final String name) {
|
||||||
|
|
||||||
InputStream res = streamedPropertyChanges.get(name);
|
InputStream res = streamedPropertyChanges.get(name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -374,13 +380,9 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addPropertyChanges(final String name, final Object value) {
|
public void removeAdditionalProperty(final String name) {
|
||||||
propertyChanges.put(name, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void removePropertyChanges(final String name) {
|
|
||||||
propertyChanges.remove(name);
|
propertyChanges.remove(name);
|
||||||
|
attach(AttachedEntityStatus.CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void cacheProperty(final String name, final Object value) {
|
protected void cacheProperty(final String name, final Object value) {
|
||||||
|
@ -400,6 +402,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
updateLinksTag(checkpoint);
|
updateLinksTag(checkpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addAnnotation(final Class<? extends AbstractTerm> term, final Object value) {
|
public void addAnnotation(final Class<? extends AbstractTerm> term, final Object value) {
|
||||||
this.annotations.put(term, value);
|
this.annotations.put(term, value);
|
||||||
|
|
||||||
|
@ -425,10 +428,13 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
attach(AttachedEntityStatus.CHANGED);
|
attach(AttachedEntityStatus.CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeAnnotation(final Class<? extends AbstractTerm> term) {
|
public void removeAnnotation(final Class<? extends AbstractTerm> term) {
|
||||||
this.annotations.remove(term);
|
this.annotations.remove(term);
|
||||||
|
attach(AttachedEntityStatus.CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getAnnotation(final Class<? extends AbstractTerm> term) {
|
public Object getAnnotation(final Class<? extends AbstractTerm> term) {
|
||||||
Object res = null;
|
Object res = null;
|
||||||
|
|
||||||
|
@ -458,6 +464,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Collection<Class<? extends AbstractTerm>> getAnnotationTerms() {
|
public Collection<Class<? extends AbstractTerm>> getAnnotationTerms() {
|
||||||
return getEntity() instanceof ODataEntity
|
return getEntity() instanceof ODataEntity
|
||||||
? CoreUtils.getAnnotationTerms(((ODataEntity) getEntity()).getAnnotations())
|
? CoreUtils.getAnnotationTerms(((ODataEntity) getEntity()).getAnnotations())
|
||||||
|
|
|
@ -90,8 +90,7 @@ class EntitySetInvocationHandler<
|
||||||
static EntitySetInvocationHandler getInstance(
|
static EntitySetInvocationHandler getInstance(
|
||||||
final Class<?> ref, final EntityContainerInvocationHandler containerHandler, final String entitySetName) {
|
final Class<?> ref, final EntityContainerInvocationHandler containerHandler, final String entitySetName) {
|
||||||
|
|
||||||
final CommonURIBuilder<?> uriBuilder = containerHandler.getClient().
|
final CommonURIBuilder<?> uriBuilder = containerHandler.getClient().newURIBuilder();
|
||||||
getURIBuilder(containerHandler.getFactory().getServiceRoot());
|
|
||||||
|
|
||||||
final StringBuilder entitySetSegment = new StringBuilder();
|
final StringBuilder entitySetSegment = new StringBuilder();
|
||||||
if (!containerHandler.isDefaultEntityContainer()) {
|
if (!containerHandler.isDefaultEntityContainer()) {
|
||||||
|
@ -184,7 +183,7 @@ class EntitySetInvocationHandler<
|
||||||
@Override
|
@Override
|
||||||
public Long count() {
|
public Long count() {
|
||||||
final ODataValueRequest req = client.getRetrieveRequestFactory().
|
final ODataValueRequest req = client.getRetrieveRequestFactory().
|
||||||
getValueRequest(client.getURIBuilder(this.uri.toASCIIString()).count().build());
|
getValueRequest(client.newURIBuilder(this.uri.toASCIIString()).count().build());
|
||||||
req.setFormat(ODataValueFormat.TEXT);
|
req.setFormat(ODataValueFormat.TEXT);
|
||||||
return Long.valueOf(req.execute().getBody().asPrimitive().toString());
|
return Long.valueOf(req.execute().getBody().asPrimitive().toString());
|
||||||
}
|
}
|
||||||
|
@ -247,7 +246,7 @@ class EntitySetInvocationHandler<
|
||||||
// not yet attached: search against the service
|
// not yet attached: search against the service
|
||||||
try {
|
try {
|
||||||
LOG.debug("Search for '{}({})' into the service", typeRef.getSimpleName(), key);
|
LOG.debug("Search for '{}({})' into the service", typeRef.getSimpleName(), key);
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(this.uri.toASCIIString());
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(this.uri.toASCIIString());
|
||||||
|
|
||||||
if (key.getClass().getAnnotation(CompoundKey.class) == null) {
|
if (key.getClass().getAnnotation(CompoundKey.class) == null) {
|
||||||
LOG.debug("Append key segment '{}'", key);
|
LOG.debug("Append key segment '{}'", key);
|
||||||
|
@ -376,7 +375,7 @@ class EntitySetInvocationHandler<
|
||||||
final Class<S> ref = (Class<S>) ClassUtils.extractTypeArg(collTypeRef);
|
final Class<S> ref = (Class<S>) ClassUtils.extractTypeArg(collTypeRef);
|
||||||
final Class<S> oref = (Class<S>) ClassUtils.extractTypeArg(this.collTypeRef);
|
final Class<S> oref = (Class<S>) ClassUtils.extractTypeArg(this.collTypeRef);
|
||||||
|
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(this.uri.toASCIIString());
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(this.uri.toASCIIString());
|
||||||
|
|
||||||
final URI entitySetURI;
|
final URI entitySetURI;
|
||||||
if (oref.equals(ref)) {
|
if (oref.equals(ref)) {
|
||||||
|
@ -463,6 +462,6 @@ class EntitySetInvocationHandler<
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntitySetIterator<T, KEY, EC> iterator() {
|
public EntitySetIterator<T, KEY, EC> iterator() {
|
||||||
return new EntitySetIterator<T, KEY, EC>(client.getURIBuilder(this.uri.toASCIIString()).build(), this);
|
return new EntitySetIterator<T, KEY, EC>(client.newURIBuilder(this.uri.toASCIIString()).build(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class FilterImpl<T extends Serializable, EC extends AbstractEntityCollect
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EC getResult() {
|
public EC getResult() {
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(this.baseURI.toASCIIString()).
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(this.baseURI.toASCIIString()).
|
||||||
appendDerivedEntityTypeSegment(new FullQualifiedName(
|
appendDerivedEntityTypeSegment(new FullQualifiedName(
|
||||||
ClassUtils.getNamespace(typeRef), ClassUtils.getEntityTypeName(typeRef)).toString());
|
ClassUtils.getNamespace(typeRef), ClassUtils.getEntityTypeName(typeRef)).toString());
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.apache.olingo.client.api.uri.CommonURIBuilder;
|
import org.apache.olingo.client.api.uri.CommonURIBuilder;
|
||||||
import org.apache.olingo.client.core.uri.URIUtils;
|
|
||||||
import org.apache.olingo.commons.api.domain.CommonODataEntity;
|
import org.apache.olingo.commons.api.domain.CommonODataEntity;
|
||||||
import org.apache.olingo.commons.api.domain.ODataOperation;
|
import org.apache.olingo.commons.api.domain.ODataOperation;
|
||||||
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
|
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
|
||||||
|
@ -41,7 +40,7 @@ import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
import org.apache.olingo.ext.proxy.utils.ClassUtils;
|
||||||
|
|
||||||
class OperationInvocationHandler extends AbstractInvocationHandler implements OperationExecutor {
|
final class OperationInvocationHandler extends AbstractInvocationHandler implements OperationExecutor {
|
||||||
|
|
||||||
private static final long serialVersionUID = 2629912294765040027L;
|
private static final long serialVersionUID = 2629912294765040027L;
|
||||||
|
|
||||||
|
@ -154,8 +153,8 @@ class OperationInvocationHandler extends AbstractInvocationHandler implements Op
|
||||||
edmOperation = container.getActionImport(operation.name()).getUnboundAction();
|
edmOperation = container.getActionImport(operation.name()).getUnboundAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
final CommonURIBuilder<?> uriBuilder = getClient().getURIBuilder(this.serviceRoot).
|
final CommonURIBuilder<?> uriBuilder = getClient().newURIBuilder(this.serviceRoot).
|
||||||
appendOperationCallSegment(URIUtils.operationImportURISegment(container, edmOperation.getName()));
|
appendOperationCallSegment(edmOperation.getName());
|
||||||
|
|
||||||
return new AbstractMap.SimpleEntry<URI, EdmOperation>(uriBuilder.build(), edmOperation);
|
return new AbstractMap.SimpleEntry<URI, EdmOperation>(uriBuilder.build(), edmOperation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class SearchImpl<T extends Serializable, EC extends AbstractEntityCollect
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EC getResult() {
|
public EC getResult() {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(this.baseURI.toASCIIString()).
|
final URIBuilder uriBuilder = client.newURIBuilder(this.baseURI.toASCIIString()).
|
||||||
appendDerivedEntityTypeSegment(new FullQualifiedName(
|
appendDerivedEntityTypeSegment(new FullQualifiedName(
|
||||||
ClassUtils.getNamespace(typeRef), ClassUtils.getEntityTypeName(typeRef)).toString());
|
ClassUtils.getNamespace(typeRef), ClassUtils.getEntityTypeName(typeRef)).toString());
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,8 @@ public class EntityContext implements Iterable<AttachedEntity> {
|
||||||
* @return <tt>true</tt> if is attached; <tt>false</tt> otherwise.
|
* @return <tt>true</tt> if is attached; <tt>false</tt> otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean isAttached(final EntityInvocationHandler entity) {
|
public boolean isAttached(final EntityInvocationHandler entity) {
|
||||||
return allAttachedEntities.containsKey(entity)
|
return entity == null // avoid attach for null entities (coming from complexes created from container ...)
|
||||||
|
|| allAttachedEntities.containsKey(entity)
|
||||||
|| (entity.getUUID().getKey() != null && searchableEntities.containsKey(entity.getUUID()));
|
|| (entity.getUUID().getKey() != null && searchableEntities.containsKey(entity.getUUID()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.apache.olingo.commons.api.domain.CommonODataProperty;
|
||||||
import org.apache.olingo.commons.api.domain.ODataLink;
|
import org.apache.olingo.commons.api.domain.ODataLink;
|
||||||
import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
|
import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
|
||||||
import org.apache.olingo.commons.api.domain.ODataValue;
|
import org.apache.olingo.commons.api.domain.ODataValue;
|
||||||
|
import org.apache.olingo.commons.api.domain.v4.ODataAnnotatable;
|
||||||
import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
|
import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
|
||||||
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
|
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
|
||||||
import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
|
import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
|
||||||
|
@ -312,7 +313,7 @@ public final class CoreUtils {
|
||||||
public static void addAnnotations(
|
public static void addAnnotations(
|
||||||
final CommonEdmEnabledODataClient<?> client,
|
final CommonEdmEnabledODataClient<?> client,
|
||||||
final Map<Class<? extends AbstractTerm>, Object> annotations,
|
final Map<Class<? extends AbstractTerm>, Object> annotations,
|
||||||
final ODataEntity entity) {
|
final ODataAnnotatable annotatable) {
|
||||||
|
|
||||||
for (Map.Entry<Class<? extends AbstractTerm>, Object> entry : annotations.entrySet()) {
|
for (Map.Entry<Class<? extends AbstractTerm>, Object> entry : annotations.entrySet()) {
|
||||||
final Namespace nsAnn = entry.getKey().getAnnotation(Namespace.class);
|
final Namespace nsAnn = entry.getKey().getAnnotation(Namespace.class);
|
||||||
|
@ -322,7 +323,7 @@ public final class CoreUtils {
|
||||||
if (term == null) {
|
if (term == null) {
|
||||||
LOG.error("Could not find term for class {}", entry.getKey().getName());
|
LOG.error("Could not find term for class {}", entry.getKey().getName());
|
||||||
} else {
|
} else {
|
||||||
entity.getAnnotations().add(getODataAnnotation(
|
annotatable.getAnnotations().add(getODataAnnotation(
|
||||||
client, term.getFullQualifiedName().toString(), term.getType(), entry.getValue()));
|
client, term.getFullQualifiedName().toString(), term.getType(), entry.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,14 @@
|
||||||
*#
|
*#
|
||||||
package ${package};
|
package ${package};
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
#foreach($ns in $namespaces)
|
#foreach($ns in $namespaces)
|
||||||
import ${basePackage}.${ns}.*;
|
import ${basePackage}.${ns}.*;
|
||||||
import ${basePackage}.${ns}.types.*;
|
import ${basePackage}.${ns}.types.*;
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
package ${package};
|
package ${package};
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -28,7 +30,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -63,7 +65,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = $entityType.Abstract#if($entityType.getBaseType()),
|
isAbstract = $entityType.Abstract#if($entityType.getBaseType()),
|
||||||
baseType = "$entityType.getBaseType().getFullQualifiedName().toString()"#end)
|
baseType = "$entityType.getBaseType().getFullQualifiedName().toString()"#end)
|
||||||
public interface $utility.capitalize($entityType.Name)
|
public interface $utility.capitalize($entityType.Name)
|
||||||
extends AbstractAnnotatable,#if( $entityType.getBaseType() )$utility.getJavaType($entityType.getBaseType())#{elseif}( $entityType.isOpenType() )AbstractOpenType#{else}Serializable#end {
|
extends Annotatable,#if( $entityType.getBaseType() )$utility.getJavaType($entityType.getBaseType())#{elseif}( $entityType.isOpenType() )AbstractOpenType#{else}Serializable#end {
|
||||||
|
|
||||||
#set( $keys = [] )
|
#set( $keys = [] )
|
||||||
#foreach($key in $entityType.KeyPropertyRefs)
|
#foreach($key in $entityType.KeyPropertyRefs)
|
||||||
|
@ -199,4 +201,30 @@ public interface $utility.capitalize($entityType.Name)
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
#if( $entityType.baseType )
|
||||||
|
@Override
|
||||||
|
#end
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations #if( $entityType.baseType )
|
||||||
|
extends ${utility.getJavaType($entityType.getBaseType())}.Annotations#end{
|
||||||
|
|
||||||
|
#foreach($propertyName in $entityType.PropertyNames)
|
||||||
|
#set($property = $entityType.getProperty($propertyName))
|
||||||
|
@AnnotationsForProperty(name = "$property.Name",
|
||||||
|
type = "$property.Type.FullQualifiedName.toString()")
|
||||||
|
Annotatable get$utility.capitalize($property.Name)Annotations();
|
||||||
|
|
||||||
|
#end
|
||||||
|
|
||||||
|
#foreach($propertyName in $entityType.NavigationPropertyNames)
|
||||||
|
#set($property = $entityType.getNavigationProperty($propertyName))
|
||||||
|
#set($type = $utility.getNavigationType($property))
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "$property.Name",
|
||||||
|
type = "$type")
|
||||||
|
Annotatable get$utility.capitalize($property.Name)Annotations();
|
||||||
|
#end
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
isAbstract = $complexType.Abstract#if($complexType.getBaseType()),
|
isAbstract = $complexType.Abstract#if($complexType.getBaseType()),
|
||||||
baseType = "$complexType.getBaseType().getFullQualifiedName().toString()"#end)
|
baseType = "$complexType.getBaseType().getFullQualifiedName().toString()"#end)
|
||||||
public interface $utility.capitalize($complexType.Name)
|
public interface $utility.capitalize($complexType.Name)
|
||||||
extends #if($complexType.getBaseType())$utility.getJavaType($complexType.getBaseType().getFullQualifiedName().toString())#{else}Serializable#end {
|
extends #if($complexType.getBaseType())$utility.getJavaType($complexType.getBaseType().getFullQualifiedName().toString()),#{end}#if( $complexType.isOpenType() )AbstractOpenType,#{end}Serializable {
|
||||||
|
|
||||||
#set( $complexProps = [] )
|
#set( $complexProps = [] )
|
||||||
#foreach($propertyName in $complexType.PropertyNames)
|
#foreach($propertyName in $complexType.PropertyNames)
|
||||||
|
@ -81,3 +81,29 @@ public interface $utility.capitalize($complexType.Name)
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
#if( $complexType.baseType )
|
||||||
|
@Override
|
||||||
|
#end
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations #if( $complexType.baseType )
|
||||||
|
extends ${utility.getJavaType($complexType.getBaseType())}.Annotations#end{
|
||||||
|
|
||||||
|
#foreach($propertyName in $complexType.PropertyNames)
|
||||||
|
#set($property = $complexType.getProperty($propertyName))
|
||||||
|
@AnnotationsForProperty(name = "$property.Name",
|
||||||
|
type = "$property.Type.FullQualifiedName.toString()")
|
||||||
|
Annotatable get$utility.capitalize($property.Name)Annotations();
|
||||||
|
|
||||||
|
#end
|
||||||
|
|
||||||
|
#foreach($propertyName in $complexType.NavigationPropertyNames)
|
||||||
|
#set($property = $complexType.getNavigationProperty($propertyName))
|
||||||
|
#set($type = $utility.getNavigationType($property))
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "$property.Name",
|
||||||
|
type = "$type")
|
||||||
|
Annotatable get$utility.capitalize($property.Name)Annotations();
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
|
|
@ -39,5 +39,6 @@
|
||||||
<module>client-core-android</module>
|
<module>client-core-android</module>
|
||||||
<module>pojogen-maven-plugin</module>
|
<module>pojogen-maven-plugin</module>
|
||||||
<module>client-proxy</module>
|
<module>client-proxy</module>
|
||||||
|
<module>client-proxy-android</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -188,7 +188,7 @@ public abstract class AbstractServices {
|
||||||
|
|
||||||
protected Response getMetadata(final String filename) {
|
protected Response getMetadata(final String filename) {
|
||||||
try {
|
try {
|
||||||
return xml.createResponse(null, FSManager.instance(version).readFile(filename, Accept.XML), null, Accept.XML);
|
return xml.createResponse(null, FSManager.instance(version).readRes(filename, Accept.XML), null, Accept.XML);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return xml.createFaultResponse(Accept.XML.toString(version), e);
|
return xml.createFaultResponse(Accept.XML.toString(version), e);
|
||||||
}
|
}
|
||||||
|
@ -1306,10 +1306,9 @@ public abstract class AbstractServices {
|
||||||
@PathParam("entityId") String entityId) {
|
@PathParam("entityId") String entityId) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final String basePath =
|
final String basePath = entitySetName + File.separatorChar + Commons.getEntityKey(entityId);
|
||||||
entitySetName + File.separatorChar + Commons.getEntityKey(entityId) + File.separatorChar;
|
|
||||||
|
|
||||||
FSManager.instance(version).deleteFile(basePath + Constants.get(version, ConstantKey.ENTITY));
|
FSManager.instance(version).deleteEntity(basePath);
|
||||||
|
|
||||||
return xml.createResponse(null, null, null, null, Response.Status.NO_CONTENT);
|
return xml.createResponse(null, null, null, null, Response.Status.NO_CONTENT);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ import org.springframework.stereotype.Service;
|
||||||
public class V3ActionOverloading extends V3Services {
|
public class V3ActionOverloading extends V3Services {
|
||||||
|
|
||||||
public V3ActionOverloading() throws Exception {
|
public V3ActionOverloading() throws Exception {
|
||||||
super(new Metadata(FSManager.instance(ODataServiceVersion.V30).readFile(
|
super(new Metadata(FSManager.instance(ODataServiceVersion.V30).readRes(
|
||||||
"actionOverloading" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V30, ConstantKey.METADATA)),
|
"actionOverloading" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V30, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V30));
|
Accept.XML), ODataServiceVersion.V30));
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class V3OpenType extends V3Services {
|
||||||
|
|
||||||
public V3OpenType() throws Exception {
|
public V3OpenType() throws Exception {
|
||||||
super(new Metadata(FSManager.instance(ODataServiceVersion.V30).
|
super(new Metadata(FSManager.instance(ODataServiceVersion.V30).
|
||||||
readFile("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V30, ConstantKey.METADATA)),
|
readRes("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V30, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V30));
|
Accept.XML), ODataServiceVersion.V30));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class V3PrimitiveKeys extends V3Services {
|
||||||
public Response getMetadata() {
|
public Response getMetadata() {
|
||||||
try {
|
try {
|
||||||
return xml.createResponse(
|
return xml.createResponse(
|
||||||
null, FSManager.instance(version).readFile("primitiveKeysMetadata", Accept.XML), null, Accept.XML);
|
null, FSManager.instance(version).readRes("primitiveKeysMetadata", Accept.XML), null, Accept.XML);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return xml.createFaultResponse(Accept.XML.toString(version), e);
|
return xml.createFaultResponse(Accept.XML.toString(version), e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class V4Demo extends V4Services {
|
||||||
|
|
||||||
public V4Demo() throws Exception {
|
public V4Demo() throws Exception {
|
||||||
super(new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
super(new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
||||||
readFile("demo" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
readRes("demo" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V40));
|
Accept.XML), ODataServiceVersion.V40));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class V4OpenType extends V4Services {
|
||||||
|
|
||||||
public V4OpenType() throws Exception {
|
public V4OpenType() throws Exception {
|
||||||
super(new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
super(new Metadata(FSManager.instance(ODataServiceVersion.V40).
|
||||||
readFile("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
readRes("openType" + StringUtils.capitalize(Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA)),
|
||||||
Accept.XML), ODataServiceVersion.V40));
|
Accept.XML), ODataServiceVersion.V40));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ public class V4Services extends AbstractServices {
|
||||||
addChangesetItemIntro(chbos, lastContebtID, cboundary);
|
addChangesetItemIntro(chbos, lastContebtID, cboundary);
|
||||||
|
|
||||||
res = bodyPartRequest(new MimeBodyPart(part.getInputStream()), references);
|
res = bodyPartRequest(new MimeBodyPart(part.getInputStream()), references);
|
||||||
if (res==null || res.getStatus() >= 400) {
|
if (res == null || res.getStatus() >= 400) {
|
||||||
throw new Exception("Failure processing changeset");
|
throw new Exception("Failure processing changeset");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ public class V4Services extends AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/Company/Microsoft.Test.OData.Services.ODataWCFService.GetEmployeesCount")
|
@Path("/Company/Microsoft.Test.OData.Services.ODataWCFService.GetEmployeesCount{paren:[\\(\\)]*}")
|
||||||
public Response functionGetEmployeesCount(
|
public Response functionGetEmployeesCount(
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format) {
|
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format) {
|
||||||
|
@ -488,7 +488,7 @@ public class V4Services extends AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/Company/Microsoft.Test.OData.Services.ODataWCFService.IncreaseRevenue")
|
@Path("/Company/Microsoft.Test.OData.Services.ODataWCFService.IncreaseRevenue{paren:[\\(\\)]*}")
|
||||||
public Response actionIncreaseRevenue(
|
public Response actionIncreaseRevenue(
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
||||||
|
@ -562,7 +562,7 @@ public class V4Services extends AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/Products({entityId})/Microsoft.Test.OData.Services.ODataWCFService.AddAccessRight")
|
@Path("/Products({entityId})/Microsoft.Test.OData.Services.ODataWCFService.AddAccessRight{paren:[\\(\\)]*}")
|
||||||
public Response actionAddAccessRight(
|
public Response actionAddAccessRight(
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
||||||
|
@ -583,11 +583,16 @@ public class V4Services extends AbstractServices {
|
||||||
assert 1 == entry.getProperties().size();
|
assert 1 == entry.getProperties().size();
|
||||||
assert entry.getProperty("accessRight") != null;
|
assert entry.getProperty("accessRight") != null;
|
||||||
|
|
||||||
entry.getProperty("accessRight").setType("Microsoft.Test.OData.Services.ODataWCFService.AccessLevel");
|
final Property property = entry.getProperty("accessRight");
|
||||||
|
property.setType("Microsoft.Test.OData.Services.ODataWCFService.AccessLevel");
|
||||||
|
|
||||||
|
final ResWrap<AtomPropertyImpl> result = new ResWrap<AtomPropertyImpl>(
|
||||||
|
URI.create(Constants.get(version, ConstantKey.ODATA_METADATA_PREFIX) + property.getType()),
|
||||||
|
null, (AtomPropertyImpl) property);
|
||||||
|
|
||||||
return xml.createResponse(
|
return xml.createResponse(
|
||||||
null,
|
null,
|
||||||
xml.writeProperty(acceptType, entry.getProperty("accessRight")),
|
xml.writeProperty(acceptType, result),
|
||||||
null,
|
null,
|
||||||
acceptType);
|
acceptType);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -596,7 +601,7 @@ public class V4Services extends AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/Customers(PersonID={personId})/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress")
|
@Path("/Customers(PersonID={personId})/Microsoft.Test.OData.Services.ODataWCFService.ResetAddress{paren:[\\(\\)]*}")
|
||||||
public Response actionResetAddress(
|
public Response actionResetAddress(
|
||||||
@Context UriInfo uriInfo,
|
@Context UriInfo uriInfo,
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
|
@ -622,7 +627,7 @@ public class V4Services extends AbstractServices {
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/ProductDetails(ProductID={productId},ProductDetailID={productDetailId})"
|
@Path("/ProductDetails(ProductID={productId},ProductDetailID={productDetailId})"
|
||||||
+ "/Microsoft.Test.OData.Services.ODataWCFService.GetRelatedProduct")
|
+ "/Microsoft.Test.OData.Services.ODataWCFService.GetRelatedProduct{paren:[\\(\\)]*}")
|
||||||
public Response functionGetRelatedProduct(
|
public Response functionGetRelatedProduct(
|
||||||
@Context UriInfo uriInfo,
|
@Context UriInfo uriInfo,
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
|
@ -634,11 +639,12 @@ public class V4Services extends AbstractServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/Accounts(101)/Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI")
|
@Path("/Accounts({entityId})/Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI{paren:[\\(\\)]*}")
|
||||||
public Response actionRefreshDefaultPI(
|
public Response actionRefreshDefaultPI(
|
||||||
@Context UriInfo uriInfo,
|
@Context UriInfo uriInfo,
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
||||||
|
@PathParam("entityId") String entityId,
|
||||||
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format,
|
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format,
|
||||||
final String param) {
|
final String param) {
|
||||||
|
|
||||||
|
@ -649,23 +655,24 @@ public class V4Services extends AbstractServices {
|
||||||
assert 1 == entry.getProperties().size();
|
assert 1 == entry.getProperties().size();
|
||||||
assert entry.getProperty("newDate") != null;
|
assert entry.getProperty("newDate") != null;
|
||||||
|
|
||||||
return functionGetDefaultPI(accept, format);
|
return functionGetDefaultPI(accept, entityId, format);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return xml.createFaultResponse(accept, e);
|
return xml.createFaultResponse(accept, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/Accounts(101)/Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI")
|
@Path("/Accounts({entityId})/Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI{paren:[\\(\\)]*}")
|
||||||
public Response functionGetDefaultPI(
|
public Response functionGetDefaultPI(
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
|
@PathParam("entityId") String entityId,
|
||||||
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format) {
|
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format) {
|
||||||
|
|
||||||
return getContainedEntity(accept, "101", "MyPaymentInstruments", "101901", format);
|
return getContainedEntity(accept, entityId, "MyPaymentInstruments", entityId+ "901", format);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/Accounts({entityId})/Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo")
|
@Path("/Accounts({entityId})/Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo{paren:[\\(\\)]*}")
|
||||||
public Response functionGetAccountInfo(
|
public Response functionGetAccountInfo(
|
||||||
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
@PathParam("entityId") String entityId,
|
@PathParam("entityId") String entityId,
|
||||||
|
@ -1317,4 +1324,26 @@ public class V4Services extends AbstractServices {
|
||||||
return xml.createFaultResponse(accept, e);
|
return xml.createFaultResponse(accept, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/Products({productId})/Categories/$ref")
|
||||||
|
public Response createLinked(
|
||||||
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
|
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
||||||
|
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format,
|
||||||
|
final String entity) {
|
||||||
|
|
||||||
|
return xml.createResponse(null, null, null, Status.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DELETE
|
||||||
|
@Path("/Products({productId})/Categories({categoryId})/$ref")
|
||||||
|
public Response deleteLinked(
|
||||||
|
@HeaderParam("Accept") @DefaultValue(StringUtils.EMPTY) String accept,
|
||||||
|
@HeaderParam("Content-Type") @DefaultValue(StringUtils.EMPTY) String contentType,
|
||||||
|
@QueryParam("$format") @DefaultValue(StringUtils.EMPTY) String format,
|
||||||
|
final String entity) {
|
||||||
|
|
||||||
|
return xml.createResponse(null, null, null, Status.NO_CONTENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class V4Vocabularies {
|
||||||
private final XMLUtilities xml;
|
private final XMLUtilities xml;
|
||||||
|
|
||||||
public V4Vocabularies() throws Exception {
|
public V4Vocabularies() throws Exception {
|
||||||
this.metadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).readFile(
|
this.metadata = new Metadata(FSManager.instance(ODataServiceVersion.V40).readRes(
|
||||||
"vocabularies-" + Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA), Accept.XML),
|
"vocabularies-" + Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA), Accept.XML),
|
||||||
ODataServiceVersion.V40);
|
ODataServiceVersion.V40);
|
||||||
this.xml = new XMLUtilities(ODataServiceVersion.V40, metadata);
|
this.xml = new XMLUtilities(ODataServiceVersion.V40, metadata);
|
||||||
|
@ -55,7 +55,7 @@ public class V4Vocabularies {
|
||||||
try {
|
try {
|
||||||
return xml.createResponse(
|
return xml.createResponse(
|
||||||
null,
|
null,
|
||||||
FSManager.instance(ODataServiceVersion.V40).readFile(
|
FSManager.instance(ODataServiceVersion.V40).readRes(
|
||||||
"vocabularies-" + Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA), Accept.XML),
|
"vocabularies-" + Constants.get(ODataServiceVersion.V40, ConstantKey.METADATA), Accept.XML),
|
||||||
null,
|
null,
|
||||||
Accept.XML);
|
Accept.XML);
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class DataBinder {
|
||||||
|
|
||||||
public JSONEntityImpl toJSONEntity(final AtomEntityImpl atomEntity) {
|
public JSONEntityImpl toJSONEntity(final AtomEntityImpl atomEntity) {
|
||||||
final JSONEntityImpl jsonEntity = new JSONEntityImpl();
|
final JSONEntityImpl jsonEntity = new JSONEntityImpl();
|
||||||
|
jsonEntity.getAnnotations().addAll(atomEntity.getAnnotations());
|
||||||
|
|
||||||
BeanUtils.copyProperties(atomEntity, jsonEntity, "baseURI", "properties", "links");
|
BeanUtils.copyProperties(atomEntity, jsonEntity, "baseURI", "properties", "links");
|
||||||
// This shouldn't ever happen, but...
|
// This shouldn't ever happen, but...
|
||||||
|
@ -126,6 +127,7 @@ public class DataBinder {
|
||||||
jlink.setTitle(link.getTitle());
|
jlink.setTitle(link.getTitle());
|
||||||
jlink.setType(link.getType());
|
jlink.setType(link.getType());
|
||||||
jlink.setRel(link.getRel());
|
jlink.setRel(link.getRel());
|
||||||
|
jlink.getAnnotations().addAll(link.getAnnotations());
|
||||||
|
|
||||||
if (link.getInlineEntity() instanceof AtomEntityImpl) {
|
if (link.getInlineEntity() instanceof AtomEntityImpl) {
|
||||||
final Entity inlineEntity = link.getInlineEntity();
|
final Entity inlineEntity = link.getInlineEntity();
|
||||||
|
@ -184,6 +186,7 @@ public class DataBinder {
|
||||||
final Link alink = new LinkImpl();
|
final Link alink = new LinkImpl();
|
||||||
alink.setHref(link.getHref());
|
alink.setHref(link.getHref());
|
||||||
alink.setTitle(link.getTitle());
|
alink.setTitle(link.getTitle());
|
||||||
|
alink.getAnnotations().addAll(link.getAnnotations());
|
||||||
|
|
||||||
final NavigationProperty navPropDetails =
|
final NavigationProperty navPropDetails =
|
||||||
metadata.getEntityOrComplexType(jsonEntity.getType()).getNavigationProperty(link.getTitle());
|
metadata.getEntityOrComplexType(jsonEntity.getType()).getNavigationProperty(link.getTitle());
|
||||||
|
@ -218,6 +221,7 @@ public class DataBinder {
|
||||||
if (navProperties.containsKey(property.getName())) {
|
if (navProperties.containsKey(property.getName())) {
|
||||||
final Link alink = new LinkImpl();
|
final Link alink = new LinkImpl();
|
||||||
alink.setTitle(property.getName());
|
alink.setTitle(property.getName());
|
||||||
|
alink.getAnnotations().addAll(property.getAnnotations());
|
||||||
|
|
||||||
alink.setType(navProperties.get(property.getName()).isEntitySet()
|
alink.setType(navProperties.get(property.getName()).isEntitySet()
|
||||||
? Constants.get(version, ConstantKey.ATOM_LINK_FEED)
|
? Constants.get(version, ConstantKey.ATOM_LINK_FEED)
|
||||||
|
@ -256,22 +260,23 @@ public class DataBinder {
|
||||||
return atomEntity;
|
return atomEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONPropertyImpl toJSONProperty(final AtomPropertyImpl atomproperty) {
|
public JSONPropertyImpl toJSONProperty(final AtomPropertyImpl atomProperty) {
|
||||||
final JSONPropertyImpl jsonproperty = new JSONPropertyImpl();
|
final JSONPropertyImpl jsonProperty = new JSONPropertyImpl();
|
||||||
BeanUtils.copyProperties(atomproperty, jsonproperty, "value");
|
BeanUtils.copyProperties(atomProperty, jsonProperty, "value");
|
||||||
|
jsonProperty.getAnnotations().addAll(atomProperty.getAnnotations());
|
||||||
|
|
||||||
if (atomproperty.getValue().isComplex()) {
|
if (atomProperty.getValue().isComplex()) {
|
||||||
final ComplexValueImpl complex = new ComplexValueImpl();
|
final ComplexValueImpl complex = new ComplexValueImpl();
|
||||||
jsonproperty.setValue(complex);
|
jsonProperty.setValue(complex);
|
||||||
|
|
||||||
for (Property field : atomproperty.getValue().asComplex().get()) {
|
for (Property field : atomProperty.getValue().asComplex().get()) {
|
||||||
complex.get().add(toJSONProperty((AtomPropertyImpl) field));
|
complex.get().add(toJSONProperty((AtomPropertyImpl) field));
|
||||||
}
|
}
|
||||||
} else if (atomproperty.getValue().isCollection()) {
|
} else if (atomProperty.getValue().isCollection()) {
|
||||||
final CollectionValueImpl collection = new CollectionValueImpl();
|
final CollectionValueImpl collection = new CollectionValueImpl();
|
||||||
jsonproperty.setValue(collection);
|
jsonProperty.setValue(collection);
|
||||||
|
|
||||||
for (Value element : atomproperty.getValue().asCollection().get()) {
|
for (Value element : atomProperty.getValue().asCollection().get()) {
|
||||||
if (element.isComplex()) {
|
if (element.isComplex()) {
|
||||||
final ComplexValueImpl complex = new ComplexValueImpl();
|
final ComplexValueImpl complex = new ComplexValueImpl();
|
||||||
collection.get().add(complex);
|
collection.get().add(complex);
|
||||||
|
@ -284,15 +289,16 @@ public class DataBinder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
jsonproperty.setValue(atomproperty.getValue());
|
jsonProperty.setValue(atomProperty.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonproperty;
|
return jsonProperty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AtomPropertyImpl toAtomProperty(final JSONPropertyImpl jsonProperty, final String entryType) {
|
public AtomPropertyImpl toAtomProperty(final JSONPropertyImpl jsonProperty, final String entryType) {
|
||||||
final AtomPropertyImpl atomproperty = new AtomPropertyImpl();
|
final AtomPropertyImpl atomProperty = new AtomPropertyImpl();
|
||||||
atomproperty.setName(jsonProperty.getName());
|
atomProperty.setName(jsonProperty.getName());
|
||||||
|
atomProperty.getAnnotations().addAll(jsonProperty.getAnnotations());
|
||||||
|
|
||||||
final EntityType entityType = entryType == null
|
final EntityType entityType = entryType == null
|
||||||
? null
|
? null
|
||||||
|
@ -304,21 +310,21 @@ public class DataBinder {
|
||||||
|| jsonProperty.getName() == null
|
|| jsonProperty.getName() == null
|
||||||
|| !jsonProperty.getType().startsWith(EdmPrimitiveType.EDM_NAMESPACE))) {
|
|| !jsonProperty.getType().startsWith(EdmPrimitiveType.EDM_NAMESPACE))) {
|
||||||
|
|
||||||
atomproperty.setType(jsonProperty.getType());
|
atomProperty.setType(jsonProperty.getType());
|
||||||
} else if (entityType != null) {
|
} else if (entityType != null) {
|
||||||
atomproperty.setType(entityType.getProperty(jsonProperty.getName()).getType());
|
atomProperty.setType(entityType.getProperty(jsonProperty.getName()).getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonProperty.getValue().isComplex()) {
|
if (jsonProperty.getValue().isComplex()) {
|
||||||
final ComplexValueImpl complex = new ComplexValueImpl();
|
final ComplexValueImpl complex = new ComplexValueImpl();
|
||||||
atomproperty.setValue(complex);
|
atomProperty.setValue(complex);
|
||||||
|
|
||||||
for (Property field : jsonProperty.getValue().asComplex().get()) {
|
for (Property field : jsonProperty.getValue().asComplex().get()) {
|
||||||
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomproperty.getType()));
|
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomProperty.getType()));
|
||||||
}
|
}
|
||||||
} else if (jsonProperty.getValue().isCollection()) {
|
} else if (jsonProperty.getValue().isCollection()) {
|
||||||
final CollectionValueImpl collection = new CollectionValueImpl();
|
final CollectionValueImpl collection = new CollectionValueImpl();
|
||||||
atomproperty.setValue(collection);
|
atomProperty.setValue(collection);
|
||||||
|
|
||||||
for (Value element : jsonProperty.getValue().asCollection().get()) {
|
for (Value element : jsonProperty.getValue().asCollection().get()) {
|
||||||
if (element instanceof ComplexValueImpl) {
|
if (element instanceof ComplexValueImpl) {
|
||||||
|
@ -326,16 +332,16 @@ public class DataBinder {
|
||||||
collection.get().add(complex);
|
collection.get().add(complex);
|
||||||
|
|
||||||
for (Property field : element.asComplex().get()) {
|
for (Property field : element.asComplex().get()) {
|
||||||
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomproperty.getType()));
|
complex.get().add(toAtomProperty((JSONPropertyImpl) field, atomProperty.getType()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
collection.get().add(element);
|
collection.get().add(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
atomproperty.setValue(jsonProperty.getValue());
|
atomProperty.setValue(jsonProperty.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return atomproperty;
|
return atomProperty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.commons.vfs2.FileSelectInfo;
|
||||||
import org.apache.commons.vfs2.FileSelector;
|
import org.apache.commons.vfs2.FileSelector;
|
||||||
import org.apache.commons.vfs2.FileSystemException;
|
import org.apache.commons.vfs2.FileSystemException;
|
||||||
import org.apache.commons.vfs2.FileSystemManager;
|
import org.apache.commons.vfs2.FileSystemManager;
|
||||||
|
import org.apache.commons.vfs2.FileType;
|
||||||
import org.apache.commons.vfs2.VFS;
|
import org.apache.commons.vfs2.VFS;
|
||||||
import org.apache.olingo.commons.api.data.ResWrap;
|
import org.apache.olingo.commons.api.data.ResWrap;
|
||||||
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
|
||||||
|
@ -72,6 +73,18 @@ public class FSManager {
|
||||||
private FSManager(final ODataServiceVersion version) throws Exception {
|
private FSManager(final ODataServiceVersion version) throws Exception {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
fsManager = VFS.getManager();
|
fsManager = VFS.getManager();
|
||||||
|
|
||||||
|
final FileObject basePath = fsManager.resolveFile(RES_PREFIX + File.separatorChar + version.name());
|
||||||
|
final String absoluteBaseFolder = basePath.getURL().getPath();
|
||||||
|
|
||||||
|
for (FileObject fo : find(basePath, null)) {
|
||||||
|
if (fo.getType() == FileType.FILE
|
||||||
|
&& !fo.getName().getBaseName().contains("Metadata")
|
||||||
|
&& !fo.getName().getBaseName().contains("metadata")) {
|
||||||
|
final String path = fo.getURL().getPath().replace(absoluteBaseFolder, "//" + version.name());
|
||||||
|
putInMemory(fo.getContent().getInputStream(), path);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAbsolutePath(final String relativePath, final Accept accept) {
|
public String getAbsolutePath(final String relativePath, final Accept accept) {
|
||||||
|
@ -79,7 +92,7 @@ public class FSManager {
|
||||||
+ (accept == null ? "" : accept.getExtension());
|
+ (accept == null ? "" : accept.getExtension());
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileObject putInMemory(final InputStream is, final String path) throws IOException {
|
public final FileObject putInMemory(final InputStream is, final String path) throws IOException {
|
||||||
LOG.info("Write in memory {}", path);
|
LOG.info("Write in memory {}", path);
|
||||||
final FileObject memObject = fsManager.resolveFile(MEM_PREFIX + path);
|
final FileObject memObject = fsManager.resolveFile(MEM_PREFIX + path);
|
||||||
|
|
||||||
|
@ -126,29 +139,27 @@ public class FSManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputStream readFile(final String relativePath) {
|
public InputStream readRes(final String relativePath, final Accept accept) {
|
||||||
return readFile(relativePath, null);
|
return readFile(relativePath, accept, RES_PREFIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputStream readFile(final String relativePath, final Accept accept) {
|
public InputStream readFile(final String relativePath, final Accept accept) {
|
||||||
|
return readFile(relativePath, accept, MEM_PREFIX);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InputStream readFile(final String relativePath) {
|
||||||
|
return readFile(relativePath, null, MEM_PREFIX);
|
||||||
|
}
|
||||||
|
|
||||||
|
private InputStream readFile(final String relativePath, final Accept accept, final String fs) {
|
||||||
final String path = getAbsolutePath(relativePath, accept);
|
final String path = getAbsolutePath(relativePath, accept);
|
||||||
LOG.info("Read {}", path);
|
LOG.info("Read {}{}", fs, path);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
FileObject fileObject = fsManager.resolveFile(MEM_PREFIX + path);
|
final FileObject fileObject = fsManager.resolveFile(fs + path);
|
||||||
|
|
||||||
if (!fileObject.exists()) {
|
if (!fileObject.exists()) {
|
||||||
LOG.warn("In-memory path '{}' not found", path);
|
LOG.warn("In-memory path '{}' not found", path);
|
||||||
|
|
||||||
try {
|
|
||||||
fileObject = fsManager.resolveFile(RES_PREFIX + path);
|
|
||||||
fileObject = putInMemory(fileObject.getContent().getInputStream(), path);
|
|
||||||
} catch (FileSystemException fse) {
|
|
||||||
LOG.warn("Resource path '{}' not found", path, fse);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fileObject.exists()) {
|
|
||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,13 +187,34 @@ public class FSManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileObject resolve(final String path) throws FileSystemException {
|
public void deleteEntity(final String relativePath) {
|
||||||
FileObject res = fsManager.resolveFile(MEM_PREFIX + path);
|
final String path = getAbsolutePath(relativePath, null);
|
||||||
|
LOG.info("Delete {}", path);
|
||||||
|
|
||||||
if (!res.exists()) {
|
try {
|
||||||
res = fsManager.resolveFile(RES_PREFIX + path);
|
final FileObject fileObject = fsManager.resolveFile(MEM_PREFIX + path);
|
||||||
|
|
||||||
|
if (fileObject.exists()) {
|
||||||
|
fileObject.delete(new FileSelector() {
|
||||||
|
@Override
|
||||||
|
public boolean includeFile(final FileSelectInfo fileInfo) throws Exception {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean traverseDescendents(final FileSelectInfo fileInfo) throws Exception {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (IOException ignore) {
|
||||||
|
// ignore exception
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FileObject resolve(final String path) throws FileSystemException {
|
||||||
|
final FileObject res = fsManager.resolveFile(MEM_PREFIX + path);
|
||||||
|
|
||||||
if (!res.exists()) {
|
if (!res.exists()) {
|
||||||
throw new FileSystemException("Unresolved path " + path);
|
throw new FileSystemException("Unresolved path " + path);
|
||||||
}
|
}
|
||||||
|
@ -190,11 +222,11 @@ public class FSManager {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileObject[] findByExtension(final FileObject fo, final String ext) throws FileSystemException {
|
public final FileObject[] find(final FileObject fo, final String ext) throws FileSystemException {
|
||||||
return fo.findFiles(new FileSelector() {
|
return fo.findFiles(new FileSelector() {
|
||||||
@Override
|
@Override
|
||||||
public boolean includeFile(final FileSelectInfo fileInfo) throws Exception {
|
public boolean includeFile(final FileSelectInfo fileInfo) throws Exception {
|
||||||
return fileInfo.getFile().getName().getExtension().equals(ext);
|
return ext == null ? true : fileInfo.getFile().getName().getExtension().equals(ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -598,7 +598,7 @@ public class XMLUtilities extends AbstractUtilities {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final FileObject skipToken = fsManager.resolve(skipTokenDirPath);
|
final FileObject skipToken = fsManager.resolve(skipTokenDirPath);
|
||||||
final FileObject[] files = fsManager.findByExtension(skipToken, Accept.XML.getExtension().substring(1));
|
final FileObject[] files = fsManager.find(skipToken, Accept.XML.getExtension().substring(1));
|
||||||
|
|
||||||
for (FileObject file : files) {
|
for (FileObject file : files) {
|
||||||
count += countFeedElements(fsManager.readFile(
|
count += countFeedElements(fsManager.readFile(
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"@odata.context": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts/$entity",
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.Account",
|
||||||
|
"@odata.id": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)",
|
||||||
|
"@odata.editLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)",
|
||||||
|
"AccountID": 102,
|
||||||
|
"Country": "US",
|
||||||
|
"AccountInfo": {
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.AccountInfo",
|
||||||
|
"FirstName": "Alex",
|
||||||
|
"LastName": "Green",
|
||||||
|
"MiddleName": "Hood"
|
||||||
|
},
|
||||||
|
"MyGiftCard@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyGiftCard/$ref",
|
||||||
|
"MyGiftCard@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyGiftCard",
|
||||||
|
"MyPaymentInstruments@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments/$ref",
|
||||||
|
"MyPaymentInstruments@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments",
|
||||||
|
"ActiveSubscriptions@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/ActiveSubscriptions/$ref",
|
||||||
|
"ActiveSubscriptions@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/ActiveSubscriptions",
|
||||||
|
"AvailableSubscriptionTemplatess@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/AvailableSubscriptionTemplatess/$ref",
|
||||||
|
"AvailableSubscriptionTemplatess@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/AvailableSubscriptionTemplatess",
|
||||||
|
"#Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI": {
|
||||||
|
"title": "Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI",
|
||||||
|
"target": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI"
|
||||||
|
},
|
||||||
|
"#Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI": {
|
||||||
|
"title": "Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI",
|
||||||
|
"target": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI"
|
||||||
|
},
|
||||||
|
"#Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo": {
|
||||||
|
"title": "Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo",
|
||||||
|
"target": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<entry xml:base="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts/$entity">
|
||||||
|
<id>http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)</id>
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.Account" scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
|
||||||
|
<link rel="edit" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/MyGiftCard" type="application/atom+xml;type=entry" title="MyGiftCard" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyGiftCard"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/MyPaymentInstruments" type="application/atom+xml;type=feed" title="MyPaymentInstruments" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/ActiveSubscriptions" type="application/atom+xml;type=feed" title="ActiveSubscriptions" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/ActiveSubscriptions"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/AvailableSubscriptionTemplatess" type="application/atom+xml;type=feed" title="AvailableSubscriptionTemplatess" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/AvailableSubscriptionTemplatess"/>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:45:00Z</updated>
|
||||||
|
<author>
|
||||||
|
<name/>
|
||||||
|
</author>
|
||||||
|
<m:action metadata="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI"
|
||||||
|
title="Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI"
|
||||||
|
target="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/Microsoft.Test.OData.Services.ODataWCFService.RefreshDefaultPI"/>
|
||||||
|
<m:action metadata="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI"
|
||||||
|
title="Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI"
|
||||||
|
target="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/Microsoft.Test.OData.Services.ODataWCFService.GetDefaultPI"/>
|
||||||
|
<m:action metadata="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo"
|
||||||
|
title="Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo"
|
||||||
|
target="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/Microsoft.Test.OData.Services.ODataWCFService.GetAccountInfo"/>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:AccountID m:type="Int32">102</d:AccountID>
|
||||||
|
<d:Country>US</d:Country>
|
||||||
|
<d:AccountInfo m:type="#Microsoft.Test.OData.Services.ODataWCFService.AccountInfo">
|
||||||
|
<d:FirstName>Alex</d:FirstName>
|
||||||
|
<d:LastName>Green</d:LastName>
|
||||||
|
<d:MiddleName>Hood</d:MiddleName>
|
||||||
|
</d:AccountInfo>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"@odata.context": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyGiftCard/$entity",
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.GiftCard",
|
||||||
|
"@odata.id": "Accounts(102)/MyGiftCard",
|
||||||
|
"@odata.editLink": "Accounts(102)/MyGiftCard",
|
||||||
|
"GiftCardID": 301,
|
||||||
|
"GiftCardNO": "AAA123A",
|
||||||
|
"Amount": 19.9,
|
||||||
|
"ExperationDate@odata.type": "#DateTimeOffset",
|
||||||
|
"ExperationDate": "2013-12-30T00:00:00Z",
|
||||||
|
"#Microsoft.Test.OData.Services.ODataWCFService.GetActualAmount": {
|
||||||
|
"title": "Microsoft.Test.OData.Services.ODataWCFService.GetActualAmount",
|
||||||
|
"target": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyGiftCard/Microsoft.Test.OData.Services.ODataWCFService.GetActualAmount"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<entry xml:base="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyGiftCard/$entity">
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.GiftCard" scheme="http://docs.oasis-open.org/odata/ns/scheme" />
|
||||||
|
<id />
|
||||||
|
<title />
|
||||||
|
<updated>2014-04-23T13:48:48Z</updated>
|
||||||
|
<author>
|
||||||
|
<name />
|
||||||
|
</author>
|
||||||
|
<m:action metadata="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Microsoft.Test.OData.Services.ODataWCFService.GetActualAmount"
|
||||||
|
title="Microsoft.Test.OData.Services.ODataWCFService.GetActualAmount"
|
||||||
|
target="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyGiftCard/Microsoft.Test.OData.Services.ODataWCFService.GetActualAmount"/>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:GiftCardID m:type="Int32">301</d:GiftCardID>
|
||||||
|
<d:GiftCardNO>AAA123A</d:GiftCardNO>
|
||||||
|
<d:Amount m:type="Double">19.9</d:Amount>
|
||||||
|
<d:ExperationDate m:type="DateTimeOffset">2013-12-30T00:00:00Z</d:ExperationDate>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"@odata.context": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyPaymentInstruments/$entity",
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument",
|
||||||
|
"@odata.id": "Accounts(102)/MyPaymentInstruments(102901)",
|
||||||
|
"@odata.editLink": "Accounts(102)/MyPaymentInstruments(102901)",
|
||||||
|
"PaymentInstrumentID": 102901,
|
||||||
|
"FriendlyName": "102 first PI",
|
||||||
|
"CreatedDate@odata.type": "#DateTimeOffset",
|
||||||
|
"CreatedDate": "2014-04-09T00:00:00Z",
|
||||||
|
"TheStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/TheStoredPI/$ref",
|
||||||
|
"TheStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/TheStoredPI",
|
||||||
|
"BillingStatements@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BillingStatements/$ref",
|
||||||
|
"BillingStatements@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BillingStatements",
|
||||||
|
"BackupStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BackupStoredPI/$ref",
|
||||||
|
"BackupStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BackupStoredPI"
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<entry xml:base="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyPaymentInstruments/$entity">
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument" scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/TheStoredPI" type="application/atom+xml;type=entry" title="TheStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/TheStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BillingStatements" type="application/atom+xml;type=feed" title="BillingStatements" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BillingStatements"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BackupStoredPI" type="application/atom+xml;type=entry" title="BackupStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BackupStoredPI"/>
|
||||||
|
<id/>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:47:37Z</updated>
|
||||||
|
<author>
|
||||||
|
<name/>
|
||||||
|
</author>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:PaymentInstrumentID m:type="Int32">102901</d:PaymentInstrumentID>
|
||||||
|
<d:FriendlyName>102 first PI</d:FriendlyName>
|
||||||
|
<d:CreatedDate m:type="DateTimeOffset">2014-04-09T00:00:00Z</d:CreatedDate>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"@odata.context": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyPaymentInstruments/$entity",
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument",
|
||||||
|
"@odata.id": "Accounts(102)/MyPaymentInstruments(102902)",
|
||||||
|
"@odata.editLink": "Accounts(102)/MyPaymentInstruments(102902)",
|
||||||
|
"PaymentInstrumentID": 102902,
|
||||||
|
"FriendlyName": "102 first PI",
|
||||||
|
"CreatedDate@odata.type": "#DateTimeOffset",
|
||||||
|
"CreatedDate": "2014-04-09T00:00:00Z",
|
||||||
|
"TheStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/TheStoredPI/$ref",
|
||||||
|
"TheStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/TheStoredPI",
|
||||||
|
"BillingStatements@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/BillingStatements/$ref",
|
||||||
|
"BillingStatements@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/BillingStatements",
|
||||||
|
"BackupStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/BackupStoredPI/$ref",
|
||||||
|
"BackupStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/BackupStoredPI"
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<entry xml:base="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyPaymentInstruments/$entity">
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument" scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/TheStoredPI" type="application/atom+xml;type=entry" title="TheStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/TheStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BillingStatements" type="application/atom+xml;type=feed" title="BillingStatements" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/BillingStatements"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BackupStoredPI" type="application/atom+xml;type=entry" title="BackupStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/BackupStoredPI"/>
|
||||||
|
<id/>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:47:37Z</updated>
|
||||||
|
<author>
|
||||||
|
<name/>
|
||||||
|
</author>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:PaymentInstrumentID m:type="Int32">102902</d:PaymentInstrumentID>
|
||||||
|
<d:FriendlyName>102 first PI</d:FriendlyName>
|
||||||
|
<d:CreatedDate m:type="DateTimeOffset">2014-04-09T00:00:00Z</d:CreatedDate>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
"@odata.context": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyPaymentInstruments",
|
||||||
|
"value": [{
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument",
|
||||||
|
"@odata.id": "Accounts(102)/MyPaymentInstruments(102901)",
|
||||||
|
"@odata.editLink": "Accounts(102)/MyPaymentInstruments(102901)",
|
||||||
|
"PaymentInstrumentID": 102901,
|
||||||
|
"FriendlyName": "102 first PI",
|
||||||
|
"CreatedDate@odata.type": "#DateTimeOffset",
|
||||||
|
"CreatedDate": "2014-04-09T00:00:00Z",
|
||||||
|
"TheStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/TheStoredPI/$ref",
|
||||||
|
"TheStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/TheStoredPI",
|
||||||
|
"BillingStatements@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BillingStatements/$ref",
|
||||||
|
"BillingStatements@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BillingStatements",
|
||||||
|
"BackupStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BackupStoredPI/$ref",
|
||||||
|
"BackupStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BackupStoredPI"
|
||||||
|
}, {
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI",
|
||||||
|
"@odata.id": "Accounts(102)/MyPaymentInstruments(102902)",
|
||||||
|
"@odata.editLink": "Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI",
|
||||||
|
"PaymentInstrumentID": 102902,
|
||||||
|
"FriendlyName": "102 frist credit PI",
|
||||||
|
"CreatedDate@odata.type": "#DateTimeOffset",
|
||||||
|
"CreatedDate": "2012-11-01T00:00:00Z",
|
||||||
|
"CardNumber": "6000000000000000",
|
||||||
|
"CVV": "234",
|
||||||
|
"HolderName": "Alex",
|
||||||
|
"Balance": 100.0,
|
||||||
|
"ExperationDate@odata.type": "#DateTimeOffset",
|
||||||
|
"ExperationDate": "2022-11-01T00:00:00Z",
|
||||||
|
"TheStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/TheStoredPI/$ref",
|
||||||
|
"TheStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/TheStoredPI",
|
||||||
|
"BillingStatements@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BillingStatements/$ref",
|
||||||
|
"BillingStatements@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BillingStatements",
|
||||||
|
"BackupStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BackupStoredPI/$ref",
|
||||||
|
"BackupStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BackupStoredPI",
|
||||||
|
"CreditRecords@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/CreditRecords/$ref",
|
||||||
|
"CreditRecords@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/CreditRecords"
|
||||||
|
}, {
|
||||||
|
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI",
|
||||||
|
"@odata.id": "Accounts(102)/MyPaymentInstruments(102903)",
|
||||||
|
"@odata.editLink": "Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI",
|
||||||
|
"PaymentInstrumentID": 102903,
|
||||||
|
"FriendlyName": "102 second credit PI",
|
||||||
|
"CreatedDate@odata.type": "#DateTimeOffset",
|
||||||
|
"CreatedDate": "2012-11-01T00:00:00Z",
|
||||||
|
"CardNumber": "8000000000000000",
|
||||||
|
"CVV": "012",
|
||||||
|
"HolderName": "James",
|
||||||
|
"Balance": 300.0,
|
||||||
|
"ExperationDate@odata.type": "#DateTimeOffset",
|
||||||
|
"ExperationDate": "2022-10-02T00:00:00Z",
|
||||||
|
"TheStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/TheStoredPI/$ref",
|
||||||
|
"TheStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/TheStoredPI",
|
||||||
|
"BillingStatements@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BillingStatements/$ref",
|
||||||
|
"BillingStatements@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BillingStatements",
|
||||||
|
"BackupStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BackupStoredPI/$ref",
|
||||||
|
"BackupStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BackupStoredPI",
|
||||||
|
"CreditRecords@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/CreditRecords/$ref",
|
||||||
|
"CreditRecords@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/CreditRecords"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<feed xml:base="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(102)/MyPaymentInstruments">
|
||||||
|
<id>http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/MyPaymentInstruments</id>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:45:33Z</updated>
|
||||||
|
<entry>
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument" scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/TheStoredPI" type="application/atom+xml;type=entry" title="TheStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/TheStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BillingStatements" type="application/atom+xml;type=feed" title="BillingStatements" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BillingStatements"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BackupStoredPI" type="application/atom+xml;type=entry" title="BackupStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102901)/BackupStoredPI"/>
|
||||||
|
<id/>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:45:33Z</updated>
|
||||||
|
<author>
|
||||||
|
<name/>
|
||||||
|
</author>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:PaymentInstrumentID m:type="Int32">102901</d:PaymentInstrumentID>
|
||||||
|
<d:FriendlyName>102 first PI</d:FriendlyName>
|
||||||
|
<d:CreatedDate m:type="DateTimeOffset">2014-04-09T00:00:00Z</d:CreatedDate>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI" scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/TheStoredPI" type="application/atom+xml;type=entry" title="TheStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/TheStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BillingStatements" type="application/atom+xml;type=feed" title="BillingStatements" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BillingStatements"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BackupStoredPI" type="application/atom+xml;type=entry" title="BackupStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BackupStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/CreditRecords" type="application/atom+xml;type=feed" title="CreditRecords" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102902)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/CreditRecords"/>
|
||||||
|
<id/>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:45:33Z</updated>
|
||||||
|
<author>
|
||||||
|
<name/>
|
||||||
|
</author>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:PaymentInstrumentID m:type="Int32">102902</d:PaymentInstrumentID>
|
||||||
|
<d:FriendlyName>102 frist credit PI</d:FriendlyName>
|
||||||
|
<d:CreatedDate m:type="DateTimeOffset">2012-11-01T00:00:00Z</d:CreatedDate>
|
||||||
|
<d:CardNumber>6000000000000000</d:CardNumber>
|
||||||
|
<d:CVV>234</d:CVV>
|
||||||
|
<d:HolderName>Alex</d:HolderName>
|
||||||
|
<d:Balance m:type="Double">100</d:Balance>
|
||||||
|
<d:ExperationDate m:type="DateTimeOffset">2022-11-01T00:00:00Z</d:ExperationDate>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<category term="#Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI" scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/TheStoredPI" type="application/atom+xml;type=entry" title="TheStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/TheStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BillingStatements" type="application/atom+xml;type=feed" title="BillingStatements" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BillingStatements"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/BackupStoredPI" type="application/atom+xml;type=entry" title="BackupStoredPI" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/BackupStoredPI"/>
|
||||||
|
<link rel="http://docs.oasis-open.org/odata/ns/related/CreditRecords" type="application/atom+xml;type=feed" title="CreditRecords" href="http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(102)/MyPaymentInstruments(102903)/Microsoft.Test.OData.Services.ODataWCFService.CreditCardPI/CreditRecords"/>
|
||||||
|
<id/>
|
||||||
|
<title/>
|
||||||
|
<updated>2014-04-14T12:45:33Z</updated>
|
||||||
|
<author>
|
||||||
|
<name/>
|
||||||
|
</author>
|
||||||
|
<content type="application/xml">
|
||||||
|
<m:properties>
|
||||||
|
<d:PaymentInstrumentID m:type="Int32">102903</d:PaymentInstrumentID>
|
||||||
|
<d:FriendlyName>102 second credit PI</d:FriendlyName>
|
||||||
|
<d:CreatedDate m:type="DateTimeOffset">2012-11-01T00:00:00Z</d:CreatedDate>
|
||||||
|
<d:CardNumber>8000000000000000</d:CardNumber>
|
||||||
|
<d:CVV>012</d:CVV>
|
||||||
|
<d:HolderName>James</d:HolderName>
|
||||||
|
<d:Balance m:type="Double">300</d:Balance>
|
||||||
|
<d:ExperationDate m:type="DateTimeOffset">2022-10-02T00:00:00Z</d:ExperationDate>
|
||||||
|
</m:properties>
|
||||||
|
</content>
|
||||||
|
</entry>
|
||||||
|
</feed>
|
|
@ -6,6 +6,7 @@
|
||||||
"@Microsoft.Test.OData.Services.ODataWCFService.IsBoss": true,
|
"@Microsoft.Test.OData.Services.ODataWCFService.IsBoss": true,
|
||||||
"PersonID": 2,
|
"PersonID": 2,
|
||||||
"FirstName": "Jill",
|
"FirstName": "Jill",
|
||||||
|
"LastName@Microsoft.Test.OData.Services.ODataWCFService.IsBoss": false,
|
||||||
"LastName": "Jones",
|
"LastName": "Jones",
|
||||||
"MiddleName": null,
|
"MiddleName": null,
|
||||||
"HomeAddress": null,
|
"HomeAddress": null,
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
"TimeBetweenLastTwoOrders": "PT0.0000002S",
|
"TimeBetweenLastTwoOrders": "PT0.0000002S",
|
||||||
"Parent@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent/$ref",
|
"Parent@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent/$ref",
|
||||||
"Parent@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent",
|
"Parent@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent",
|
||||||
|
"Orders@Microsoft.Test.OData.Services.ODataWCFService.IsBoss": false,
|
||||||
"Orders@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders/$ref",
|
"Orders@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders/$ref",
|
||||||
"Orders@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders",
|
"Orders@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders",
|
||||||
"Company@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company/$ref",
|
"Company@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company/$ref",
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
<link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Parent" title="Parent" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent/$ref" type="application/xml"/>
|
<link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Parent" title="Parent" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent/$ref" type="application/xml"/>
|
||||||
<link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Orders" title="Orders" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders/$ref" type="application/xml"/>
|
<link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Orders" title="Orders" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders/$ref" type="application/xml"/>
|
||||||
<link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Company" title="Company" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company/$ref" type="application/xml"/>
|
<link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Company" title="Company" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company/$ref" type="application/xml"/>
|
||||||
<link rel="http://docs.oasis-open.org/odata/ns/related/Parent" title="Parent" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent" type="application/atom+xml;type=entry"/>
|
<link rel="http://docs.oasis-open.org/odata/ns/related/Parent" title="Parent" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Parent" type="application/atom+xml;type=entry">
|
||||||
|
<m:annotation term="Microsoft.Test.OData.Services.ODataWCFService.IsBoss" m:type="Boolean">false</m:annotation>
|
||||||
|
</link>
|
||||||
<link rel="http://docs.oasis-open.org/odata/ns/related/Orders" title="Orders" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders" type="application/atom+xml;type=entry"/>
|
<link rel="http://docs.oasis-open.org/odata/ns/related/Orders" title="Orders" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Orders" type="application/atom+xml;type=entry"/>
|
||||||
<link rel="http://docs.oasis-open.org/odata/ns/related/Company" title="Company" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company" type="application/atom+xml;type=entry"/>
|
<link rel="http://docs.oasis-open.org/odata/ns/related/Company" title="Company" href="http://localhost:9080/stub/StaticService/V40/Static.svc/Boss/Microsoft.Test.OData.Services.ODataWCFService.Customer/Company" type="application/atom+xml;type=entry"/>
|
||||||
<content type="application/xml">
|
<content type="application/xml">
|
||||||
|
@ -33,6 +35,7 @@
|
||||||
<d:PersonID m:type="Int32">2</d:PersonID>
|
<d:PersonID m:type="Int32">2</d:PersonID>
|
||||||
<d:FirstName>Jill</d:FirstName>
|
<d:FirstName>Jill</d:FirstName>
|
||||||
<d:LastName>Jones</d:LastName>
|
<d:LastName>Jones</d:LastName>
|
||||||
|
<m:annotation term="Microsoft.Test.OData.Services.ODataWCFService.IsBoss" target="LastName" m:type="Boolean">false</m:annotation>
|
||||||
<d:MiddleName m:null="true"/>
|
<d:MiddleName m:null="true"/>
|
||||||
<d:HomeAddress m:null="true"/>
|
<d:HomeAddress m:null="true"/>
|
||||||
<d:Home m:type="GeographyPoint">
|
<d:Home m:type="GeographyPoint">
|
||||||
|
|
|
@ -41,6 +41,10 @@
|
||||||
<Property Name="Int" Type="Edm.Int32" Nullable="false"/>
|
<Property Name="Int" Type="Edm.Int32" Nullable="false"/>
|
||||||
<Property Name="Long" Type="Edm.Int64" Nullable="false"/>
|
<Property Name="Long" Type="Edm.Int64" Nullable="false"/>
|
||||||
</ComplexType>
|
</ComplexType>
|
||||||
|
<ComplexType Name="AccountInfo" OpenType="true">
|
||||||
|
<Property Name="FirstName" Type="Edm.String" Nullable="false"/>
|
||||||
|
<Property Name="LastName" Type="Edm.String" Nullable="false"/>
|
||||||
|
</ComplexType>
|
||||||
<EntityType Name="Row" OpenType="true">
|
<EntityType Name="Row" OpenType="true">
|
||||||
<Key>
|
<Key>
|
||||||
<PropertyRef Name="Id"/>
|
<PropertyRef Name="Id"/>
|
||||||
|
|
|
@ -63,8 +63,6 @@ public abstract class AbstractTestITCase {
|
||||||
|
|
||||||
protected static String testLargeModelServiceRootURL;
|
protected static String testLargeModelServiceRootURL;
|
||||||
|
|
||||||
protected static String testAuthServiceRootURL;
|
|
||||||
|
|
||||||
protected final EntityContext entityContext = EntityContainerFactory.getContext().entityContext();
|
protected final EntityContext entityContext = EntityContainerFactory.getContext().entityContext();
|
||||||
|
|
||||||
protected static EntityContainerFactory<EdmEnabledODataClient> containerFactory;
|
protected static EntityContainerFactory<EdmEnabledODataClient> containerFactory;
|
||||||
|
@ -79,7 +77,6 @@ public abstract class AbstractTestITCase {
|
||||||
testActionOverloadingServiceRootURL = "http://localhost:9080/stub/StaticService/V30/ActionOverloading.svc";
|
testActionOverloadingServiceRootURL = "http://localhost:9080/stub/StaticService/V30/ActionOverloading.svc";
|
||||||
testOpenTypeServiceRootURL = "http://localhost:9080/stub/StaticService/V30/OpenType.svc";
|
testOpenTypeServiceRootURL = "http://localhost:9080/stub/StaticService/V30/OpenType.svc";
|
||||||
testLargeModelServiceRootURL = "http://localhost:9080/stub/StaticService/V30/Static.svc/large";
|
testLargeModelServiceRootURL = "http://localhost:9080/stub/StaticService/V30/Static.svc/large";
|
||||||
testAuthServiceRootURL = "http://localhost:9080/stub/DefaultService.svc";
|
|
||||||
|
|
||||||
containerFactory = EntityContainerFactory.getV3(testStaticServiceRootURL);
|
containerFactory = EntityContainerFactory.getV3(testStaticServiceRootURL);
|
||||||
containerFactory.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
|
containerFactory.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.fit.proxy.v3;
|
package org.apache.olingo.fit.proxy.v4;
|
||||||
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
|
@ -24,25 +24,27 @@ import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
|
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
|
||||||
|
import org.apache.olingo.commons.api.format.ContentType;
|
||||||
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
||||||
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
|
import static org.apache.olingo.fit.proxy.v4.AbstractTestITCase.containerFactory;
|
||||||
DefaultContainer;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;
|
||||||
|
|
||||||
public class AuthEntityRetrieveTestITCase extends EntityRetrieveTestITCase {
|
public class AuthEntityCreateTestITCase extends EntityCreateTestITCase {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setupContaner() {
|
public static void setupContaner() {
|
||||||
containerFactory = EntityContainerFactory.getV3(testAuthServiceRootURL);
|
containerFactory = EntityContainerFactory.getV4(testAuthServiceRootURL);
|
||||||
|
containerFactory.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
|
||||||
containerFactory.getClient().getConfiguration().
|
containerFactory.getClient().getConfiguration().
|
||||||
setHttpClientFactory(new BasicAuthHttpClientFactory("odatajclient", "odatajclient"));
|
setHttpClientFactory(new BasicAuthHttpClientFactory("odatajclient", "odatajclient"));
|
||||||
container = containerFactory.getEntityContainer(DefaultContainer.class);
|
container = containerFactory.getEntityContainer(InMemoryEntities.class);
|
||||||
assertNotNull(container);
|
assertNotNull(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void disableBasicAuth() {
|
public static void disableBasicAuth() {
|
||||||
containerFactory = EntityContainerFactory.getV3(testStaticServiceRootURL);
|
containerFactory = EntityContainerFactory.getV4(testStaticServiceRootURL);
|
||||||
container = containerFactory.getEntityContainer(DefaultContainer.class);
|
container = containerFactory.getEntityContainer(InMemoryEntities.class);
|
||||||
assertNotNull(container);
|
assertNotNull(container);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.fit.proxy.v4;
|
package org.apache.olingo.fit.proxy.v4;
|
||||||
|
|
||||||
import static org.apache.olingo.fit.proxy.v4.AbstractTestITCase.testKeyAsSegmentServiceRootURL;
|
|
||||||
|
|
||||||
import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
|
import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
|
||||||
|
|
||||||
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
|
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
|
||||||
|
@ -32,7 +30,7 @@ public class AuthEntityRetrieveTestITCase extends EntityRetrieveTestITCase {
|
||||||
@Override
|
@Override
|
||||||
protected InMemoryEntities getContainer() {
|
protected InMemoryEntities getContainer() {
|
||||||
final EntityContainerFactory<EdmEnabledODataClient> ecf =
|
final EntityContainerFactory<EdmEnabledODataClient> ecf =
|
||||||
EntityContainerFactory.getV4(testKeyAsSegmentServiceRootURL);
|
EntityContainerFactory.getV4(testAuthServiceRootURL);
|
||||||
ecf.getClient().getConfiguration().setKeyAsSegment(true);
|
ecf.getClient().getConfiguration().setKeyAsSegment(true);
|
||||||
ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
|
ecf.getClient().getConfiguration().setDefaultBatchAcceptFormat(ContentType.APPLICATION_OCTET_STREAM);
|
||||||
ecf.getClient().getConfiguration().
|
ecf.getClient().getConfiguration().
|
||||||
|
|
|
@ -29,6 +29,8 @@ import java.util.Calendar;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
import org.apache.commons.lang3.RandomUtils;
|
import org.apache.commons.lang3.RandomUtils;
|
||||||
|
import static org.apache.olingo.fit.proxy.v4.AbstractTestITCase.container;
|
||||||
|
|
||||||
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.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.Address;
|
||||||
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.Color;
|
||||||
|
@ -71,7 +73,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
date.clear();
|
date.clear();
|
||||||
date.set(2011, 3, 4, 9, 0, 0);
|
date.set(2011, 3, 4, 9, 0, 0);
|
||||||
employee.setDateHired(date);
|
employee.setDateHired(date);
|
||||||
Address homeAddress = employee.factory().newHomeAddress();
|
final Address homeAddress = employee.factory().newHomeAddress();
|
||||||
homeAddress.setCity("Pescara");
|
homeAddress.setCity("Pescara");
|
||||||
homeAddress.setPostalCode("65100");
|
homeAddress.setPostalCode("65100");
|
||||||
homeAddress.setStreet("viale Gabriele D'Annunzio 256");
|
homeAddress.setStreet("viale Gabriele D'Annunzio 256");
|
||||||
|
@ -94,7 +96,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
container.getPeople().delete(actual.getPersonID());
|
container.getPeople().delete(actual.getPersonID());
|
||||||
container.flush();
|
container.flush();
|
||||||
|
|
||||||
actual = container.getPeople().get(id, Employee.class);;
|
actual = container.getPeople().get(id, Employee.class);
|
||||||
assertNull(actual);
|
assertNull(actual);
|
||||||
|
|
||||||
entityContext.detachAll();
|
entityContext.detachAll();
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.olingo.commons.api.format.ContentType;
|
||||||
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
import org.apache.olingo.ext.proxy.EntityContainerFactory;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.DefaultContainer;
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.DefaultContainer;
|
||||||
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.AccountInfo;
|
||||||
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Color;
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Color;
|
||||||
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.ContactDetails;
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.ContactDetails;
|
||||||
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row;
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row;
|
||||||
|
@ -115,6 +116,12 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
|
||||||
rowIndex.addAdditionalProperty("aContact", contact);
|
rowIndex.addAdditionalProperty("aContact", contact);
|
||||||
rowIndex.addAdditionalProperty("aColor", Color.Green);
|
rowIndex.addAdditionalProperty("aColor", Color.Green);
|
||||||
|
|
||||||
|
final AccountInfo ai = otcontainer.complexFactory().newAccountInfo();
|
||||||
|
ai.setFirstName("Fabio");
|
||||||
|
ai.setLastName("Martelli");
|
||||||
|
ai.addAdditionalProperty("email", "fabio.martelli@tirasa.net");
|
||||||
|
rowIndex.addAdditionalProperty("info", ai);
|
||||||
|
|
||||||
otcontainer.flush();
|
otcontainer.flush();
|
||||||
|
|
||||||
rowIndex = otcontainer.getRowIndex().get(id);
|
rowIndex = otcontainer.getRowIndex().get(id);
|
||||||
|
@ -127,6 +134,10 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
|
||||||
assertEquals(ContactDetails.class, rowIndex.getAdditionalProperty("aContact").getClass().getInterfaces()[0]);
|
assertEquals(ContactDetails.class, rowIndex.getAdditionalProperty("aContact").getClass().getInterfaces()[0]);
|
||||||
assertEquals(Color.class, rowIndex.getAdditionalProperty("aColor").getClass());
|
assertEquals(Color.class, rowIndex.getAdditionalProperty("aColor").getClass());
|
||||||
assertEquals(Color.Green, rowIndex.getAdditionalProperty("aColor"));
|
assertEquals(Color.Green, rowIndex.getAdditionalProperty("aColor"));
|
||||||
|
assertEquals("Fabio", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).getFirstName());
|
||||||
|
assertEquals("Martelli", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).getLastName());
|
||||||
|
assertEquals("fabio.martelli@tirasa.net", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).
|
||||||
|
getAdditionalProperty("email"));
|
||||||
|
|
||||||
entityContext.detachAll();
|
entityContext.detachAll();
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,10 @@
|
||||||
package org.apache.olingo.fit.proxy.v4;
|
package org.apache.olingo.fit.proxy.v4;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyCategory;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyCategory;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.IsBoss;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.IsBoss;
|
||||||
|
@ -56,8 +57,21 @@ public class SingletonTestITCase extends AbstractTestITCase {
|
||||||
assertEquals(2, boss.getPersonID(), 0);
|
assertEquals(2, boss.getPersonID(), 0);
|
||||||
|
|
||||||
assertEquals(1, boss.getAnnotationTerms().size());
|
assertEquals(1, boss.getAnnotationTerms().size());
|
||||||
final Object isBoss = boss.getAnnotation(IsBoss.class);
|
Object isBoss = boss.getAnnotation(IsBoss.class);
|
||||||
assertTrue(isBoss instanceof Boolean);
|
assertTrue(isBoss instanceof Boolean);
|
||||||
assertTrue((Boolean) isBoss);
|
assertTrue((Boolean) isBoss);
|
||||||
|
|
||||||
|
Annotatable annotations = boss.annotations().getFirstNameAnnotations();
|
||||||
|
assertTrue(annotations.getAnnotationTerms().isEmpty());
|
||||||
|
|
||||||
|
annotations = boss.annotations().getLastNameAnnotations();
|
||||||
|
isBoss = annotations.getAnnotation(IsBoss.class);
|
||||||
|
assertTrue(isBoss instanceof Boolean);
|
||||||
|
assertFalse((Boolean) isBoss);
|
||||||
|
|
||||||
|
annotations = boss.annotations().getParentAnnotations();
|
||||||
|
isBoss = annotations.getAnnotation(IsBoss.class);
|
||||||
|
assertTrue(isBoss instanceof Boolean);
|
||||||
|
assertFalse((Boolean) isBoss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,12 +53,10 @@ import javax.xml.datatype.Duration;
|
||||||
public interface DefaultContainer extends Container {
|
public interface DefaultContainer extends Container {
|
||||||
|
|
||||||
Row getRow();
|
Row getRow();
|
||||||
|
|
||||||
RowIndex getRowIndex();
|
RowIndex getRowIndex();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Operations operations();
|
Operations operations();
|
||||||
|
|
||||||
public interface Operations {
|
public interface Operations {
|
||||||
|
@ -72,5 +70,9 @@ public interface DefaultContainer extends Container {
|
||||||
type = "Microsoft.Test.OData.Services.OpenTypesServiceV4.ContactDetails")
|
type = "Microsoft.Test.OData.Services.OpenTypesServiceV4.ContactDetails")
|
||||||
org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.ContactDetails newContactDetails();
|
org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.ContactDetails newContactDetails();
|
||||||
|
|
||||||
|
@Property(name = "AccountInfo",
|
||||||
|
type = "Microsoft.Test.OData.Services.OpenTypesServiceV4.AccountInfo")
|
||||||
|
org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.AccountInfo newAccountInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,6 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@EntitySet(name = "Row")
|
@EntitySet(name = "Row")
|
||||||
public interface Row
|
public interface Row
|
||||||
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row, UUID, org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowCollection> {
|
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row, UUID, org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowCollection> {
|
||||||
|
|
|
@ -43,7 +43,6 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@EntitySet(name = "RowIndex")
|
@EntitySet(name = "RowIndex")
|
||||||
public interface RowIndex
|
public interface RowIndex
|
||||||
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowIndex, Integer, org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowIndexCollection> {
|
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowIndex, Integer, org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.RowIndexCollection> {
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* 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.opentype.microsoft.test.odata.services.opentypesservicev4.types;
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.*;
|
||||||
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.*;
|
||||||
|
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.Geospatial;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.LineString;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.MultiLineString;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.MultiPoint;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.Point;
|
||||||
|
import org.apache.olingo.commons.api.edm.geo.Polygon;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
|
|
||||||
|
@Namespace("Microsoft.Test.OData.Services.OpenTypesServiceV4")
|
||||||
|
@ComplexType(name = "AccountInfo",
|
||||||
|
isOpenType = true,
|
||||||
|
isAbstract = false)
|
||||||
|
public interface AccountInfo
|
||||||
|
extends AbstractOpenType,Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
@Property(name = "FirstName",
|
||||||
|
type = "Edm.String",
|
||||||
|
nullable = false,
|
||||||
|
defaultValue = "",
|
||||||
|
maxLenght = Integer.MAX_VALUE,
|
||||||
|
fixedLenght = false,
|
||||||
|
precision = 0,
|
||||||
|
scale = 0,
|
||||||
|
unicode = true,
|
||||||
|
collation = "",
|
||||||
|
srid = "")
|
||||||
|
String getFirstName();
|
||||||
|
|
||||||
|
void setFirstName(String _firstName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Property(name = "LastName",
|
||||||
|
type = "Edm.String",
|
||||||
|
nullable = false,
|
||||||
|
defaultValue = "",
|
||||||
|
maxLenght = Integer.MAX_VALUE,
|
||||||
|
fixedLenght = false,
|
||||||
|
precision = 0,
|
||||||
|
scale = 0,
|
||||||
|
unicode = true,
|
||||||
|
collation = "",
|
||||||
|
srid = "")
|
||||||
|
String getLastName();
|
||||||
|
|
||||||
|
void setLastName(String _lastName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.*;
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.*;
|
||||||
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.*;
|
import org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.*;
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
byte[] getFirstContacted();
|
byte[] getFirstContacted();
|
||||||
|
|
||||||
void setFirstContacted(final byte[] _firstContacted);
|
void setFirstContacted(byte[] _firstContacted);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Calendar getLastContacted();
|
Calendar getLastContacted();
|
||||||
|
|
||||||
void setLastContacted(final Calendar _lastContacted);
|
void setLastContacted(Calendar _lastContacted);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Calendar getContacted();
|
Calendar getContacted();
|
||||||
|
|
||||||
void setContacted(final Calendar _contacted);
|
void setContacted(Calendar _contacted);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,7 +116,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
UUID getGUID();
|
UUID getGUID();
|
||||||
|
|
||||||
void setGUID(final UUID _gUID);
|
void setGUID(UUID _gUID);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Calendar getPreferedContactTime();
|
Calendar getPreferedContactTime();
|
||||||
|
|
||||||
void setPreferedContactTime(final Calendar _preferedContactTime);
|
void setPreferedContactTime(Calendar _preferedContactTime);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Short getByte();
|
Short getByte();
|
||||||
|
|
||||||
void setByte(final Short _byte);
|
void setByte(Short _byte);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +167,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Byte getSignedByte();
|
Byte getSignedByte();
|
||||||
|
|
||||||
void setSignedByte(final Byte _signedByte);
|
void setSignedByte(Byte _signedByte);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -183,7 +184,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Double getDouble();
|
Double getDouble();
|
||||||
|
|
||||||
void setDouble(final Double _double);
|
void setDouble(Double _double);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,7 +201,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Float getSingle();
|
Float getSingle();
|
||||||
|
|
||||||
void setSingle(final Float _single);
|
void setSingle(Float _single);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,7 +218,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Short getShort();
|
Short getShort();
|
||||||
|
|
||||||
void setShort(final Short _short);
|
void setShort(Short _short);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,7 +235,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Integer getInt();
|
Integer getInt();
|
||||||
|
|
||||||
void setInt(final Integer _int);
|
void setInt(Integer _int);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -251,7 +252,7 @@ public interface ContactDetails
|
||||||
srid = "")
|
srid = "")
|
||||||
Long getLong();
|
Long getLong();
|
||||||
|
|
||||||
void setLong(final Long _long);
|
void setLong(Long _long);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -59,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.OpenTypesServiceV4.Row")
|
baseType = "Microsoft.Test.OData.Services.OpenTypesServiceV4.Row")
|
||||||
public interface IndexedRow
|
public interface IndexedRow
|
||||||
extends org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row {
|
extends Annotatable,org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -83,7 +84,7 @@ public interface IndexedRow
|
||||||
fcKeepInContent = false)
|
fcKeepInContent = false)
|
||||||
UUID getId();
|
UUID getId();
|
||||||
|
|
||||||
void setId(final UUID _id);
|
void setId(UUID _id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ package org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.op
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
|
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractTerm;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
|
@ -44,4 +45,8 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
public interface IndexedRowCollection extends AbstractEntityCollection<IndexedRow> {
|
public interface IndexedRowCollection extends AbstractEntityCollection<IndexedRow> {
|
||||||
|
|
||||||
|
Object getAnnotation(Class<? extends AbstractTerm> term);
|
||||||
|
|
||||||
|
Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +59,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Row
|
public interface Row
|
||||||
extends AbstractOpenType {
|
extends Annotatable,AbstractOpenType {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -82,7 +83,7 @@ public interface Row
|
||||||
fcKeepInContent = false)
|
fcKeepInContent = false)
|
||||||
UUID getId();
|
UUID getId();
|
||||||
|
|
||||||
void setId(final UUID _id);
|
void setId(UUID _id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ package org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.op
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
|
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractTerm;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
|
@ -44,4 +45,8 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
public interface RowCollection extends AbstractEntityCollection<Row> {
|
public interface RowCollection extends AbstractEntityCollection<Row> {
|
||||||
|
|
||||||
|
Object getAnnotation(Class<? extends AbstractTerm> term);
|
||||||
|
|
||||||
|
Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +59,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface RowIndex
|
public interface RowIndex
|
||||||
extends AbstractOpenType {
|
extends Annotatable,AbstractOpenType {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -82,7 +83,7 @@ public interface RowIndex
|
||||||
fcKeepInContent = false)
|
fcKeepInContent = false)
|
||||||
Integer getId();
|
Integer getId();
|
||||||
|
|
||||||
void setId(final Integer _id);
|
void setId(Integer _id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,11 +91,11 @@ public interface RowIndex
|
||||||
type = "Microsoft.Test.OData.Services.OpenTypesServiceV4.Row",
|
type = "Microsoft.Test.OData.Services.OpenTypesServiceV4.Row",
|
||||||
targetSchema = "Microsoft.Test.OData.Services.OpenTypesServiceV4",
|
targetSchema = "Microsoft.Test.OData.Services.OpenTypesServiceV4",
|
||||||
targetContainer = "DefaultContainer",
|
targetContainer = "DefaultContainer",
|
||||||
targetEntitySet = "Row")
|
targetEntitySet = "Row",
|
||||||
|
containsTarget = false)
|
||||||
org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row getRows();
|
org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row getRows();
|
||||||
|
|
||||||
void setRows(final org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row _rows);
|
void setRows(org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.opentypesservicev4.types.Row _rows);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ package org.apache.olingo.fit.proxy.v4.opentype.microsoft.test.odata.services.op
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
|
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractTerm;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
|
@ -44,4 +45,8 @@ import java.util.Calendar;
|
||||||
import javax.xml.datatype.Duration;
|
import javax.xml.datatype.Duration;
|
||||||
|
|
||||||
public interface RowIndexCollection extends AbstractEntityCollection<RowIndex> {
|
public interface RowIndexCollection extends AbstractEntityCollection<RowIndex> {
|
||||||
|
|
||||||
|
Object getAnnotation(Class<? extends AbstractTerm> term);
|
||||||
|
|
||||||
|
Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Account
|
public interface Account
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -208,4 +210,39 @@ public interface Account
|
||||||
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountInfo newAccountInfo();
|
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountInfo newAccountInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "AccountID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getAccountIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Country",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCountryAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "AccountInfo",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.AccountInfo")
|
||||||
|
Annotatable getAccountInfoAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "MyGiftCard",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.GiftCard")
|
||||||
|
Annotatable getMyGiftCardAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "MyPaymentInstruments",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument")
|
||||||
|
Annotatable getMyPaymentInstrumentsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "ActiveSubscriptions",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Subscription")
|
||||||
|
Annotatable getActiveSubscriptionsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "AvailableSubscriptionTemplatess",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Subscription")
|
||||||
|
Annotatable getAvailableSubscriptionTemplatessAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
||||||
|
|
||||||
|
@ -47,7 +51,7 @@ import javax.xml.datatype.Duration;
|
||||||
isOpenType = true,
|
isOpenType = true,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface AccountInfo
|
public interface AccountInfo
|
||||||
extends Serializable {
|
extends AbstractOpenType,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "FirstName",
|
@Property(name = "FirstName",
|
||||||
|
@ -85,4 +89,19 @@ public interface AccountInfo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FirstName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFirstNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "LastName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getLastNameAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
||||||
|
|
||||||
|
@ -102,4 +106,23 @@ public interface Address
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Street",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getStreetAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "City",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCityAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PostalCode",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getPostalCodeAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Asset
|
public interface Asset
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -134,4 +136,23 @@ public interface Asset
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "AssetID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getAssetIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Number",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getNumberAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Club
|
public interface Club
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -111,4 +113,19 @@ public interface Club
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ClubID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getClubIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Company
|
public interface Company
|
||||||
extends AbstractAnnotatable,AbstractOpenType {
|
extends Annotatable,AbstractOpenType {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -247,4 +249,47 @@ public interface Company
|
||||||
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newAddress();
|
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newAddress();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CompanyID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getCompanyIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CompanyCategory",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.CompanyCategory")
|
||||||
|
Annotatable getCompanyCategoryAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Revenue",
|
||||||
|
type = "Edm.Int64")
|
||||||
|
Annotatable getRevenueAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Address",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
|
Annotatable getAddressAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Employees",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Employee")
|
||||||
|
Annotatable getEmployeesAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "VipCustomer",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Customer")
|
||||||
|
Annotatable getVipCustomerAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Departments",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Department")
|
||||||
|
Annotatable getDepartmentsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "CoreDepartment",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Department")
|
||||||
|
Annotatable getCoreDepartmentAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
||||||
|
|
||||||
|
@ -48,7 +52,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
public interface CompanyAddress
|
public interface CompanyAddress
|
||||||
extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address {
|
extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Street",
|
@Property(name = "Street",
|
||||||
|
@ -120,4 +124,28 @@ public interface CompanyAddress
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address.Annotations{
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Street",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getStreetAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "City",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCityAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PostalCode",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getPostalCodeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CompanyName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCompanyNameAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -59,7 +61,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument")
|
baseType = "Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument")
|
||||||
public interface CreditCardPI
|
public interface CreditCardPI
|
||||||
extends AbstractAnnotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument {
|
extends Annotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -290,4 +292,60 @@ public interface CreditCardPI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument.Annotations{
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PaymentInstrumentID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getPaymentInstrumentIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FriendlyName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFriendlyNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CreatedDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getCreatedDateAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CardNumber",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCardNumberAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CVV",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCVVAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "HolderName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getHolderNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Balance",
|
||||||
|
type = "Edm.Double")
|
||||||
|
Annotatable getBalanceAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ExperationDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getExperationDateAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "TheStoredPI",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.StoredPI")
|
||||||
|
Annotatable getTheStoredPIAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "BillingStatements",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Statement")
|
||||||
|
Annotatable getBillingStatementsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "BackupStoredPI",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.StoredPI")
|
||||||
|
Annotatable getBackupStoredPIAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "CreditRecords",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.CreditRecord")
|
||||||
|
Annotatable getCreditRecordsAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface CreditRecord
|
public interface CreditRecord
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -157,4 +159,27 @@ public interface CreditRecord
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CreditRecordID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getCreditRecordIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "IsGood",
|
||||||
|
type = "Edm.Boolean")
|
||||||
|
Annotatable getIsGoodAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Reason",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getReasonAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CreatedDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getCreatedDateAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -59,7 +61,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
||||||
public interface Customer
|
public interface Customer
|
||||||
extends AbstractAnnotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person {
|
extends Annotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -364,4 +366,68 @@ public interface Customer
|
||||||
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newHomeAddress();
|
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newHomeAddress();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person.Annotations{
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PersonID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getPersonIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FirstName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFirstNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "LastName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getLastNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "MiddleName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getMiddleNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "HomeAddress",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
|
Annotatable getHomeAddressAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Home",
|
||||||
|
type = "Edm.GeographyPoint")
|
||||||
|
Annotatable getHomeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Numbers",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNumbersAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Emails",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getEmailsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "City",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCityAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Birthday",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getBirthdayAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "TimeBetweenLastTwoOrders",
|
||||||
|
type = "Edm.Duration")
|
||||||
|
Annotatable getTimeBetweenLastTwoOrdersAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Parent",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
||||||
|
Annotatable getParentAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Orders",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Order")
|
||||||
|
Annotatable getOrdersAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Company",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Company")
|
||||||
|
Annotatable getCompanyAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Department
|
public interface Department
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -144,4 +146,27 @@ public interface Department
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "DepartmentID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getDepartmentIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "DepartmentNO",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getDepartmentNOAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Company",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Company")
|
||||||
|
Annotatable getCompanyAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -59,7 +61,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
||||||
public interface Employee
|
public interface Employee
|
||||||
extends AbstractAnnotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person {
|
extends Annotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -331,4 +333,60 @@ public interface Employee
|
||||||
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newHomeAddress();
|
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newHomeAddress();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person.Annotations{
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PersonID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getPersonIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FirstName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFirstNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "LastName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getLastNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "MiddleName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getMiddleNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "HomeAddress",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
|
Annotatable getHomeAddressAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Home",
|
||||||
|
type = "Edm.GeographyPoint")
|
||||||
|
Annotatable getHomeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Numbers",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNumbersAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Emails",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getEmailsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "DateHired",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getDateHiredAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Office",
|
||||||
|
type = "Edm.GeographyPoint")
|
||||||
|
Annotatable getOfficeAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Parent",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
||||||
|
Annotatable getParentAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Company",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Company")
|
||||||
|
Annotatable getCompanyAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface GiftCard
|
public interface GiftCard
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -193,4 +195,31 @@ public interface GiftCard
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "GiftCardID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getGiftCardIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "GiftCardNO",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getGiftCardNOAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Amount",
|
||||||
|
type = "Edm.Double")
|
||||||
|
Annotatable getAmountAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ExperationDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getExperationDateAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "OwnerName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getOwnerNameAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.*;
|
||||||
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.*;
|
||||||
|
|
||||||
|
@ -48,7 +52,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
public interface HomeAddress
|
public interface HomeAddress
|
||||||
extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address {
|
extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Property(name = "Street",
|
@Property(name = "Street",
|
||||||
|
@ -120,4 +124,28 @@ public interface HomeAddress
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address.Annotations{
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Street",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getStreetAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "City",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCityAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PostalCode",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getPostalCodeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FamilyName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFamilyNameAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface LabourUnion
|
public interface LabourUnion
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -111,4 +113,19 @@ public interface LabourUnion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "LabourUnionID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getLabourUnionIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Order
|
public interface Order
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -187,4 +189,39 @@ public interface Order
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "OrderID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getOrderIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "OrderDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getOrderDateAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ShelfLife",
|
||||||
|
type = "Edm.Duration")
|
||||||
|
Annotatable getShelfLifeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "OrderShelfLifes",
|
||||||
|
type = "Edm.Duration")
|
||||||
|
Annotatable getOrderShelfLifesAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "LoggedInEmployee",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Employee")
|
||||||
|
Annotatable getLoggedInEmployeeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "CustomerForOrder",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Customer")
|
||||||
|
Annotatable getCustomerForOrderAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "OrderDetails",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.OrderDetail")
|
||||||
|
Annotatable getOrderDetailsAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface OrderDetail
|
public interface OrderDetail
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -200,4 +202,39 @@ public interface OrderDetail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "OrderID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getOrderIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getProductIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "OrderPlaced",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getOrderPlacedAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Quantity",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getQuantityAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "UnitPrice",
|
||||||
|
type = "Edm.Single")
|
||||||
|
Annotatable getUnitPriceAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "ProductOrdered",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Product")
|
||||||
|
Annotatable getProductOrderedAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "AssociatedOrder",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Order")
|
||||||
|
Annotatable getAssociatedOrderAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface PaymentInstrument
|
public interface PaymentInstrument
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -164,4 +166,35 @@ public interface PaymentInstrument
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PaymentInstrumentID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getPaymentInstrumentIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FriendlyName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFriendlyNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CreatedDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getCreatedDateAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "TheStoredPI",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.StoredPI")
|
||||||
|
Annotatable getTheStoredPIAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "BillingStatements",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Statement")
|
||||||
|
Annotatable getBillingStatementsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "BackupStoredPI",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.StoredPI")
|
||||||
|
Annotatable getBackupStoredPIAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Person
|
public interface Person
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -287,4 +289,47 @@ public interface Person
|
||||||
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newHomeAddress();
|
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newHomeAddress();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PersonID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getPersonIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "FirstName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getFirstNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "LastName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getLastNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "MiddleName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getMiddleNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "HomeAddress",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
|
Annotatable getHomeAddressAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Home",
|
||||||
|
type = "Edm.GeographyPoint")
|
||||||
|
Annotatable getHomeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Numbers",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNumbersAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Emails",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getEmailsAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Parent",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Person")
|
||||||
|
Annotatable getParentAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Product
|
public interface Product
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -302,4 +304,51 @@ public interface Product
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getProductIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "QuantityPerUnit",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getQuantityPerUnitAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "UnitPrice",
|
||||||
|
type = "Edm.Single")
|
||||||
|
Annotatable getUnitPriceAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "QuantityInStock",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getQuantityInStockAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Discontinued",
|
||||||
|
type = "Edm.Boolean")
|
||||||
|
Annotatable getDiscontinuedAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "UserAccess",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.AccessLevel")
|
||||||
|
Annotatable getUserAccessAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "SkinColor",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Color")
|
||||||
|
Annotatable getSkinColorAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CoverColors",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Color")
|
||||||
|
Annotatable getCoverColorsAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Details",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.ProductDetail")
|
||||||
|
Annotatable getDetailsAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface ProductDetail
|
public interface ProductDetail
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -189,4 +191,35 @@ public interface ProductDetail
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getProductIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductDetailID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getProductDetailIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getProductNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Description",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getDescriptionAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "RelatedProduct",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Product")
|
||||||
|
Annotatable getRelatedProductAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Reviews",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.ProductReview")
|
||||||
|
Annotatable getReviewsAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface ProductReview
|
public interface ProductReview
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -203,4 +205,35 @@ public interface ProductReview
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getProductIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ProductDetailID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getProductDetailIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "ReviewTitle",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getReviewTitleAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "RevisionID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getRevisionIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Comment",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCommentAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Author",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getAuthorAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -59,7 +61,7 @@ import javax.xml.datatype.Duration;
|
||||||
isAbstract = false,
|
isAbstract = false,
|
||||||
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Company")
|
baseType = "Microsoft.Test.OData.Services.ODataWCFService.Company")
|
||||||
public interface PublicCompany
|
public interface PublicCompany
|
||||||
extends AbstractAnnotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company {
|
extends Annotatable,org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -289,4 +291,64 @@ public interface PublicCompany
|
||||||
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newAddress();
|
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address newAddress();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations extends org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company.Annotations{
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CompanyID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getCompanyIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CompanyCategory",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.CompanyCategory")
|
||||||
|
Annotatable getCompanyCategoryAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Revenue",
|
||||||
|
type = "Edm.Int64")
|
||||||
|
Annotatable getRevenueAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Name",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getNameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Address",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Address")
|
||||||
|
Annotatable getAddressAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "StockExchange",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getStockExchangeAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Employees",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Employee")
|
||||||
|
Annotatable getEmployeesAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "VipCustomer",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Customer")
|
||||||
|
Annotatable getVipCustomerAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Departments",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Department")
|
||||||
|
Annotatable getDepartmentsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "CoreDepartment",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Department")
|
||||||
|
Annotatable getCoreDepartmentAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Assets",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Asset")
|
||||||
|
Annotatable getAssetsAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "Club",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.Club")
|
||||||
|
Annotatable getClubAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForNavigationProperty(name = "LabourUnion",
|
||||||
|
type = "Microsoft.Test.OData.Services.ODataWCFService.LabourUnion")
|
||||||
|
Annotatable getLabourUnionAnnotations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Statement
|
public interface Statement
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -157,4 +159,27 @@ public interface Statement
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "StatementID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getStatementIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "TransactionType",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getTransactionTypeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "TransactionDescription",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getTransactionDescriptionAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Amount",
|
||||||
|
type = "Edm.Double")
|
||||||
|
Annotatable getAmountAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface StoredPI
|
public interface StoredPI
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -157,4 +159,27 @@ public interface StoredPI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "StoredPIID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getStoredPIIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PIName",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getPINameAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "PIType",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getPITypeAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CreatedDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getCreatedDateAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
|
||||||
|
|
||||||
import org.apache.olingo.client.api.http.HttpMethod;
|
import org.apache.olingo.client.api.http.HttpMethod;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty;
|
||||||
|
import org.apache.olingo.ext.proxy.api.annotations.AnnotationsForNavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
import org.apache.olingo.ext.proxy.api.annotations.Key;
|
||||||
|
@ -27,7 +29,7 @@ import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
import org.apache.olingo.ext.proxy.api.annotations.Property;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
import org.apache.olingo.ext.proxy.api.annotations.Operation;
|
||||||
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
import org.apache.olingo.ext.proxy.api.annotations.Parameter;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractAnnotatable;
|
import org.apache.olingo.ext.proxy.api.Annotatable;
|
||||||
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
import org.apache.olingo.ext.proxy.api.AbstractOpenType;
|
||||||
import org.apache.olingo.ext.proxy.api.OperationType;
|
import org.apache.olingo.ext.proxy.api.OperationType;
|
||||||
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
|
||||||
|
@ -58,7 +60,7 @@ import javax.xml.datatype.Duration;
|
||||||
hasStream = false,
|
hasStream = false,
|
||||||
isAbstract = false)
|
isAbstract = false)
|
||||||
public interface Subscription
|
public interface Subscription
|
||||||
extends AbstractAnnotatable,Serializable {
|
extends Annotatable,Serializable {
|
||||||
|
|
||||||
|
|
||||||
@Key
|
@Key
|
||||||
|
@ -180,4 +182,31 @@ public interface Subscription
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Annotations annotations();
|
||||||
|
|
||||||
|
interface Annotations {
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "SubscriptionID",
|
||||||
|
type = "Edm.Int32")
|
||||||
|
Annotatable getSubscriptionIDAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "TemplateGuid",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getTemplateGuidAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Title",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getTitleAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "Category",
|
||||||
|
type = "Edm.String")
|
||||||
|
Annotatable getCategoryAnnotations();
|
||||||
|
|
||||||
|
@AnnotationsForProperty(name = "CreatedDate",
|
||||||
|
type = "Edm.DateTimeOffset")
|
||||||
|
Annotatable getCreatedDateAnnotations();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,7 @@ public abstract class AbstractTestITCase extends AbstractBaseTestITCase {
|
||||||
final ODataEntity original,
|
final ODataEntity original,
|
||||||
final String entitySetName) {
|
final String entitySetName) {
|
||||||
|
|
||||||
final URIBuilder uriBuilder = getClient().getURIBuilder(serviceRootURL).
|
final URIBuilder uriBuilder = getClient().newURIBuilder(serviceRootURL).
|
||||||
appendEntitySetSegment(entitySetName);
|
appendEntitySetSegment(entitySetName);
|
||||||
|
|
||||||
debugODataEntity(original, "About to create");
|
debugODataEntity(original, "About to create");
|
||||||
|
@ -356,7 +356,7 @@ public abstract class AbstractTestITCase extends AbstractBaseTestITCase {
|
||||||
final int actualObjectId,
|
final int actualObjectId,
|
||||||
final Collection<String> expands) {
|
final Collection<String> expands) {
|
||||||
|
|
||||||
final URIBuilder uriBuilder = getClient().getURIBuilder(serviceRootURL).
|
final URIBuilder uriBuilder = getClient().newURIBuilder(serviceRootURL).
|
||||||
appendEntitySetSegment("Customer").appendKeySegment(actualObjectId);
|
appendEntitySetSegment("Customer").appendKeySegment(actualObjectId);
|
||||||
|
|
||||||
// search expanded
|
// search expanded
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
package org.apache.olingo.fit.v3;
|
package org.apache.olingo.fit.v3;
|
||||||
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.Assert.assertNull;
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
@ -27,120 +26,69 @@ import java.util.Map;
|
||||||
import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
|
import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
|
||||||
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
|
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
|
||||||
import org.apache.olingo.client.api.uri.v3.URIBuilder;
|
import org.apache.olingo.client.api.uri.v3.URIBuilder;
|
||||||
import org.apache.olingo.client.core.uri.URIUtils;
|
|
||||||
import org.apache.olingo.commons.api.domain.ODataValue;
|
import org.apache.olingo.commons.api.domain.ODataValue;
|
||||||
import org.apache.olingo.commons.api.domain.v3.ODataEntity;
|
import org.apache.olingo.commons.api.domain.v3.ODataEntity;
|
||||||
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
|
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
|
||||||
import org.apache.olingo.commons.api.domain.v3.ODataProperty;
|
import org.apache.olingo.commons.api.domain.v3.ODataProperty;
|
||||||
import org.apache.olingo.commons.api.edm.Edm;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmAction;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmActionImport;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
|
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
|
||||||
import org.apache.olingo.commons.api.edm.EdmSchema;
|
|
||||||
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
|
||||||
import org.apache.olingo.commons.core.edm.primitivetype.EdmInt32;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class ActionOverloadingTestITCase extends AbstractTestITCase {
|
public class ActionOverloadingTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void retrieveProduct() throws EdmPrimitiveTypeException {
|
public void retrieveProduct() throws EdmPrimitiveTypeException {
|
||||||
final Edm edm = getClient().getRetrieveRequestFactory().
|
final String actionImportName = "RetrieveProduct";
|
||||||
getMetadataRequest(testActionOverloadingServiceRootURL).execute().getBody();
|
|
||||||
assertNotNull(edm);
|
|
||||||
|
|
||||||
final EdmEntityContainer container = edm.getSchemas().get(0).getEntityContainer();
|
|
||||||
assertNotNull(container);
|
|
||||||
|
|
||||||
int execs = 0;
|
|
||||||
for (EdmActionImport actImp : container.getActionImports()) {
|
|
||||||
if ("RetrieveProduct".equals(actImp.getName())) {
|
|
||||||
// 1. unbound
|
// 1. unbound
|
||||||
final EdmAction unbound = actImp.getUnboundAction();
|
final URIBuilder builder = getClient().newURIBuilder(testActionOverloadingServiceRootURL).
|
||||||
assertNotNull(unbound);
|
appendOperationCallSegment(actionImportName);
|
||||||
assertEquals(EdmInt32.getInstance(), unbound.getReturnType().getType());
|
|
||||||
|
|
||||||
final URIBuilder unboundBuilder = getClient().getURIBuilder(testActionOverloadingServiceRootURL).
|
|
||||||
appendOperationCallSegment(URIUtils.operationImportURISegment(container, actImp.getName()));
|
|
||||||
final ODataInvokeResponse<ODataProperty> unboundRes = getClient().getInvokeRequestFactory().
|
final ODataInvokeResponse<ODataProperty> unboundRes = getClient().getInvokeRequestFactory().
|
||||||
<ODataProperty>getInvokeRequest(unboundBuilder.build(), unbound).execute();
|
getActionInvokeRequest(builder.build(), ODataProperty.class).execute();
|
||||||
assertNotNull(unboundRes);
|
assertNotNull(unboundRes);
|
||||||
assertEquals(200, unboundRes.getStatusCode());
|
assertEquals(200, unboundRes.getStatusCode());
|
||||||
assertEquals(Integer.valueOf(-10), unboundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
|
assertEquals(Integer.valueOf(-10), unboundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
|
||||||
execs++;
|
|
||||||
|
|
||||||
// 2. bound to Product
|
// 2. bound to Product
|
||||||
final EdmAction productBound = edm.getBoundAction(
|
|
||||||
new FullQualifiedName(container.getNamespace(), actImp.getName()),
|
|
||||||
new FullQualifiedName(container.getNamespace(), "Product"), false);
|
|
||||||
assertNotNull(productBound);
|
|
||||||
assertEquals(EdmInt32.getInstance(), productBound.getReturnType().getType());
|
|
||||||
|
|
||||||
final ODataEntity product = getClient().getRetrieveRequestFactory().getEntityRequest(
|
final ODataEntity product = getClient().getRetrieveRequestFactory().getEntityRequest(
|
||||||
getClient().getURIBuilder(testActionOverloadingServiceRootURL).
|
getClient().newURIBuilder(testActionOverloadingServiceRootURL).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build()).
|
appendEntitySetSegment("Product").appendKeySegment(-10).build()).
|
||||||
execute().getBody();
|
execute().getBody();
|
||||||
assertNotNull(product);
|
assertNotNull(product);
|
||||||
|
|
||||||
final ODataInvokeResponse<ODataProperty> productBoundRes = getClient().getInvokeRequestFactory().
|
final ODataInvokeResponse<ODataProperty> productBoundRes = getClient().getInvokeRequestFactory().
|
||||||
<ODataProperty>getInvokeRequest(product.getOperation(actImp.getName()).getTarget(), unbound).
|
getActionInvokeRequest(product.getOperation(actionImportName).getTarget(), ODataProperty.class).
|
||||||
execute();
|
execute();
|
||||||
assertNotNull(productBoundRes);
|
assertNotNull(productBoundRes);
|
||||||
assertEquals(200, productBoundRes.getStatusCode());
|
assertEquals(200, productBoundRes.getStatusCode());
|
||||||
assertEquals(Integer.valueOf(-10), productBoundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
|
assertEquals(Integer.valueOf(-10), productBoundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
|
||||||
execs++;
|
|
||||||
|
|
||||||
// 3. bound to OrderLine
|
// 3. bound to OrderLine
|
||||||
final EdmAction orderLineBound = edm.getBoundAction(
|
|
||||||
new FullQualifiedName(container.getNamespace(), actImp.getName()),
|
|
||||||
new FullQualifiedName(container.getNamespace(), "OrderLine"), false);
|
|
||||||
assertNotNull(orderLineBound);
|
|
||||||
assertEquals(EdmInt32.getInstance(), orderLineBound.getReturnType().getType());
|
|
||||||
|
|
||||||
final Map<String, Object> key = new LinkedHashMap<String, Object>(2);
|
final Map<String, Object> key = new LinkedHashMap<String, Object>(2);
|
||||||
key.put("OrderId", -10);
|
key.put("OrderId", -10);
|
||||||
key.put("ProductId", -10);
|
key.put("ProductId", -10);
|
||||||
final ODataEntity orderLine = getClient().getRetrieveRequestFactory().getEntityRequest(
|
final ODataEntity orderLine = getClient().getRetrieveRequestFactory().getEntityRequest(
|
||||||
getClient().getURIBuilder(testActionOverloadingServiceRootURL).
|
getClient().newURIBuilder(testActionOverloadingServiceRootURL).
|
||||||
appendEntitySetSegment("OrderLine").appendKeySegment(key).build()).
|
appendEntitySetSegment("OrderLine").appendKeySegment(key).build()).
|
||||||
execute().getBody();
|
execute().getBody();
|
||||||
assertNotNull(orderLine);
|
assertNotNull(orderLine);
|
||||||
|
|
||||||
final ODataInvokeResponse<ODataProperty> orderLineBoundRes = getClient().getInvokeRequestFactory().
|
final ODataInvokeResponse<ODataProperty> orderLineBoundRes = getClient().getInvokeRequestFactory().
|
||||||
<ODataProperty>getInvokeRequest(orderLine.getOperation(actImp.getName()).getTarget(), unbound).
|
getActionInvokeRequest(orderLine.getOperation(actionImportName).getTarget(), ODataProperty.class).
|
||||||
execute();
|
execute();
|
||||||
assertNotNull(orderLineBoundRes);
|
assertNotNull(orderLineBoundRes);
|
||||||
assertEquals(200, orderLineBoundRes.getStatusCode());
|
assertEquals(200, orderLineBoundRes.getStatusCode());
|
||||||
assertEquals(Integer.valueOf(-10), orderLineBoundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
|
assertEquals(Integer.valueOf(-10), orderLineBoundRes.getBody().getPrimitiveValue().toCastValue(Integer.class));
|
||||||
execs++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assertEquals(3, execs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void increaseSalaries() {
|
public void increaseSalaries() {
|
||||||
final Edm edm = getClient().getRetrieveRequestFactory().
|
final String actionImportName = "IncreaseSalaries";
|
||||||
getMetadataRequest(testActionOverloadingServiceRootURL).execute().getBody();
|
|
||||||
assertNotNull(edm);
|
|
||||||
|
|
||||||
final EdmSchema schema = edm.getSchemas().get(0);
|
|
||||||
assertNotNull(schema);
|
|
||||||
|
|
||||||
EdmAction actImp = edm.getBoundAction(
|
|
||||||
new FullQualifiedName(schema.getNamespace(), "IncreaseSalaries"),
|
|
||||||
new FullQualifiedName(schema.getNamespace(), "Employee"),
|
|
||||||
true);
|
|
||||||
|
|
||||||
final Map<String, ODataValue> parameters = new LinkedHashMap<String, ODataValue>(1);
|
final Map<String, ODataValue> parameters = new LinkedHashMap<String, ODataValue>(1);
|
||||||
parameters.put("n", getClient().getObjectFactory().newPrimitiveValueBuilder().buildInt32(5));
|
parameters.put("n", getClient().getObjectFactory().newPrimitiveValueBuilder().buildInt32(5));
|
||||||
|
|
||||||
// 1. bound to employees
|
// 1. bound to employees
|
||||||
assertNotNull(actImp);
|
final URIBuilder employeeBuilder = getClient().newURIBuilder(testActionOverloadingServiceRootURL).
|
||||||
assertNull(actImp.getReturnType());
|
|
||||||
|
|
||||||
final URIBuilder employeeBuilder = getClient().getURIBuilder(testActionOverloadingServiceRootURL).
|
|
||||||
appendEntitySetSegment("Person").
|
appendEntitySetSegment("Person").
|
||||||
appendDerivedEntityTypeSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.Employee");
|
appendDerivedEntityTypeSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.Employee");
|
||||||
final ODataEntitySet employees = getClient().getRetrieveRequestFactory().getEntitySetRequest(
|
final ODataEntitySet employees = getClient().getRetrieveRequestFactory().getEntitySetRequest(
|
||||||
|
@ -148,20 +96,13 @@ public class ActionOverloadingTestITCase extends AbstractTestITCase {
|
||||||
assertNotNull(employees);
|
assertNotNull(employees);
|
||||||
|
|
||||||
final ODataInvokeResponse<ODataNoContent> employeeRes = getClient().getInvokeRequestFactory().
|
final ODataInvokeResponse<ODataNoContent> employeeRes = getClient().getInvokeRequestFactory().
|
||||||
<ODataNoContent>getInvokeRequest(employeeBuilder.appendOperationCallSegment(actImp.getName()).build(),
|
getActionInvokeRequest(employeeBuilder.appendOperationCallSegment(actionImportName).build(),
|
||||||
actImp, parameters).execute();
|
ODataNoContent.class, parameters).execute();
|
||||||
assertNotNull(employeeRes);
|
assertNotNull(employeeRes);
|
||||||
assertEquals(204, employeeRes.getStatusCode());
|
assertEquals(204, employeeRes.getStatusCode());
|
||||||
|
|
||||||
// 2. bound to special employees
|
// 2. bound to special employees
|
||||||
actImp = edm.getBoundAction(
|
final URIBuilder specEmpBuilder = getClient().newURIBuilder(testActionOverloadingServiceRootURL).
|
||||||
new FullQualifiedName(schema.getNamespace(), "IncreaseSalaries"),
|
|
||||||
new FullQualifiedName(schema.getNamespace(), "SpecialEmployee"),
|
|
||||||
true);
|
|
||||||
assertNotNull(actImp);
|
|
||||||
assertNull(actImp.getReturnType());
|
|
||||||
|
|
||||||
final URIBuilder specEmpBuilder = getClient().getURIBuilder(testActionOverloadingServiceRootURL).
|
|
||||||
appendEntitySetSegment("Person").
|
appendEntitySetSegment("Person").
|
||||||
appendDerivedEntityTypeSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee");
|
appendDerivedEntityTypeSegment("Microsoft.Test.OData.Services.AstoriaDefaultService.SpecialEmployee");
|
||||||
final ODataEntitySet specEmps = getClient().getRetrieveRequestFactory().getEntitySetRequest(
|
final ODataEntitySet specEmps = getClient().getRetrieveRequestFactory().getEntitySetRequest(
|
||||||
|
@ -169,8 +110,8 @@ public class ActionOverloadingTestITCase extends AbstractTestITCase {
|
||||||
assertNotNull(specEmps);
|
assertNotNull(specEmps);
|
||||||
|
|
||||||
final ODataInvokeResponse<ODataNoContent> specEmpsRes = getClient().getInvokeRequestFactory().
|
final ODataInvokeResponse<ODataNoContent> specEmpsRes = getClient().getInvokeRequestFactory().
|
||||||
<ODataNoContent>getInvokeRequest(specEmpBuilder.appendOperationCallSegment(actImp.getName()).build(),
|
getActionInvokeRequest(specEmpBuilder.appendOperationCallSegment(actionImportName).build(),
|
||||||
actImp, parameters).execute();
|
ODataNoContent.class, parameters).execute();
|
||||||
assertNotNull(specEmpsRes);
|
assertNotNull(specEmpsRes);
|
||||||
assertEquals(204, specEmpsRes.getStatusCode());
|
assertEquals(204, specEmpsRes.getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class AsyncTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void retrieveEntitySet() throws InterruptedException, ExecutionException {
|
public void retrieveEntitySet() throws InterruptedException, ExecutionException {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
|
final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
appendEntitySetSegment("Product");
|
appendEntitySetSegment("Product");
|
||||||
final Future<ODataRetrieveResponse<ODataEntitySet>> futureRes =
|
final Future<ODataRetrieveResponse<ODataEntitySet>> futureRes =
|
||||||
client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()).asyncExecute();
|
client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()).asyncExecute();
|
||||||
|
@ -62,7 +62,7 @@ public class AsyncTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void updateEntity() throws InterruptedException, ExecutionException {
|
public void updateEntity() throws InterruptedException, ExecutionException {
|
||||||
final URI uri = client.getURIBuilder(testStaticServiceRootURL).
|
final URI uri = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
||||||
|
|
||||||
final ODataRetrieveResponse<ODataEntity> entityRes = client.getRetrieveRequestFactory().
|
final ODataRetrieveResponse<ODataEntity> entityRes = client.getRetrieveRequestFactory().
|
||||||
|
@ -93,15 +93,15 @@ public class AsyncTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createMediaEntity() throws Exception {
|
public void createMediaEntity() throws Exception {
|
||||||
URIBuilder builder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car");
|
URIBuilder builder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car");
|
||||||
|
|
||||||
final String TO_BE_UPDATED = "async buffered stream sample";
|
final String TO_BE_UPDATED = "async buffered stream sample";
|
||||||
final InputStream input = IOUtils.toInputStream(TO_BE_UPDATED);
|
final InputStream input = IOUtils.toInputStream(TO_BE_UPDATED);
|
||||||
|
|
||||||
final ODataMediaEntityCreateRequest<ODataEntity> createReq =
|
final ODataMediaEntityCreateRequest<ODataEntity> createReq =
|
||||||
client.getStreamedRequestFactory().getMediaEntityCreateRequest(builder.build(), input);
|
client.getCUDRequestFactory().getMediaEntityCreateRequest(builder.build(), input);
|
||||||
|
|
||||||
final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.execute();
|
final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.payloadManager();
|
||||||
final Future<ODataMediaEntityCreateResponse<ODataEntity>> futureCreateRes = streamManager.getAsyncResponse();
|
final Future<ODataMediaEntityCreateResponse<ODataEntity>> futureCreateRes = streamManager.getAsyncResponse();
|
||||||
|
|
||||||
while (!futureCreateRes.isDone()) {
|
while (!futureCreateRes.isDone()) {
|
||||||
|
@ -119,10 +119,9 @@ public class AsyncTestITCase extends AbstractTestITCase {
|
||||||
? created.getProperties().get(0).getPrimitiveValue().toCastValue(Integer.class)
|
? created.getProperties().get(0).getPrimitiveValue().toCastValue(Integer.class)
|
||||||
: created.getProperties().get(1).getPrimitiveValue().toCastValue(Integer.class);
|
: created.getProperties().get(1).getPrimitiveValue().toCastValue(Integer.class);
|
||||||
|
|
||||||
builder = client.getURIBuilder(testStaticServiceRootURL).
|
builder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car").appendKeySegment(id);
|
||||||
appendEntitySetSegment("Car").appendKeySegment(id).appendValueSegment();
|
|
||||||
|
|
||||||
final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaRequest(builder.build());
|
final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaEntityRequest(builder.build());
|
||||||
|
|
||||||
final ODataRetrieveResponse<InputStream> retrieveRes = retrieveReq.execute();
|
final ODataRetrieveResponse<InputStream> retrieveRes = retrieveReq.execute();
|
||||||
assertEquals(200, retrieveRes.getStatusCode());
|
assertEquals(200, retrieveRes.getStatusCode());
|
||||||
|
|
|
@ -30,11 +30,10 @@ import java.util.concurrent.Future;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.olingo.client.api.ODataBatchConstants;
|
import org.apache.olingo.client.api.ODataBatchConstants;
|
||||||
import org.apache.olingo.client.api.communication.request.ODataStreamManager;
|
import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.BatchStreamManager;
|
import org.apache.olingo.client.api.communication.request.batch.BatchManager;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
|
import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
|
import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
|
||||||
import org.apache.olingo.client.api.communication.request.batch.ODataRetrieve;
|
|
||||||
import org.apache.olingo.client.api.communication.request.batch.v3.ODataBatchRequest;
|
import org.apache.olingo.client.api.communication.request.batch.v3.ODataBatchRequest;
|
||||||
import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
|
import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
|
||||||
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
|
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
|
||||||
|
@ -50,7 +49,7 @@ import org.apache.olingo.client.api.uri.v3.URIBuilder;
|
||||||
import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
|
import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
|
||||||
import org.apache.olingo.client.core.communication.request.Wrapper;
|
import org.apache.olingo.client.core.communication.request.Wrapper;
|
||||||
import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
|
import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
|
||||||
import org.apache.olingo.client.core.communication.request.batch.ODataRetrieveResponseItem;
|
import org.apache.olingo.client.core.communication.request.batch.ODataSingleResponseItem;
|
||||||
import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl;
|
import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl;
|
||||||
import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl.ODataEntityResponseImpl;
|
import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl.ODataEntityResponseImpl;
|
||||||
import org.apache.olingo.client.core.uri.URIUtils;
|
import org.apache.olingo.client.core.uri.URIUtils;
|
||||||
|
@ -90,7 +89,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
// create your request
|
// create your request
|
||||||
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
||||||
|
|
||||||
final BatchStreamManager payload = request.execute();
|
final BatchManager payload = request.payloadManager();
|
||||||
final ODataBatchResponse response = payload.getResponse();
|
final ODataBatchResponse response = payload.getResponse();
|
||||||
|
|
||||||
assertEquals(202, response.getStatusCode());
|
assertEquals(202, response.getStatusCode());
|
||||||
|
@ -105,13 +104,13 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
// create your request
|
// create your request
|
||||||
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
||||||
|
|
||||||
final BatchStreamManager payload = request.execute();
|
final BatchManager payload = request.payloadManager();
|
||||||
final ODataChangeset changeset = payload.addChangeset();
|
final ODataChangeset changeset = payload.addChangeset();
|
||||||
|
|
||||||
URIBuilder targetURI;
|
URIBuilder targetURI;
|
||||||
ODataEntityCreateRequest<ODataEntity> createReq;
|
ODataEntityCreateRequest<ODataEntity> createReq;
|
||||||
|
|
||||||
targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
targetURI = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
||||||
for (int i = 1; i <= 2; i++) {
|
for (int i = 1; i <= 2; i++) {
|
||||||
// Create Customer into the changeset
|
// Create Customer into the changeset
|
||||||
createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
||||||
|
@ -121,14 +120,14 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
changeset.addRequest(createReq);
|
changeset.addRequest(createReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("WrongEntitySet");
|
targetURI = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("WrongEntitySet");
|
||||||
createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
||||||
targetURI.build(),
|
targetURI.build(),
|
||||||
getSampleCustomerProfile(105, "Sample customer", false));
|
getSampleCustomerProfile(105, "Sample customer", false));
|
||||||
createReq.setFormat(ODataPubFormat.JSON);
|
createReq.setFormat(ODataPubFormat.JSON);
|
||||||
changeset.addRequest(createReq);
|
changeset.addRequest(createReq);
|
||||||
|
|
||||||
targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
targetURI = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
||||||
for (int i = 3; i <= 4; i++) {
|
for (int i = 3; i <= 4; i++) {
|
||||||
// Create Customer into the changeset
|
// Create Customer into the changeset
|
||||||
createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
||||||
|
@ -158,12 +157,12 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
public void changesetWithReference() throws EdmPrimitiveTypeException {
|
public void changesetWithReference() throws EdmPrimitiveTypeException {
|
||||||
// create your request
|
// create your request
|
||||||
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
||||||
final BatchStreamManager streamManager = request.execute();
|
final BatchManager streamManager = request.payloadManager();
|
||||||
|
|
||||||
final ODataChangeset changeset = streamManager.addChangeset();
|
final ODataChangeset changeset = streamManager.addChangeset();
|
||||||
ODataEntity customer = getSampleCustomerProfile(20, "sample customer", false);
|
ODataEntity customer = getSampleCustomerProfile(20, "sample customer", false);
|
||||||
|
|
||||||
URIBuilder uriBuilder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
||||||
|
|
||||||
// add create request
|
// add create request
|
||||||
final ODataEntityCreateRequest<ODataEntity> createReq =
|
final ODataEntityCreateRequest<ODataEntity> createReq =
|
||||||
|
@ -178,7 +177,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
final ODataEntity customerChanges = client.getObjectFactory().newEntity(customer.getTypeName());
|
final ODataEntity customerChanges = client.getObjectFactory().newEntity(customer.getTypeName());
|
||||||
customerChanges.addLink(client.getObjectFactory().newEntityNavigationLink(
|
customerChanges.addLink(client.getObjectFactory().newEntityNavigationLink(
|
||||||
"Info",
|
"Info",
|
||||||
client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("CustomerInfo").
|
client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("CustomerInfo").
|
||||||
appendKeySegment(17).build()));
|
appendKeySegment(17).build()));
|
||||||
|
|
||||||
final ODataEntityUpdateRequest<ODataEntity> updateReq = client.getCUDRequestFactory().getEntityUpdateRequest(
|
final ODataEntityUpdateRequest<ODataEntity> updateReq = client.getCUDRequestFactory().getEntityUpdateRequest(
|
||||||
|
@ -234,7 +233,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
public void updateLinkWithReference() throws EdmPrimitiveTypeException {
|
public void updateLinkWithReference() throws EdmPrimitiveTypeException {
|
||||||
// create your request
|
// create your request
|
||||||
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
||||||
final BatchStreamManager streamManager = request.execute();
|
final BatchManager streamManager = request.payloadManager();
|
||||||
|
|
||||||
final ODataChangeset changeset = streamManager.addChangeset();
|
final ODataChangeset changeset = streamManager.addChangeset();
|
||||||
|
|
||||||
|
@ -245,7 +244,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
info.getProperties().add(client.getObjectFactory().newPrimitiveProperty("Information",
|
info.getProperties().add(client.getObjectFactory().newPrimitiveProperty("Information",
|
||||||
client.getObjectFactory().newPrimitiveValueBuilder().buildString("Sample information about customer 30")));
|
client.getObjectFactory().newPrimitiveValueBuilder().buildString("Sample information about customer 30")));
|
||||||
|
|
||||||
URIBuilder uriBuilder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("CustomerInfo");
|
URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("CustomerInfo");
|
||||||
|
|
||||||
ODataEntityCreateRequest<ODataEntity> createReq =
|
ODataEntityCreateRequest<ODataEntity> createReq =
|
||||||
client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), info);
|
client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), info);
|
||||||
|
@ -259,7 +258,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
customer.getNavigationLinks().add(
|
customer.getNavigationLinks().add(
|
||||||
client.getObjectFactory().newEntityNavigationLink("Info", URI.create("$" + createRequestRef)));
|
client.getObjectFactory().newEntityNavigationLink("Info", URI.create("$" + createRequestRef)));
|
||||||
|
|
||||||
uriBuilder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
||||||
|
|
||||||
// add create request
|
// add create request
|
||||||
createReq = client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), customer);
|
createReq = client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), customer);
|
||||||
|
@ -290,7 +289,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
assertEquals(201, res.getStatusCode());
|
assertEquals(201, res.getStatusCode());
|
||||||
assertTrue(res instanceof ODataEntityCreateResponse);
|
assertTrue(res instanceof ODataEntityCreateResponse);
|
||||||
|
|
||||||
uriBuilder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer").appendKeySegment(30);
|
uriBuilder = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer").appendKeySegment(30);
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(
|
||||||
URIUtils.getURI(testStaticServiceRootURL, uriBuilder.build() + "/Info"));
|
URIUtils.getURI(testStaticServiceRootURL, uriBuilder.build() + "/Info"));
|
||||||
|
@ -307,15 +306,13 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
// create your request
|
// create your request
|
||||||
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
|
||||||
|
|
||||||
final BatchStreamManager streamManager = request.execute();
|
final BatchManager streamManager = request.payloadManager();
|
||||||
|
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
// Add retrieve item
|
// Add retrieve item
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
ODataRetrieve retrieve = streamManager.addRetrieve();
|
|
||||||
|
|
||||||
// prepare URI
|
// prepare URI
|
||||||
URIBuilder targetURI = client.getURIBuilder(testStaticServiceRootURL);
|
URIBuilder targetURI = client.newURIBuilder(testStaticServiceRootURL);
|
||||||
targetURI.appendEntitySetSegment("Customer").appendKeySegment(-10).
|
targetURI.appendEntitySetSegment("Customer").appendKeySegment(-10).
|
||||||
expand("Logins").select("CustomerId,Logins/Username");
|
expand("Logins").select("CustomerId,Logins/Username");
|
||||||
|
|
||||||
|
@ -323,7 +320,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
|
ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
|
||||||
queryReq.setFormat(ODataPubFormat.ATOM);
|
queryReq.setFormat(ODataPubFormat.ATOM);
|
||||||
|
|
||||||
retrieve.setRequest(queryReq);
|
streamManager.addRequest(queryReq);
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
@ -332,7 +329,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
final ODataChangeset changeset = streamManager.addChangeset();
|
final ODataChangeset changeset = streamManager.addChangeset();
|
||||||
|
|
||||||
// Update Product into the changeset
|
// Update Product into the changeset
|
||||||
targetURI = client.getURIBuilder(testStaticServiceRootURL).
|
targetURI = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10);
|
appendEntitySetSegment("Product").appendKeySegment(-10);
|
||||||
final URI editLink = targetURI.build();
|
final URI editLink = targetURI.build();
|
||||||
|
|
||||||
|
@ -351,7 +348,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
changeset.addRequest(changeReq);
|
changeset.addRequest(changeReq);
|
||||||
|
|
||||||
// Create Customer into the changeset
|
// Create Customer into the changeset
|
||||||
targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
targetURI = client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer");
|
||||||
final ODataEntity original = getSampleCustomerProfile(1000, "Sample customer", false);
|
final ODataEntity original = getSampleCustomerProfile(1000, "Sample customer", false);
|
||||||
final ODataEntityCreateRequest<ODataEntity> createReq =
|
final ODataEntityCreateRequest<ODataEntity> createReq =
|
||||||
client.getCUDRequestFactory().getEntityCreateRequest(targetURI.build(), original);
|
client.getCUDRequestFactory().getEntityCreateRequest(targetURI.build(), original);
|
||||||
|
@ -360,7 +357,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
// Delete customer created above
|
// Delete customer created above
|
||||||
targetURI =
|
targetURI =
|
||||||
client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer").appendKeySegment(1000);
|
client.newURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customer").appendKeySegment(1000);
|
||||||
final ODataDeleteRequest deleteReq = client.getCUDRequestFactory().getDeleteRequest(targetURI.build());
|
final ODataDeleteRequest deleteReq = client.getCUDRequestFactory().getDeleteRequest(targetURI.build());
|
||||||
changeset.addRequest(deleteReq);
|
changeset.addRequest(deleteReq);
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
@ -368,16 +365,15 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
// Add retrieve item
|
// Add retrieve item
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
retrieve = streamManager.addRetrieve();
|
|
||||||
|
|
||||||
// prepare URI
|
// prepare URI
|
||||||
targetURI = client.getURIBuilder(testStaticServiceRootURL).
|
targetURI = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10);
|
appendEntitySetSegment("Product").appendKeySegment(-10);
|
||||||
|
|
||||||
// create new request
|
// create new request
|
||||||
queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
|
queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
|
||||||
|
|
||||||
retrieve.setRequest(queryReq);
|
streamManager.addRequest(queryReq);
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
|
||||||
final ODataBatchResponse response = streamManager.getResponse();
|
final ODataBatchResponse response = streamManager.getResponse();
|
||||||
|
@ -387,9 +383,9 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
// retrive the first item (ODataRetrieve)
|
// retrive the first item (ODataRetrieve)
|
||||||
ODataBatchResponseItem item = iter.next();
|
ODataBatchResponseItem item = iter.next();
|
||||||
assertTrue(item instanceof ODataRetrieveResponseItem);
|
assertTrue(item instanceof ODataSingleResponseItem);
|
||||||
|
|
||||||
ODataRetrieveResponseItem retitem = (ODataRetrieveResponseItem) item;
|
ODataSingleResponseItem retitem = (ODataSingleResponseItem) item;
|
||||||
ODataResponse res = retitem.next();
|
ODataResponse res = retitem.next();
|
||||||
assertTrue(res instanceof ODataEntityResponseImpl);
|
assertTrue(res instanceof ODataEntityResponseImpl);
|
||||||
assertEquals(200, res.getStatusCode());
|
assertEquals(200, res.getStatusCode());
|
||||||
|
@ -426,9 +422,9 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
// retrive the third item (ODataRetrieve)
|
// retrive the third item (ODataRetrieve)
|
||||||
item = iter.next();
|
item = iter.next();
|
||||||
assertTrue(item instanceof ODataRetrieveResponseItem);
|
assertTrue(item instanceof ODataSingleResponseItem);
|
||||||
|
|
||||||
retitem = (ODataRetrieveResponseItem) item;
|
retitem = (ODataSingleResponseItem) item;
|
||||||
res = retitem.next();
|
res = retitem.next();
|
||||||
assertTrue(res instanceof ODataEntityResponseImpl);
|
assertTrue(res instanceof ODataEntityResponseImpl);
|
||||||
assertEquals(200, res.getStatusCode());
|
assertEquals(200, res.getStatusCode());
|
||||||
|
@ -448,7 +444,7 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
super(new Wrapper<Future<HttpResponse>>());
|
super(new Wrapper<Future<HttpResponse>>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ODataStreamManager<ODataBatchResponse> addObject(byte[] src) {
|
public ODataPayloadManager<ODataBatchResponse> addObject(byte[] src) {
|
||||||
stream(src);
|
stream(src);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -499,9 +495,9 @@ public class BatchTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
private static class BatchStreamingThread extends Thread {
|
private static class BatchStreamingThread extends Thread {
|
||||||
|
|
||||||
private final BatchStreamManager streaming;
|
private final BatchManager streaming;
|
||||||
|
|
||||||
public BatchStreamingThread(final BatchStreamManager streaming) {
|
public BatchStreamingThread(final BatchManager streaming) {
|
||||||
this.streaming = streaming;
|
this.streaming = streaming;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class CountTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void entityCount() {
|
public void entityCount() {
|
||||||
CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
|
CommonURIBuilder<?> uriBuilder = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
appendEntitySetSegment("Customer").count();
|
appendEntitySetSegment("Customer").count();
|
||||||
final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
|
final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
|
||||||
req.setFormat(ODataValueFormat.TEXT);
|
req.setFormat(ODataValueFormat.TEXT);
|
||||||
|
@ -45,7 +45,7 @@ public class CountTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void invalidAccept() {
|
public void invalidAccept() {
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
appendEntitySetSegment("Customer").count();
|
appendEntitySetSegment("Customer").count();
|
||||||
final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
|
final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
|
||||||
req.setFormat(ODataValueFormat.TEXT);
|
req.setFormat(ODataValueFormat.TEXT);
|
||||||
|
|
|
@ -227,7 +227,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
final ODataEntity original = getSampleCustomerProfile(id, "Sample customer", false);
|
final ODataEntity original = getSampleCustomerProfile(id, "Sample customer", false);
|
||||||
|
|
||||||
final ODataEntityCreateRequest<ODataEntity> createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
final ODataEntityCreateRequest<ODataEntity> createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
||||||
client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer").build(), original);
|
client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer").build(), original);
|
||||||
createReq.setPrefer(client.newPreferences().returnNoContent());
|
createReq.setPrefer(client.newPreferences().returnNoContent());
|
||||||
|
|
||||||
final ODataEntityCreateResponse<ODataEntity> createRes = createReq.execute();
|
final ODataEntityCreateResponse<ODataEntity> createRes = createReq.execute();
|
||||||
|
@ -243,7 +243,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
final ODataDeleteResponse deleteRes = client.getCUDRequestFactory().getDeleteRequest(
|
final ODataDeleteResponse deleteRes = client.getCUDRequestFactory().getDeleteRequest(
|
||||||
client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer").appendKeySegment(id).build()).
|
client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer").appendKeySegment(id).build()).
|
||||||
execute();
|
execute();
|
||||||
assertEquals(204, deleteRes.getStatusCode());
|
assertEquals(204, deleteRes.getStatusCode());
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
final int id = 2;
|
final int id = 2;
|
||||||
final ODataEntity original = getSampleCustomerProfile(id, "Sample customer for issue 135", false);
|
final ODataEntity original = getSampleCustomerProfile(id, "Sample customer for issue 135", false);
|
||||||
|
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer");
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer");
|
||||||
final ODataEntityCreateRequest<ODataEntity> createReq =
|
final ODataEntityCreateRequest<ODataEntity> createReq =
|
||||||
client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), original);
|
client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), original);
|
||||||
createReq.setFormat(ODataPubFormat.JSON_FULL_METADATA);
|
createReq.setFormat(ODataPubFormat.JSON_FULL_METADATA);
|
||||||
|
@ -267,7 +267,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
fail(e.getMessage());
|
fail(e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
final ODataDeleteResponse deleteRes = client.getCUDRequestFactory().getDeleteRequest(
|
final ODataDeleteResponse deleteRes = client.getCUDRequestFactory().getDeleteRequest(
|
||||||
client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer").appendKeySegment(id).
|
client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer").appendKeySegment(id).
|
||||||
build()).
|
build()).
|
||||||
execute();
|
execute();
|
||||||
assertEquals(204, deleteRes.getStatusCode());
|
assertEquals(204, deleteRes.getStatusCode());
|
||||||
|
@ -294,7 +294,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
client.getObjectFactory().newPrimitiveValueBuilder().buildInt32(id)));
|
client.getObjectFactory().newPrimitiveValueBuilder().buildInt32(id)));
|
||||||
|
|
||||||
final ODataEntityCreateRequest<ODataEntity> createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
final ODataEntityCreateRequest<ODataEntity> createReq = client.getCUDRequestFactory().getEntityCreateRequest(
|
||||||
client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Order").build(), order);
|
client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Order").build(), order);
|
||||||
createReq.setFormat(format);
|
createReq.setFormat(format);
|
||||||
|
|
||||||
original.addLink(client.getObjectFactory().newEntitySetNavigationLink(
|
original.addLink(client.getObjectFactory().newEntitySetNavigationLink(
|
||||||
|
@ -306,7 +306,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
// now, compare the created one with the actual one and go deeply into the associated customer info.....
|
// now, compare the created one with the actual one and go deeply into the associated customer info.....
|
||||||
final ODataEntity actual = compareEntities(getServiceRoot(), format, created, id, null);
|
final ODataEntity actual = compareEntities(getServiceRoot(), format, created, id, null);
|
||||||
|
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot());
|
||||||
uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Orders");
|
uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Orders");
|
||||||
|
|
||||||
final ODataEntitySetRequest<ODataEntitySet> req = client.getRetrieveRequestFactory().
|
final ODataEntitySetRequest<ODataEntitySet> req = client.getRetrieveRequestFactory().
|
||||||
|
@ -348,7 +348,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
// now, compare the created one with the actual one and go deeply into the associated customer info.....
|
// now, compare the created one with the actual one and go deeply into the associated customer info.....
|
||||||
final ODataEntity actual = compareEntities(getServiceRoot(), format, created, id, null);
|
final ODataEntity actual = compareEntities(getServiceRoot(), format, created, id, null);
|
||||||
|
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot());
|
||||||
uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Info");
|
uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Info");
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
|
@ -464,7 +464,7 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
|
||||||
client.getObjectFactory().newPrimitiveValueBuilder().buildBoolean(false)));
|
client.getObjectFactory().newPrimitiveValueBuilder().buildBoolean(false)));
|
||||||
|
|
||||||
final URIBuilder builder =
|
final URIBuilder builder =
|
||||||
client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Message");
|
client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Message");
|
||||||
final ODataEntityCreateRequest<ODataEntity> req = client.getCUDRequestFactory().
|
final ODataEntityCreateRequest<ODataEntity> req = client.getCUDRequestFactory().
|
||||||
getEntityCreateRequest(builder.build(), message);
|
getEntityCreateRequest(builder.build(), message);
|
||||||
req.setFormat(format);
|
req.setFormat(format);
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void withInlineEntry(final ODataPubFormat format) {
|
private void withInlineEntry(final ODataPubFormat format) {
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Customer").appendKeySegment(-10).expand("Info");
|
appendEntitySetSegment("Customer").appendKeySegment(-10).expand("Info");
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
|
@ -109,7 +109,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void withInlineFeed(final ODataPubFormat format) {
|
private void withInlineFeed(final ODataPubFormat format) {
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Customer").appendKeySegment(-10).expand("Orders");
|
appendEntitySetSegment("Customer").appendKeySegment(-10).expand("Orders");
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
|
@ -148,7 +148,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rawRequest(final ODataPubFormat format) {
|
private void rawRequest(final ODataPubFormat format) {
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Car").appendKeySegment(16);
|
appendEntitySetSegment("Car").appendKeySegment(16);
|
||||||
|
|
||||||
final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
|
final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
|
||||||
|
@ -180,7 +180,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
multiKey.put("FromUsername", "1");
|
multiKey.put("FromUsername", "1");
|
||||||
multiKey.put("MessageId", -10);
|
multiKey.put("MessageId", -10);
|
||||||
|
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Message").appendKeySegment(multiKey);
|
appendEntitySetSegment("Message").appendKeySegment(multiKey);
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
|
@ -214,7 +214,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
private void checkForETag(final ODataPubFormat format) {
|
private void checkForETag(final ODataPubFormat format) {
|
||||||
final CommonURIBuilder<?> uriBuilder =
|
final CommonURIBuilder<?> uriBuilder =
|
||||||
client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Product").appendKeySegment(-10);
|
client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Product").appendKeySegment(-10);
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
req.setFormat(format);
|
req.setFormat(format);
|
||||||
|
@ -231,7 +231,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void issue99() {
|
public void issue99() {
|
||||||
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Car");
|
final CommonURIBuilder<?> uriBuilder = client.newURIBuilder(getServiceRoot()).appendEntitySetSegment("Car");
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
req.setFormat(ODataPubFormat.JSON);
|
req.setFormat(ODataPubFormat.JSON);
|
||||||
|
@ -242,7 +242,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void geospatial(final ODataPubFormat format) {
|
private void geospatial(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot()).
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("AllGeoTypesSet").appendKeySegment(-10);
|
appendEntitySetSegment("AllGeoTypesSet").appendKeySegment(-10);
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class EntitySetTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readEntitySetWithNextLink(final ODataPubFormat format) {
|
private void readEntitySetWithNextLink(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot());
|
||||||
uriBuilder.appendEntitySetSegment("Customer");
|
uriBuilder.appendEntitySetSegment("Customer");
|
||||||
|
|
||||||
final ODataEntitySetRequest<ODataEntitySet> req = client.getRetrieveRequestFactory().
|
final ODataEntitySetRequest<ODataEntitySet> req = client.getRetrieveRequestFactory().
|
||||||
|
@ -124,7 +124,7 @@ public class EntitySetTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readODataEntitySetIterator(final ODataPubFormat format) {
|
private void readODataEntitySetIterator(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot());
|
||||||
uriBuilder.appendEntitySetSegment("Customer");
|
uriBuilder.appendEntitySetSegment("Customer");
|
||||||
|
|
||||||
final ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> req =
|
final ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> req =
|
||||||
|
@ -147,7 +147,7 @@ public class EntitySetTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readWithInlineCount(final ODataPubFormat format) {
|
private void readWithInlineCount(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot());
|
||||||
uriBuilder.appendEntitySetSegment("Product").inlineCount(URIBuilder.InlineCount.allpages);
|
uriBuilder.appendEntitySetSegment("Product").inlineCount(URIBuilder.InlineCount.allpages);
|
||||||
|
|
||||||
final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
|
final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
|
||||||
|
@ -161,7 +161,7 @@ public class EntitySetTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rawRequest(final ODataPubFormat format) {
|
private void rawRequest(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
|
final URIBuilder uriBuilder = client.newURIBuilder(getServiceRoot());
|
||||||
uriBuilder.appendEntitySetSegment("Car");
|
uriBuilder.appendEntitySetSegment("Car");
|
||||||
|
|
||||||
final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
|
final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
@Test
|
@Test
|
||||||
public void mergeAsAtom() {
|
public void mergeAsAtom() {
|
||||||
final ODataPubFormat format = ODataPubFormat.ATOM;
|
final ODataPubFormat format = ODataPubFormat.ATOM;
|
||||||
final URI uri = client.getURIBuilder(getServiceRoot()).
|
final URI uri = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
||||||
final String etag = getETag(uri);
|
final String etag = getETag(uri);
|
||||||
final ODataEntity merge = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
final ODataEntity merge = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
||||||
|
@ -60,7 +60,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
@Test
|
@Test
|
||||||
public void mergeAsJSON() {
|
public void mergeAsJSON() {
|
||||||
final ODataPubFormat format = ODataPubFormat.JSON_FULL_METADATA;
|
final ODataPubFormat format = ODataPubFormat.JSON_FULL_METADATA;
|
||||||
final URI uri = client.getURIBuilder(getServiceRoot()).
|
final URI uri = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
||||||
final String etag = getETag(uri);
|
final String etag = getETag(uri);
|
||||||
final ODataEntity merge = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
final ODataEntity merge = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
||||||
|
@ -71,7 +71,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
@Test
|
@Test
|
||||||
public void patchAsAtom() {
|
public void patchAsAtom() {
|
||||||
final ODataPubFormat format = ODataPubFormat.ATOM;
|
final ODataPubFormat format = ODataPubFormat.ATOM;
|
||||||
final URI uri = client.getURIBuilder(getServiceRoot()).
|
final URI uri = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
||||||
final String etag = getETag(uri);
|
final String etag = getETag(uri);
|
||||||
final ODataEntity patch = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
final ODataEntity patch = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
||||||
|
@ -82,7 +82,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
@Test
|
@Test
|
||||||
public void patchAsJSON() {
|
public void patchAsJSON() {
|
||||||
final ODataPubFormat format = ODataPubFormat.JSON_FULL_METADATA;
|
final ODataPubFormat format = ODataPubFormat.JSON_FULL_METADATA;
|
||||||
final URI uri = client.getURIBuilder(getServiceRoot()).
|
final URI uri = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
||||||
final String etag = getETag(uri);
|
final String etag = getETag(uri);
|
||||||
final ODataEntity patch = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
final ODataEntity patch = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
||||||
|
@ -93,7 +93,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
@Test
|
@Test
|
||||||
public void replaceAsAtom() {
|
public void replaceAsAtom() {
|
||||||
final ODataPubFormat format = ODataPubFormat.ATOM;
|
final ODataPubFormat format = ODataPubFormat.ATOM;
|
||||||
final ODataEntity changes = read(format, client.getURIBuilder(getServiceRoot()).
|
final ODataEntity changes = read(format, client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Car").appendKeySegment(14).build());
|
appendEntitySetSegment("Car").appendKeySegment(14).build());
|
||||||
updateEntityDescription(format, changes, UpdateType.REPLACE);
|
updateEntityDescription(format, changes, UpdateType.REPLACE);
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
@Test
|
@Test
|
||||||
public void replaceAsJSON() {
|
public void replaceAsJSON() {
|
||||||
final ODataPubFormat format = ODataPubFormat.JSON_FULL_METADATA;
|
final ODataPubFormat format = ODataPubFormat.JSON_FULL_METADATA;
|
||||||
final ODataEntity changes = read(format, client.getURIBuilder(getServiceRoot()).
|
final ODataEntity changes = read(format, client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Car").appendKeySegment(14).build());
|
appendEntitySetSegment("Car").appendKeySegment(14).build());
|
||||||
updateEntityDescription(format, changes, UpdateType.REPLACE);
|
updateEntityDescription(format, changes, UpdateType.REPLACE);
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void patchLink(final ODataPubFormat format) throws EdmPrimitiveTypeException {
|
public void patchLink(final ODataPubFormat format) throws EdmPrimitiveTypeException {
|
||||||
final URI uri = client.getURIBuilder(getServiceRoot()).
|
final URI uri = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Customer").appendKeySegment(-10).build();
|
appendEntitySetSegment("Customer").appendKeySegment(-10).build();
|
||||||
|
|
||||||
final ODataEntity patch = client.getObjectFactory().
|
final ODataEntity patch = client.getObjectFactory().
|
||||||
|
@ -127,14 +127,14 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
// Update to CustomerInfo(12)
|
// Update to CustomerInfo(12)
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
URI customerInfoURI = client.getURIBuilder(getServiceRoot()).
|
URI customerInfoURI = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("CustomerInfo").appendKeySegment(12).build();
|
appendEntitySetSegment("CustomerInfo").appendKeySegment(12).build();
|
||||||
|
|
||||||
patch.addLink(client.getObjectFactory().newEntityNavigationLink("Info", customerInfoURI));
|
patch.addLink(client.getObjectFactory().newEntityNavigationLink("Info", customerInfoURI));
|
||||||
|
|
||||||
update(UpdateType.PATCH, patch, format, null);
|
update(UpdateType.PATCH, patch, format, null);
|
||||||
|
|
||||||
customerInfoURI = client.getURIBuilder(getServiceRoot()).
|
customerInfoURI = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Customer").appendKeySegment(-10).appendNavigationSegment("Info").build();
|
appendEntitySetSegment("Customer").appendKeySegment(-10).appendNavigationSegment("Info").build();
|
||||||
|
|
||||||
ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(customerInfoURI);
|
ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(customerInfoURI);
|
||||||
|
@ -151,7 +151,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
patch.getNavigationLinks().clear();
|
patch.getNavigationLinks().clear();
|
||||||
|
|
||||||
customerInfoURI = client.getURIBuilder(getServiceRoot()).
|
customerInfoURI = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("CustomerInfo").appendKeySegment(11).build();
|
appendEntitySetSegment("CustomerInfo").appendKeySegment(11).build();
|
||||||
read(format, customerInfoURI);
|
read(format, customerInfoURI);
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
update(UpdateType.PATCH, patch, format, null);
|
update(UpdateType.PATCH, patch, format, null);
|
||||||
|
|
||||||
customerInfoURI = client.getURIBuilder(getServiceRoot()).
|
customerInfoURI = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Customer").appendKeySegment(-10).appendNavigationSegment("Info").build();
|
appendEntitySetSegment("Customer").appendKeySegment(-10).appendNavigationSegment("Info").build();
|
||||||
|
|
||||||
req = client.getRetrieveRequestFactory().getEntityRequest(customerInfoURI);
|
req = client.getRetrieveRequestFactory().getEntityRequest(customerInfoURI);
|
||||||
|
@ -178,7 +178,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
final LinkedHashMap<String, Object> multiKey = new LinkedHashMap<String, Object>();
|
final LinkedHashMap<String, Object> multiKey = new LinkedHashMap<String, Object>();
|
||||||
multiKey.put("FromUsername", "1");
|
multiKey.put("FromUsername", "1");
|
||||||
multiKey.put("MessageId", -10);
|
multiKey.put("MessageId", -10);
|
||||||
final ODataEntity message = read(format, client.getURIBuilder(getServiceRoot()).
|
final ODataEntity message = read(format, client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Message").appendKeySegment(multiKey).build());
|
appendEntitySetSegment("Message").appendKeySegment(multiKey).build());
|
||||||
message.getAssociationLinks().clear();
|
message.getAssociationLinks().clear();
|
||||||
message.getNavigationLinks().clear();
|
message.getNavigationLinks().clear();
|
||||||
|
@ -222,7 +222,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void concurrentModification() {
|
public void concurrentModification() {
|
||||||
final URI uri = client.getURIBuilder(getServiceRoot()).
|
final URI uri = client.newURIBuilder(getServiceRoot()).
|
||||||
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
appendEntitySetSegment("Product").appendKeySegment(-10).build();
|
||||||
String etag = getETag(uri);
|
String etag = getETag(uri);
|
||||||
final ODataEntity product = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
final ODataEntity product = client.getObjectFactory().newEntity(TEST_PRODUCT_TYPE);
|
||||||
|
|
|
@ -38,12 +38,8 @@ import org.apache.olingo.client.api.uri.v3.URIBuilder;
|
||||||
import org.apache.olingo.client.api.v3.ODataClient;
|
import org.apache.olingo.client.api.v3.ODataClient;
|
||||||
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
|
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
|
||||||
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
|
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
|
||||||
import org.apache.olingo.client.core.uri.URIUtils;
|
|
||||||
import org.apache.olingo.commons.api.domain.v3.ODataEntity;
|
import org.apache.olingo.commons.api.domain.v3.ODataEntity;
|
||||||
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
|
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
|
||||||
import org.apache.olingo.commons.api.edm.Edm;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
|
|
||||||
import org.apache.olingo.commons.api.edm.EdmFunctionImport;
|
|
||||||
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
import org.apache.olingo.commons.api.edm.FullQualifiedName;
|
||||||
import org.apache.olingo.commons.api.format.ODataPubFormat;
|
import org.apache.olingo.commons.api.format.ODataPubFormat;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -88,7 +84,7 @@ public class ErrorTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stacktraceError(final ODataPubFormat format) {
|
private void stacktraceError(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
|
final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL);
|
||||||
uriBuilder.appendEntitySetSegment("Customer");
|
uriBuilder.appendEntitySetSegment("Customer");
|
||||||
|
|
||||||
final ErrorGeneratingRequest errorReq = new ErrorGeneratingRequest(HttpMethod.POST, uriBuilder.build());
|
final ErrorGeneratingRequest errorReq = new ErrorGeneratingRequest(HttpMethod.POST, uriBuilder.build());
|
||||||
|
@ -115,7 +111,7 @@ public class ErrorTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notfoundError(final ODataPubFormat format) {
|
private void notfoundError(final ODataPubFormat format) {
|
||||||
final URIBuilder uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
|
final URIBuilder uriBuilder = client.newURIBuilder(testStaticServiceRootURL);
|
||||||
uriBuilder.appendEntitySetSegment("Customer(154)");
|
uriBuilder.appendEntitySetSegment("Customer(154)");
|
||||||
|
|
||||||
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
|
||||||
|
@ -143,16 +139,10 @@ public class ErrorTestITCase extends AbstractTestITCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void instreamError(final ODataPubFormat format) {
|
private void instreamError(final ODataPubFormat format) {
|
||||||
final Edm metadata =
|
final URIBuilder builder = client.newURIBuilder(testStaticServiceRootURL).
|
||||||
client.getRetrieveRequestFactory().getMetadataRequest(testStaticServiceRootURL).execute().getBody();
|
appendOperationCallSegment("InStreamErrorGetCustomer");
|
||||||
assertNotNull(metadata);
|
|
||||||
|
|
||||||
final EdmEntityContainer container = metadata.getSchemas().get(0).getEntityContainer();
|
|
||||||
final EdmFunctionImport funcImp = container.getFunctionImport("InStreamErrorGetCustomer");
|
|
||||||
final URIBuilder builder = client.getURIBuilder(testStaticServiceRootURL).
|
|
||||||
appendOperationCallSegment(URIUtils.operationImportURISegment(container, funcImp.getName()));
|
|
||||||
final ODataInvokeRequest<ODataEntitySet> req =
|
final ODataInvokeRequest<ODataEntitySet> req =
|
||||||
client.getInvokeRequestFactory().getInvokeRequest(builder.build(), funcImp.getUnboundFunction(null));
|
client.getInvokeRequestFactory().getFunctionInvokeRequest(builder.build(), ODataEntitySet.class);
|
||||||
req.setFormat(format);
|
req.setFormat(format);
|
||||||
|
|
||||||
final ODataInvokeResponse<ODataEntitySet> res = req.execute();
|
final ODataInvokeResponse<ODataEntitySet> res = req.execute();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue