[OLINGO-260] contained tests

This commit is contained in:
Francesco Chicchiriccò 2014-05-17 16:06:18 +02:00
parent c35bc553c6
commit ca66d67131
125 changed files with 1239 additions and 748 deletions

View File

@ -25,8 +25,7 @@ import java.lang.annotation.Target;
/**
* Give entity set a name. If interface extending EntitySet is not annotated with this, the effective name will be
* class'
* <tt>getSimpleName()</tt>.
* class'<tt>getSimpleName()</tt>.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@ -34,5 +33,5 @@ public @interface EntitySet {
String name();
boolean includeInServiceDocument() default true;
boolean contained() default false;
}

View File

@ -39,4 +39,6 @@ public @interface NavigationProperty {
String targetContainer();
String targetEntitySet();
boolean containsTarget() default false;
}

View File

@ -87,7 +87,7 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
}
@SuppressWarnings({"unchecked", "rawtypes"})
protected Object getEntityCollection(
protected Object getEntityCollectionProxy(
final Class<?> typeRef,
final Class<?> typeCollectionRef,
final String entityContainerName,
@ -99,7 +99,7 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
for (CommonODataEntity entityFromSet : entitySet.getEntities()) {
items.add(getEntityProxy(
entityFromSet, entityContainerName, null, typeRef, checkInTheContext));
entityFromSet.getEditLink(), entityFromSet, entityContainerName, null, typeRef, checkInTheContext));
}
return Proxy.newProxyInstance(
@ -108,27 +108,38 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
new EntityCollectionInvocationHandler(containerHandler, items, typeRef, uri));
}
protected <T> T getEntityProxy(
protected Object getEntitySetProxy(
final Class<?> typeRef,
final URI uri) {
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {typeRef},
EntitySetInvocationHandler.getInstance(typeRef, containerHandler, uri));
}
protected Object getEntityProxy(
final URI entityURI,
final CommonODataEntity entity,
final String entityContainerName,
final String entitySetName,
final URI entitySetURI,
final Class<?> type,
final boolean checkInTheContext) {
return getEntityProxy(entity, entityContainerName, entitySetName, type, null, checkInTheContext);
return getEntityProxy(entityURI, entity, entityContainerName, entitySetURI, type, null, checkInTheContext);
}
@SuppressWarnings({"unchecked"})
protected <T> T getEntityProxy(
protected Object getEntityProxy(
final URI entityURI,
final CommonODataEntity entity,
final String entityContainerName,
final String entitySetName,
final URI entitySetURI,
final Class<?> type,
final String eTag,
final boolean checkInTheContext) {
EntityTypeInvocationHandler handler =
EntityTypeInvocationHandler.getInstance(entity, entitySetName, type, containerHandler);
EntityInvocationHandler handler =
EntityInvocationHandler.getInstance(entityURI, entity, entitySetURI, type, containerHandler);
if (StringUtils.isNotBlank(eTag)) {
// override ETag into the wrapped object.
@ -139,7 +150,7 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
handler = EntityContainerFactory.getContext().entityContext().getEntity(handler.getUUID());
}
return (T) Proxy.newProxyInstance(
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {type},
handler);
@ -196,7 +207,7 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
if (edmType.isCollection()) {
final ParameterizedType collType = (ParameterizedType) method.getReturnType().getGenericInterfaces()[0];
final Class<?> collItemType = (Class<?>) collType.getActualTypeArguments()[0];
return getEntityCollection(
return getEntityCollectionProxy(
collItemType,
method.getReturnType(),
null,
@ -205,6 +216,7 @@ abstract class AbstractInvocationHandler implements InvocationHandler {
false);
} else {
return getEntityProxy(
((CommonODataEntity) result).getEditLink(),
(CommonODataEntity) result,
null,
null,

View File

@ -37,6 +37,7 @@ import org.apache.olingo.commons.api.domain.ODataLink;
import org.apache.olingo.commons.api.domain.ODataLinked;
import org.apache.olingo.ext.proxy.EntityContainerFactory;
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntityType;
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
import org.apache.olingo.ext.proxy.api.annotations.Property;
@ -46,24 +47,24 @@ import org.apache.olingo.ext.proxy.utils.ClassUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHandler {
public abstract class AbstractStructuredInvocationHandler extends AbstractInvocationHandler {
private static final long serialVersionUID = 2629912294765040037L;
/**
* Logger.
*/
protected static final Logger LOG = LoggerFactory.getLogger(AbstractTypeInvocationHandler.class);
protected static final Logger LOG = LoggerFactory.getLogger(AbstractStructuredInvocationHandler.class);
protected final Class<?> typeRef;
protected final EntityContext entityContext = EntityContainerFactory.getContext().entityContext();
protected EntityTypeInvocationHandler entityHandler;
protected EntityInvocationHandler entityHandler;
protected Object internal;
protected AbstractTypeInvocationHandler(
protected AbstractStructuredInvocationHandler(
final CommonEdmEnabledODataClient<?> client,
final Class<?> typeRef,
final Object internal,
@ -72,14 +73,14 @@ public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHa
super(client, containerHandler);
this.internal = internal;
this.typeRef = typeRef;
this.entityHandler = EntityTypeInvocationHandler.class.cast(this);
this.entityHandler = EntityInvocationHandler.class.cast(this);
}
protected AbstractTypeInvocationHandler(
protected AbstractStructuredInvocationHandler(
final CommonEdmEnabledODataClient<?> client,
final Class<?> typeRef,
final Object internal,
final EntityTypeInvocationHandler entityHandler) {
final EntityInvocationHandler entityHandler) {
super(client, entityHandler == null ? null : entityHandler.containerHandler);
this.internal = internal;
@ -87,11 +88,11 @@ public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHa
this.entityHandler = entityHandler;
}
public EntityTypeInvocationHandler getEntityHandler() {
public EntityInvocationHandler getEntityHandler() {
return entityHandler;
}
public void setEntityHandler(EntityTypeInvocationHandler entityHandler) {
public void setEntityHandler(EntityInvocationHandler entityHandler) {
this.entityHandler = entityHandler;
}
@ -191,7 +192,9 @@ public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHa
protected abstract Object getNavigationPropertyValue(final NavigationProperty property, final Method getter);
protected Object retriveNavigationProperty(final NavigationProperty property, final Method getter) {
protected Object retrieveNavigationProperty(
final NavigationProperty property, final Method getter, final String serviceRoot) {
final Class<?> type = getter.getReturnType();
final Class<?> collItemType;
if (AbstractEntityCollection.class.isAssignableFrom(type)) {
@ -208,14 +211,15 @@ public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHa
if (link instanceof ODataInlineEntity) {
// return entity
navPropValue = getEntityProxy(
null,
((ODataInlineEntity) link).getEntity(),
property.targetContainer(),
property.targetEntitySet(),
client.getURIBuilder(serviceRoot).appendEntitySetSegment(property.targetEntitySet()).build(),
type,
false);
} else if (link instanceof ODataInlineEntitySet) {
// return entity set
navPropValue = getEntityCollection(
navPropValue = getEntityCollectionProxy(
collItemType,
type,
property.targetContainer(),
@ -224,25 +228,26 @@ public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHa
false);
} else {
// navigate
final URI uri = URIUtils.getURI(
containerHandler.getFactory().getServiceRoot(), link.getLink().toASCIIString());
final URI uri = URIUtils.getURI(containerHandler.getFactory().getServiceRoot(), link.getLink().toASCIIString());
if (AbstractEntityCollection.class.isAssignableFrom(type)) {
navPropValue = getEntityCollection(
navPropValue = getEntityCollectionProxy(
collItemType,
type,
property.targetContainer(),
client.getRetrieveRequestFactory().getEntitySetRequest(uri).execute().getBody(),
uri,
true);
} else if (AbstractEntitySet.class.isAssignableFrom(type)) {
navPropValue = getEntitySetProxy(type, uri);
} else {
final ODataRetrieveResponse<CommonODataEntity> res =
client.getRetrieveRequestFactory().getEntityRequest(uri).execute();
navPropValue = getEntityProxy(
uri,
res.getBody(),
property.targetContainer(),
property.targetEntitySet(),
client.getURIBuilder(serviceRoot).appendEntitySetSegment(property.targetEntitySet()).build(),
type,
res.getETag(),
true);
@ -280,11 +285,11 @@ public abstract class AbstractTypeInvocationHandler extends AbstractInvocationHa
? (AbstractEntityCollection) value : Collections.singleton(value)) {
final InvocationHandler etih = Proxy.getInvocationHandler(link);
if (!(etih instanceof EntityTypeInvocationHandler)) {
if (!(etih instanceof EntityInvocationHandler)) {
throw new IllegalArgumentException("Invalid argument type");
}
final EntityTypeInvocationHandler linkedHandler = (EntityTypeInvocationHandler) etih;
final EntityInvocationHandler linkedHandler = (EntityInvocationHandler) etih;
if (!linkedHandler.getTypeRef().isAnnotationPresent(EntityType.class)) {
throw new IllegalArgumentException("Invalid argument type " + linkedHandler.getTypeRef().getSimpleName());
}

View File

@ -29,22 +29,22 @@ class ComplexFactoryInvocationHandler extends AbstractInvocationHandler implemen
private static final long serialVersionUID = 2629912294765040027L;
private final EntityTypeInvocationHandler entityHandler;
private final EntityInvocationHandler entityHandler;
private final AbstractTypeInvocationHandler invokerHandler;
private final AbstractStructuredInvocationHandler invokerHandler;
static ComplexFactoryInvocationHandler getInstance(
final CommonEdmEnabledODataClient<?> client,
final EntityContainerInvocationHandler containerHandler,
final EntityTypeInvocationHandler entityHandler,
final AbstractTypeInvocationHandler targetHandler) {
final EntityInvocationHandler entityHandler,
final AbstractStructuredInvocationHandler targetHandler) {
return new ComplexFactoryInvocationHandler(client, containerHandler, entityHandler, targetHandler);
}
static ComplexFactoryInvocationHandler getInstance(
final EntityTypeInvocationHandler entityHandler,
final AbstractTypeInvocationHandler targetHandler) {
final EntityInvocationHandler entityHandler,
final AbstractStructuredInvocationHandler targetHandler) {
return new ComplexFactoryInvocationHandler(
entityHandler == null ? null : entityHandler.containerHandler.client,
targetHandler == null
@ -56,8 +56,8 @@ class ComplexFactoryInvocationHandler extends AbstractInvocationHandler implemen
private ComplexFactoryInvocationHandler(
final CommonEdmEnabledODataClient<?> client,
final EntityContainerInvocationHandler containerHandler,
final EntityTypeInvocationHandler entityHandler,
final AbstractTypeInvocationHandler targetHandler) {
final EntityInvocationHandler entityHandler,
final AbstractStructuredInvocationHandler targetHandler) {
super(client, containerHandler);
this.invokerHandler = targetHandler;
@ -78,7 +78,7 @@ class ComplexFactoryInvocationHandler extends AbstractInvocationHandler implemen
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {method.getReturnType()},
ComplexTypeInvocationHandler.getInstance(client, property.name(), method.getReturnType(), entityHandler));
ComplexInvocationHandler.getInstance(client, property.name(), method.getReturnType(), entityHandler));
} else {
throw new NoSuchMethodException(method.getName());
}

View File

@ -41,15 +41,15 @@ import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
import org.apache.olingo.ext.proxy.utils.ClassUtils;
import org.apache.olingo.ext.proxy.utils.CoreUtils;
public class ComplexTypeInvocationHandler extends AbstractTypeInvocationHandler {
public class ComplexInvocationHandler extends AbstractStructuredInvocationHandler {
private static final long serialVersionUID = 2629912294765040037L;
public static ComplexTypeInvocationHandler getInstance(
public static ComplexInvocationHandler getInstance(
final CommonEdmEnabledODataClient<?> client,
final String propertyName,
final Class<?> reference,
final EntityTypeInvocationHandler handler) {
final EntityInvocationHandler handler) {
final Class<?> complexTypeRef;
if (Collection.class.isAssignableFrom(reference)) {
@ -69,24 +69,24 @@ public class ComplexTypeInvocationHandler extends AbstractTypeInvocationHandler
final ODataComplexValue<? extends CommonODataProperty> complex =
client.getObjectFactory().newComplexValue(typeName.toString());
return (ComplexTypeInvocationHandler) ComplexTypeInvocationHandler.getInstance(
return (ComplexInvocationHandler) ComplexInvocationHandler.getInstance(
client, complex, complexTypeRef, handler);
}
public static ComplexTypeInvocationHandler getInstance(
public static ComplexInvocationHandler getInstance(
final CommonEdmEnabledODataClient<?> client,
final ODataComplexValue<?> complex,
final Class<?> typeRef,
final EntityTypeInvocationHandler handler) {
final EntityInvocationHandler handler) {
return new ComplexTypeInvocationHandler(client, complex, typeRef, handler);
return new ComplexInvocationHandler(client, complex, typeRef, handler);
}
public ComplexTypeInvocationHandler(
public ComplexInvocationHandler(
final CommonEdmEnabledODataClient<?> client,
final ODataComplexValue<?> complex,
final Class<?> typeRef,
final EntityTypeInvocationHandler handler) {
final EntityInvocationHandler handler) {
super(client, typeRef, complex, handler);
}
@ -166,7 +166,7 @@ public class ComplexTypeInvocationHandler extends AbstractTypeInvocationHandler
throw new UnsupportedOperationException("Internal object is not navigable");
}
return retriveNavigationProperty(property, getter);
return retrieveNavigationProperty(property, getter, containerHandler.getFactory().getServiceRoot());
}
@Override

View File

@ -46,7 +46,6 @@ import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataResponse;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.domain.CommonODataEntity;
@ -75,9 +74,9 @@ class ContainerImpl implements Container {
private final CommonEdmEnabledODataClient<?> client;
private final EntityContainerFactory factory;
private final EntityContainerFactory<?> factory;
ContainerImpl(final CommonEdmEnabledODataClient<?> client, final EntityContainerFactory factory) {
ContainerImpl(final CommonEdmEnabledODataClient<?> client, final EntityContainerFactory<?> factory) {
this.client = client;
this.factory = factory;
}
@ -88,7 +87,7 @@ class ContainerImpl implements Container {
@Override
public void flush() {
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();
@ -138,13 +137,13 @@ class ContainerImpl implements Container {
throw new IllegalStateException("Transaction failed: " + res.getStatusMessage());
}
final EntityTypeInvocationHandler handler = items.get(changesetItemId);
final EntityInvocationHandler handler = items.get(changesetItemId);
if (handler != null) {
if (res instanceof ODataEntityCreateResponse) {
if (res instanceof ODataEntityCreateResponse && res.getStatusCode() == 201) {
handler.setEntity(((ODataEntityCreateResponse) res).getBody());
LOG.debug("Upgrade created object '{}'", handler);
} else if (res instanceof ODataEntityUpdateResponse) {
} else if (res instanceof ODataEntityUpdateResponse && res.getStatusCode() == 200) {
handler.setEntity(((ODataEntityUpdateResponse) res).getBody());
LOG.debug("Upgrade updated object '{}'", handler);
}
@ -156,7 +155,7 @@ class ContainerImpl implements Container {
}
private void batch(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final CommonODataEntity entity,
final ODataChangeset changeset) {
@ -181,19 +180,17 @@ class ContainerImpl implements Container {
}
private void batchCreate(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final CommonODataEntity entity,
final ODataChangeset changeset) {
LOG.debug("Create '{}'", handler);
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(factory.getServiceRoot()).
appendEntitySetSegment(handler.getEntitySetName());
changeset.addRequest(client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), entity));
changeset.addRequest(client.getCUDRequestFactory().getEntityCreateRequest(handler.getEntitySetURI(), entity));
}
private void batchUpdateMediaEntity(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final URI uri,
final InputStream input,
final ODataChangeset changeset) {
@ -215,7 +212,7 @@ class ContainerImpl implements Container {
}
private void batchUpdateMediaResource(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final URI uri,
final InputStream input,
final ODataChangeset changeset) {
@ -232,18 +229,20 @@ class ContainerImpl implements Container {
}
private void batchUpdate(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final CommonODataEntity changes,
final ODataChangeset changeset) {
LOG.debug("Update '{}'", changes.getEditLink());
LOG.debug("Update '{}'", handler.getEntityURI());
final ODataEntityUpdateRequest<CommonODataEntity> req =
client.getServiceVersion().compareTo(ODataServiceVersion.V30) <= 0
? ((org.apache.olingo.client.api.v3.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
getEntityUpdateRequest(handler.getEntityURI(),
org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
: ((org.apache.olingo.client.api.v4.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
getEntityUpdateRequest(handler.getEntityURI(),
org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
req.setPrefer(new ODataPreferences(client.getServiceVersion()).returnContent());
@ -255,7 +254,7 @@ class ContainerImpl implements Container {
}
private void batchUpdate(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final URI uri,
final CommonODataEntity changes,
final ODataChangeset changeset) {
@ -265,11 +264,11 @@ class ContainerImpl implements Container {
final ODataEntityUpdateRequest<CommonODataEntity> req =
client.getServiceVersion().compareTo(ODataServiceVersion.V30) <= 0
? ((org.apache.olingo.client.api.v3.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(
uri, org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
getEntityUpdateRequest(uri,
org.apache.olingo.client.api.communication.request.cud.v3.UpdateType.PATCH, changes)
: ((org.apache.olingo.client.api.v4.EdmEnabledODataClient) client).getCUDRequestFactory().
getEntityUpdateRequest(
uri, org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
getEntityUpdateRequest(uri,
org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
req.setPrefer(new ODataPreferences(client.getServiceVersion()).returnContent());
@ -281,14 +280,14 @@ class ContainerImpl implements Container {
}
private void batchDelete(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
final CommonODataEntity entity,
final ODataChangeset changeset) {
LOG.debug("Delete '{}'", entity.getEditLink());
final URI deleteURI = handler.getEntityURI() == null ? entity.getEditLink() : handler.getEntityURI();
LOG.debug("Delete '{}'", deleteURI);
final ODataDeleteRequest req = client.getCUDRequestFactory().getDeleteRequest(URIUtils.getURI(
factory.getServiceRoot(), entity.getEditLink().toASCIIString()));
final ODataDeleteRequest req = client.getCUDRequestFactory().getDeleteRequest(deleteURI);
if (StringUtils.isNotBlank(handler.getETag())) {
req.setIfMatch(handler.getETag());
@ -298,7 +297,7 @@ class ContainerImpl implements Container {
}
private int processEntityContext(
final EntityTypeInvocationHandler handler,
final EntityInvocationHandler handler,
int pos,
final TransactionItems items,
final List<EntityLinkDesc> delayedUpdates,
@ -323,14 +322,14 @@ class ContainerImpl implements Container {
? ODataLinkType.ENTITY_SET_NAVIGATION
: ODataLinkType.ENTITY_NAVIGATION;
final Set<EntityTypeInvocationHandler> toBeLinked = new HashSet<EntityTypeInvocationHandler>();
final Set<EntityInvocationHandler> toBeLinked = new HashSet<EntityInvocationHandler>();
final String serviceRoot = factory.getServiceRoot();
for (Object proxy : type == ODataLinkType.ENTITY_SET_NAVIGATION
? (Collection) property.getValue() : Collections.singleton(property.getValue())) {
final EntityTypeInvocationHandler target =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(proxy);
final EntityInvocationHandler target =
(EntityInvocationHandler) Proxy.getInvocationHandler(proxy);
final AttachedEntityStatus status =
EntityContainerFactory.getContext().entityContext().getStatus(target);
@ -360,8 +359,7 @@ class ContainerImpl implements Container {
// create the link for the current object
LOG.debug("'{}' from '{}' to (${}) '{}'", type.name(), handler, targetPos, target);
entity.addLink(
buildNavigationLink(property.getKey().name(), URI.create("$" + targetPos), type));
entity.addLink(buildNavigationLink(property.getKey().name(), URI.create("$" + targetPos), type));
}
}
}
@ -396,7 +394,7 @@ class ContainerImpl implements Container {
final URI targetURI = currentStatus == AttachedEntityStatus.NEW
? URI.create("$" + startingPos + "/$value")
: URIUtils.getURI(
factory.getServiceRoot(), handler.getEntity().getEditLink().toASCIIString() + "/$value");
factory.getServiceRoot(), handler.getEntity().getEditLink().toASCIIString() + "/$value");
batchUpdateMediaEntity(handler, targetURI, handler.getStreamChanges(), changeset);
@ -409,8 +407,8 @@ class ContainerImpl implements Container {
for (Map.Entry<String, InputStream> streamedChanges : handler.getStreamedPropertyChanges().entrySet()) {
final URI targetURI = currentStatus == AttachedEntityStatus.NEW
? URI.create("$" + startingPos) : URIUtils.getURI(
factory.getServiceRoot(),
CoreUtils.getMediaEditLink(streamedChanges.getKey(), entity).toASCIIString());
factory.getServiceRoot(),
CoreUtils.getMediaEditLink(streamedChanges.getKey(), entity).toASCIIString());
batchUpdateMediaResource(handler, targetURI, streamedChanges.getValue(), changeset);
@ -467,7 +465,7 @@ class ContainerImpl implements Container {
sourceURI = URI.create("$" + sourcePos);
}
for (EntityTypeInvocationHandler target : delayedUpdate.getTargets()) {
for (EntityInvocationHandler target : delayedUpdate.getTargets()) {
status = EntityContainerFactory.getContext().entityContext().getStatus(target);
final URI targetURI;
@ -492,11 +490,11 @@ class ContainerImpl implements Container {
private class TransactionItems {
private final List<EntityTypeInvocationHandler> keys = new ArrayList<EntityTypeInvocationHandler>();
private final List<EntityInvocationHandler> keys = new ArrayList<EntityInvocationHandler>();
private final List<Integer> values = new ArrayList<Integer>();
public EntityTypeInvocationHandler get(final Integer value) {
public EntityInvocationHandler get(final Integer value) {
if (value != null && values.contains(value)) {
return keys.get(values.indexOf(value));
} else {
@ -504,7 +502,7 @@ class ContainerImpl implements Container {
}
}
public Integer get(final EntityTypeInvocationHandler key) {
public Integer get(final EntityInvocationHandler key) {
if (key != null && keys.contains(key)) {
return values.get(keys.indexOf(key));
} else {
@ -512,14 +510,14 @@ class ContainerImpl implements Container {
}
}
public void remove(final EntityTypeInvocationHandler key) {
public void remove(final EntityInvocationHandler key) {
if (keys.contains(key)) {
values.remove(keys.indexOf(key));
keys.remove(key);
}
}
public void put(final EntityTypeInvocationHandler key, final Integer value) {
public void put(final EntityInvocationHandler key, final Integer value) {
// replace just in case of null current value; otherwise add the new entry
if (key != null && keys.contains(key) && values.get(keys.indexOf(key)) == null) {
remove(key);
@ -534,7 +532,7 @@ class ContainerImpl implements Container {
return sortedValues;
}
public boolean contains(final EntityTypeInvocationHandler key) {
public boolean contains(final EntityInvocationHandler key) {
return keys.contains(key);
}

View File

@ -113,13 +113,13 @@ public final class EntityContainerInvocationHandler extends AbstractInvocationHa
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {returnType},
SingletonInvocationHandler.getInstance(returnType, this));
SingletonInvocationHandler.getInstance(returnType, this, singleton.name()));
}
} else {
return Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {returnType},
EntitySetInvocationHandler.getInstance(returnType, this));
EntitySetInvocationHandler.getInstance(returnType, this, entitySet.name()));
}
throw new NoSuchMethodException(method.getName());

View File

@ -47,10 +47,12 @@ import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
import org.apache.olingo.ext.proxy.context.EntityUUID;
import org.apache.olingo.ext.proxy.utils.CoreUtils;
public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
public class EntityInvocationHandler extends AbstractStructuredInvocationHandler {
private static final long serialVersionUID = 2629912294765040037L;
private final URI entityURI;
protected Map<String, Object> propertyChanges = new HashMap<String, Object>();
protected Map<NavigationProperty, Object> linkChanges = new HashMap<NavigationProperty, Object>();
@ -65,41 +67,46 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
private EntityUUID uuid;
static EntityTypeInvocationHandler getInstance(
static EntityInvocationHandler getInstance(
final URI entityURI,
final CommonODataEntity entity,
final EntitySetInvocationHandler<?, ?, ?> entitySet,
final Class<?> typeRef) {
return getInstance(
entityURI,
entity,
entitySet.getEntitySetName(),
entitySet.getEntitySetURI(),
typeRef,
entitySet.containerHandler);
}
static EntityTypeInvocationHandler getInstance(
static EntityInvocationHandler getInstance(
final URI entityURI,
final CommonODataEntity entity,
final String entitySetName,
final URI entitySetURI,
final Class<?> typeRef,
final EntityContainerInvocationHandler containerHandler) {
return new EntityTypeInvocationHandler(entity, entitySetName, typeRef, containerHandler);
return new EntityInvocationHandler(entityURI, entity, entitySetURI, typeRef, containerHandler);
}
private EntityTypeInvocationHandler(
private EntityInvocationHandler(
final URI entityURI,
final CommonODataEntity entity,
final String entitySetName,
final URI entitySetURI,
final Class<?> typeRef,
final EntityContainerInvocationHandler containerHandler) {
super(containerHandler.getClient(), typeRef, (ODataLinked) entity, containerHandler);
this.entityURI = entityURI;
this.internal = entity;
getEntity().setMediaEntity(typeRef.getAnnotation(EntityType.class).hasStream());
this.uuid = new EntityUUID(
containerHandler.getEntityContainerName(),
entitySetName,
entitySetURI,
typeRef,
CoreUtils.getKey(client, typeRef, entity));
}
@ -110,7 +117,7 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
this.uuid = new EntityUUID(
getUUID().getContainerName(),
getUUID().getEntitySetName(),
getUUID().getEntitySetURI(),
getUUID().getType(),
CoreUtils.getKey(client, typeRef, entity));
@ -129,14 +136,18 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
return uuid.getContainerName();
}
public String getEntitySetName() {
return uuid.getEntitySetName();
public URI getEntitySetURI() {
return uuid.getEntitySetURI();
}
public final CommonODataEntity getEntity() {
return (CommonODataEntity) internal;
}
public URI getEntityURI() {
return entityURI;
}
/**
* Gets the current ETag defined into the wrapped entity.
*
@ -240,9 +251,9 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
for (Object item : coll) {
if (item instanceof Proxy) {
final InvocationHandler handler = Proxy.getInvocationHandler(item);
if ((handler instanceof ComplexTypeInvocationHandler)
&& ((ComplexTypeInvocationHandler) handler).getEntityHandler() == null) {
((ComplexTypeInvocationHandler) handler).setEntityHandler(this);
if ((handler instanceof ComplexInvocationHandler)
&& ((ComplexInvocationHandler) handler).getEntityHandler() == null) {
((ComplexInvocationHandler) handler).setEntityHandler(this);
}
}
}
@ -277,7 +288,6 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
}
public InputStream getStream() {
final URI contentSource = getEntity().getMediaContentSource();
if (this.stream == null
@ -297,7 +307,6 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
}
public Object getStreamedProperty(final Property property) {
InputStream res = streamedPropertyChanges.get(property.name());
try {
@ -334,7 +343,7 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
if (linkChanges.containsKey(property)) {
navPropValue = linkChanges.get(property);
} else {
navPropValue = retriveNavigationProperty(property, getter);
navPropValue = retrieveNavigationProperty(property, getter, containerHandler.getFactory().getServiceRoot());
}
if (navPropValue != null) {
@ -370,7 +379,7 @@ public class EntityTypeInvocationHandler extends AbstractTypeInvocationHandler {
@Override
public boolean equals(final Object obj) {
return obj instanceof EntityTypeInvocationHandler
&& ((EntityTypeInvocationHandler) obj).getUUID().equals(uuid);
return obj instanceof EntityInvocationHandler
&& ((EntityInvocationHandler) obj).getUUID().equals(uuid);
}
}

View File

@ -73,8 +73,6 @@ class EntitySetInvocationHandler<
*/
private static final Logger LOG = LoggerFactory.getLogger(EntitySetInvocationHandler.class);
private final String entitySetName;
private final boolean isSingleton;
private final Class<T> typeRef;
@ -85,28 +83,10 @@ class EntitySetInvocationHandler<
@SuppressWarnings({"rawtypes", "unchecked"})
static EntitySetInvocationHandler getInstance(
final Class<?> ref, final EntityContainerInvocationHandler containerHandler) {
final Class<?> ref, final EntityContainerInvocationHandler containerHandler, final String entitySetName) {
return new EntitySetInvocationHandler(ref, containerHandler, (ref.getAnnotation(EntitySet.class)).name());
}
@SuppressWarnings("unchecked")
protected EntitySetInvocationHandler(
final Class<?> ref,
final EntityContainerInvocationHandler containerHandler,
final String entitySetName) {
super(containerHandler.getClient(), containerHandler);
this.entitySetName = entitySetName;
this.isSingleton = AbstractSingleton.class.isAssignableFrom(ref);
final Type[] entitySetParams = ((ParameterizedType) ref.getGenericInterfaces()[0]).getActualTypeArguments();
this.typeRef = (Class<T>) entitySetParams[0];
this.collTypeRef = (Class<EC>) entitySetParams[2];
final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(containerHandler.getFactory().getServiceRoot());
final CommonURIBuilder<?> uriBuilder = containerHandler.getClient().
getURIBuilder(containerHandler.getFactory().getServiceRoot());
final StringBuilder entitySetSegment = new StringBuilder();
if (!containerHandler.isDefaultEntityContainer()) {
@ -115,7 +95,34 @@ class EntitySetInvocationHandler<
entitySetSegment.append(entitySetName);
uriBuilder.appendEntitySetSegment(entitySetSegment.toString());
this.uri = uriBuilder.build();
return new EntitySetInvocationHandler(ref, containerHandler, entitySetName, uriBuilder.build());
}
@SuppressWarnings({"rawtypes", "unchecked"})
static EntitySetInvocationHandler getInstance(
final Class<?> ref, final EntityContainerInvocationHandler containerHandler, final URI uri) {
return new EntitySetInvocationHandler(ref, containerHandler, (ref.getAnnotation(EntitySet.class)).name(), uri);
}
@SuppressWarnings("unchecked")
protected EntitySetInvocationHandler(
final Class<?> ref,
final EntityContainerInvocationHandler containerHandler,
final String entitySetName,
final URI uri) {
super(containerHandler.getClient(), containerHandler);
this.isSingleton = AbstractSingleton.class.isAssignableFrom(ref);
final Type[] entitySetParams = ((ParameterizedType) ref.getGenericInterfaces()[0]).getActualTypeArguments();
this.typeRef = (Class<T>) entitySetParams[0];
this.collTypeRef = (Class<EC>) entitySetParams[2];
this.uri = uri;
}
protected Class<T> getTypeRef() {
@ -126,11 +133,7 @@ class EntitySetInvocationHandler<
return collTypeRef;
}
protected String getEntitySetName() {
return entitySetName;
}
protected URI getURI() {
protected URI getEntitySetURI() {
return uri;
}
@ -155,8 +158,8 @@ class EntitySetInvocationHandler<
final CommonODataEntity entity = client.getObjectFactory().newEntity(
new FullQualifiedName(containerHandler.getSchemaName(), ClassUtils.getEntityTypeName(reference)));
final EntityTypeInvocationHandler handler =
EntityTypeInvocationHandler.getInstance(entity, entitySetName, reference, containerHandler);
final EntityInvocationHandler handler =
EntityInvocationHandler.getInstance(null, entity, uri, reference, containerHandler);
EntityContainerFactory.getContext().entityContext().attachNew(handler);
return (NE) Proxy.newProxyInstance(
@ -188,7 +191,7 @@ class EntitySetInvocationHandler<
try {
result = get(key) != null;
} catch (Exception e) {
LOG.error("Could not check existence of {}({})", this.entitySetName, key, e);
LOG.error("Could not check existence of {}({})", this.uri, key, e);
}
return result;
@ -230,10 +233,10 @@ class EntitySetInvocationHandler<
throw new IllegalArgumentException("Null key");
}
final EntityUUID uuid = new EntityUUID(containerHandler.getEntityContainerName(), entitySetName, typeRef, key);
final EntityUUID uuid = new EntityUUID(containerHandler.getEntityContainerName(), uri, typeRef, key);
LOG.debug("Ask for '{}({})'", typeRef.getSimpleName(), key);
EntityTypeInvocationHandler handler = EntityContainerFactory.getContext().entityContext().getEntity(uuid);
EntityInvocationHandler handler = EntityContainerFactory.getContext().entityContext().getEntity(uuid);
if (handler == null) {
// not yet attached: search against the service
@ -261,7 +264,7 @@ class EntitySetInvocationHandler<
throw new IllegalArgumentException("Invalid " + typeRef.getSimpleName() + "(" + key + ")");
}
handler = EntityTypeInvocationHandler.getInstance(entity, this, typeRef);
handler = EntityInvocationHandler.getInstance(uriBuilder.build(), entity, this, typeRef);
handler.setETag(etag);
} catch (Exception e) {
LOG.info("Entity '" + uuid + "' not found", e);
@ -301,9 +304,10 @@ class EntitySetInvocationHandler<
final List<S> items = new ArrayList<S>(entities.size());
for (CommonODataEntity entity : entities) {
final EntityTypeInvocationHandler handler = EntityTypeInvocationHandler.getInstance(entity, this, typeRef);
final EntityInvocationHandler handler =
EntityInvocationHandler.getInstance(entity.getEditLink(), entity, this, typeRef);
final EntityTypeInvocationHandler handlerInTheContext =
final EntityInvocationHandler handlerInTheContext =
EntityContainerFactory.getContext().entityContext().getEntity(handler.getUUID());
items.add((S) Proxy.newProxyInstance(
@ -396,16 +400,16 @@ class EntitySetInvocationHandler<
public void delete(final KEY key) throws IllegalArgumentException {
final EntityContext entityContext = EntityContainerFactory.getContext().entityContext();
EntityTypeInvocationHandler entity = entityContext.getEntity(new EntityUUID(
EntityInvocationHandler entity = entityContext.getEntity(new EntityUUID(
containerHandler.getEntityContainerName(),
entitySetName,
uri,
typeRef,
key));
if (entity == null) {
// search for entity
final T searched = get(key);
entity = (EntityTypeInvocationHandler) Proxy.getInvocationHandler(searched);
entity = (EntityInvocationHandler) Proxy.getInvocationHandler(searched);
entityContext.attach(entity, AttachedEntityStatus.DELETED);
} else {
entityContext.setStatus(entity, AttachedEntityStatus.DELETED);
@ -417,7 +421,7 @@ class EntitySetInvocationHandler<
final EntityContext entityContext = EntityContainerFactory.getContext().entityContext();
for (T en : entities) {
final EntityTypeInvocationHandler entity = (EntityTypeInvocationHandler) Proxy.getInvocationHandler(en);
final EntityInvocationHandler entity = (EntityInvocationHandler) Proxy.getInvocationHandler(en);
if (entityContext.isAttached(entity)) {
entityContext.setStatus(entity, AttachedEntityStatus.DELETED);
} else {
@ -426,7 +430,7 @@ class EntitySetInvocationHandler<
}
}
private boolean isDeleted(final EntityTypeInvocationHandler handler) {
private boolean isDeleted(final EntityInvocationHandler handler) {
return EntityContainerFactory.getContext().entityContext().getStatus(handler) == AttachedEntityStatus.DELETED;
}

View File

@ -55,7 +55,7 @@ class OperationInvocationHandler extends AbstractInvocationHandler implements Op
return new OperationInvocationHandler(containerHandler);
}
static OperationInvocationHandler getInstance(final EntityTypeInvocationHandler entityHandler) {
static OperationInvocationHandler getInstance(final EntityInvocationHandler entityHandler) {
return new OperationInvocationHandler(entityHandler);
}
@ -74,7 +74,7 @@ class OperationInvocationHandler extends AbstractInvocationHandler implements Op
this.serviceRoot = containerHandler.getFactory().getServiceRoot();
}
private OperationInvocationHandler(final EntityTypeInvocationHandler entityHandler) {
private OperationInvocationHandler(final EntityInvocationHandler entityHandler) {
super(entityHandler.getClient(), entityHandler.containerHandler);
this.target = entityHandler;
@ -128,7 +128,7 @@ class OperationInvocationHandler extends AbstractInvocationHandler implements Op
final Map.Entry<URI, EdmOperation> edmOperation;
if (target instanceof EntityContainerInvocationHandler) {
edmOperation = getUnboundOperation(operation, parameterNames);
} else if (target instanceof EntityTypeInvocationHandler) {
} else if (target instanceof EntityInvocationHandler) {
edmOperation = getBoundOperation(operation, parameterNames);
} else if (target instanceof EntityCollectionInvocationHandler) {
edmOperation = getCollectionBoundOperation(operation, parameterNames);
@ -161,7 +161,7 @@ class OperationInvocationHandler extends AbstractInvocationHandler implements Op
}
private Map.Entry<URI, EdmOperation> getBoundOperation(final Operation operation, final List<String> parameterNames) {
final CommonODataEntity entity = ((EntityTypeInvocationHandler) target).getEntity();
final CommonODataEntity entity = ((EntityInvocationHandler) target).getEntity();
ODataOperation boundOp = entity.getOperation(operation.name());
if (boundOp == null) {

View File

@ -22,7 +22,6 @@ import java.io.Serializable;
import java.lang.reflect.Method;
import org.apache.olingo.ext.proxy.api.AbstractEntityCollection;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;
import org.apache.olingo.ext.proxy.api.annotations.Singleton;
public class SingletonInvocationHandler<
T extends Serializable, KEY extends Serializable, EC extends AbstractEntityCollection<T>>
@ -33,18 +32,19 @@ public class SingletonInvocationHandler<
@SuppressWarnings({"rawtypes", "unchecked"})
static SingletonInvocationHandler getInstance(
final Class<?> ref, final EntityContainerInvocationHandler containerHandler) {
final Class<?> ref, final EntityContainerInvocationHandler containerHandler, final String singletonName) {
return new SingletonInvocationHandler(ref, containerHandler);
return new SingletonInvocationHandler(ref, containerHandler, singletonName);
}
private final EntitySetInvocationHandler<?, ?, ?> entitySetHandler;
@SuppressWarnings({"rawtypes", "unchecked"})
private SingletonInvocationHandler(final Class<?> ref, final EntityContainerInvocationHandler containerHandler) {
private SingletonInvocationHandler(
final Class<?> ref, final EntityContainerInvocationHandler containerHandler, final String singletonName) {
super(containerHandler.getClient(), containerHandler);
this.entitySetHandler =
new EntitySetInvocationHandler(ref, containerHandler, (ref.getAnnotation(Singleton.class)).name());
this.entitySetHandler = EntitySetInvocationHandler.getInstance(ref, containerHandler, singletonName);
}
@Override

View File

@ -18,20 +18,20 @@
*/
package org.apache.olingo.ext.proxy.context;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
public class AttachedEntity {
private final EntityTypeInvocationHandler entity;
private final EntityInvocationHandler entity;
private final AttachedEntityStatus status;
public AttachedEntity(final EntityTypeInvocationHandler entity, final AttachedEntityStatus status) {
public AttachedEntity(final EntityInvocationHandler entity, final AttachedEntityStatus status) {
this.entity = entity;
this.status = status;
}
public EntityTypeInvocationHandler getEntity() {
public EntityInvocationHandler getEntity() {
return entity;
}

View File

@ -24,7 +24,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
/**
* Entity context.
@ -36,16 +36,16 @@ public class EntityContext implements Iterable<AttachedEntity> {
* <br/>
* This map have to be used to search for entities by key.
*/
private final Map<EntityUUID, EntityTypeInvocationHandler> searchableEntities =
new HashMap<EntityUUID, EntityTypeInvocationHandler>();
private final Map<EntityUUID, EntityInvocationHandler> searchableEntities =
new HashMap<EntityUUID, EntityInvocationHandler>();
/**
* All attached entities (new entities included).
* <br/>
* Attachment order will be maintained.
*/
private final Map<EntityTypeInvocationHandler, AttachedEntityStatus> allAttachedEntities =
new LinkedHashMap<EntityTypeInvocationHandler, AttachedEntityStatus>();
private final Map<EntityInvocationHandler, AttachedEntityStatus> allAttachedEntities =
new LinkedHashMap<EntityInvocationHandler, AttachedEntityStatus>();
/**
* Attaches an entity with status <tt>NEW</tt>.
@ -55,7 +55,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @see AttachedEntityStatus
* @param entity entity to be attached.
*/
public void attachNew(final EntityTypeInvocationHandler entity) {
public void attachNew(final EntityInvocationHandler entity) {
if (allAttachedEntities.containsKey(entity)) {
throw new IllegalStateException("An entity with the same key has already been attached");
}
@ -70,7 +70,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @see AttachedEntityStatus
* @param entity entity to be attached.
*/
public void attach(final EntityTypeInvocationHandler entity) {
public void attach(final EntityInvocationHandler entity) {
attach(entity, AttachedEntityStatus.ATTACHED);
}
@ -83,7 +83,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @param entity entity to be attached.
* @param status status.
*/
public void attach(final EntityTypeInvocationHandler entity, final AttachedEntityStatus status) {
public void attach(final EntityInvocationHandler entity, final AttachedEntityStatus status) {
if (isAttached(entity)) {
throw new IllegalStateException("An entity with the same profile has already been attached");
}
@ -100,7 +100,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
*
* @param entity entity to be detached.
*/
public void detach(final EntityTypeInvocationHandler entity) {
public void detach(final EntityInvocationHandler entity) {
if (searchableEntities.containsKey(entity.getUUID())) {
searchableEntities.remove(entity.getUUID());
}
@ -123,7 +123,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @param uuid entity key.
* @return retrieved entity.
*/
public EntityTypeInvocationHandler getEntity(final EntityUUID uuid) {
public EntityInvocationHandler getEntity(final EntityUUID uuid) {
return searchableEntities.get(uuid);
}
@ -133,7 +133,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @param entity entity to be retrieved.
* @return attached entity status.
*/
public AttachedEntityStatus getStatus(final EntityTypeInvocationHandler entity) {
public AttachedEntityStatus getStatus(final EntityInvocationHandler entity) {
if (!isAttached(entity)) {
throw new IllegalStateException("Entity is not in the context");
}
@ -147,7 +147,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @param entity attached entity to be modified.
* @param status new status.
*/
public void setStatus(final EntityTypeInvocationHandler entity, final AttachedEntityStatus status) {
public void setStatus(final EntityInvocationHandler entity, final AttachedEntityStatus status) {
if (!isAttached(entity)) {
throw new IllegalStateException("Entity is not in the context");
}
@ -177,7 +177,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
* @param entity entity.
* @return <tt>true</tt> if is attached; <tt>false</tt> otherwise.
*/
public boolean isAttached(final EntityTypeInvocationHandler entity) {
public boolean isAttached(final EntityInvocationHandler entity) {
return allAttachedEntities.containsKey(entity)
|| (entity.getUUID().getKey() != null && searchableEntities.containsKey(entity.getUUID()));
}
@ -190,7 +190,7 @@ public class EntityContext implements Iterable<AttachedEntity> {
@Override
public Iterator<AttachedEntity> iterator() {
final List<AttachedEntity> res = new ArrayList<AttachedEntity>();
for (Map.Entry<EntityTypeInvocationHandler, AttachedEntityStatus> attachedEntity : allAttachedEntities.
for (Map.Entry<EntityInvocationHandler, AttachedEntityStatus> attachedEntity : allAttachedEntities.
entrySet()) {
res.add(new AttachedEntity(attachedEntity.getKey(), attachedEntity.getValue()));
}

View File

@ -26,7 +26,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.olingo.commons.api.domain.ODataLinkType;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
public class EntityLinkDesc implements Serializable {
@ -34,16 +34,16 @@ public class EntityLinkDesc implements Serializable {
private final String sourceName;
private final EntityTypeInvocationHandler source;
private final EntityInvocationHandler source;
private final Collection<EntityTypeInvocationHandler> targets;
private final Collection<EntityInvocationHandler> targets;
private final ODataLinkType type;
public EntityLinkDesc(
final String sourceName,
final EntityTypeInvocationHandler source,
final Collection<EntityTypeInvocationHandler> target,
final EntityInvocationHandler source,
final Collection<EntityInvocationHandler> target,
final ODataLinkType type) {
this.sourceName = sourceName;
this.source = source;
@ -53,12 +53,12 @@ public class EntityLinkDesc implements Serializable {
public EntityLinkDesc(
final String sourceName,
final EntityTypeInvocationHandler source,
final EntityTypeInvocationHandler target,
final EntityInvocationHandler source,
final EntityInvocationHandler target,
final ODataLinkType type) {
this.sourceName = sourceName;
this.source = source;
this.targets = Collections.<EntityTypeInvocationHandler>singleton(target);
this.targets = Collections.<EntityInvocationHandler>singleton(target);
this.type = type;
}
@ -66,11 +66,11 @@ public class EntityLinkDesc implements Serializable {
return sourceName;
}
public EntityTypeInvocationHandler getSource() {
public EntityInvocationHandler getSource() {
return source;
}
public Collection<EntityTypeInvocationHandler> getTargets() {
public Collection<EntityInvocationHandler> getTargets() {
return targets;
}

View File

@ -19,6 +19,7 @@
package org.apache.olingo.ext.proxy.context;
import java.io.Serializable;
import java.net.URI;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
@ -32,7 +33,7 @@ public class EntityUUID implements Serializable {
private final String containerName;
private final String entitySetName;
private final URI entitySetURI;
private final Object key;
@ -43,13 +44,13 @@ public class EntityUUID implements Serializable {
private Class<?> type;
public EntityUUID(final String containerName, final String entitySetName, final Class<?> type) {
this(containerName, entitySetName, type, null);
public EntityUUID(final String containerName, final URI entitySetURI, final Class<?> type) {
this(containerName, entitySetURI, type, null);
}
public EntityUUID(final String containerName, final String entitySetName, final Class<?> type, final Object key) {
public EntityUUID(final String containerName, final URI entitySetURI, final Class<?> type, final Object key) {
this.containerName = containerName;
this.entitySetName = entitySetName;
this.entitySetURI = entitySetURI;
this.key = key;
this.tempKey = (int) (Math.random() * 1000000);
@ -70,8 +71,8 @@ public class EntityUUID implements Serializable {
return containerName;
}
public String getEntitySetName() {
return entitySetName;
public URI getEntitySetURI() {
return entitySetURI;
}
public Object getKey() {

View File

@ -60,9 +60,9 @@ import org.apache.olingo.ext.proxy.api.annotations.EnumType;
import org.apache.olingo.ext.proxy.api.annotations.Key;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
import org.apache.olingo.ext.proxy.api.annotations.Property;
import org.apache.olingo.ext.proxy.commons.AbstractTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.ComplexTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.AbstractStructuredInvocationHandler;
import org.apache.olingo.ext.proxy.commons.ComplexInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -112,10 +112,10 @@ public final class CoreUtils {
} else {
objHandler = obj;
}
if (objHandler instanceof ComplexTypeInvocationHandler) {
value = ((ComplexTypeInvocationHandler) objHandler).getComplex();
if (objHandler instanceof ComplexInvocationHandler) {
value = ((ComplexInvocationHandler) objHandler).getComplex();
final Class<?> typeRef = ((ComplexTypeInvocationHandler) objHandler).getTypeRef();
final Class<?> typeRef = ((ComplexInvocationHandler) objHandler).getTypeRef();
for (Method method : typeRef.getMethods()) {
final Property propAnn = method.getAnnotation(Property.class);
if (propAnn != null) {
@ -385,8 +385,8 @@ public final class CoreUtils {
final Class<?> typeRef;
if (bean instanceof Proxy) {
final InvocationHandler handler = Proxy.getInvocationHandler(bean);
if (handler instanceof AbstractTypeInvocationHandler) {
typeRef = ((ComplexTypeInvocationHandler) handler).getTypeRef();
if (handler instanceof AbstractStructuredInvocationHandler) {
typeRef = ((ComplexInvocationHandler) handler).getTypeRef();
} else {
throw new IllegalStateException("Invalid bean " + bean);
}
@ -425,7 +425,7 @@ public final class CoreUtils {
final Object complex = Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {getter.getReturnType()},
ComplexTypeInvocationHandler.getInstance(
ComplexInvocationHandler.getInstance(
client, property.getName(), getter.getReturnType(), null));
populate(client, complex, Property.class, property.getValue().asComplex().iterator());
@ -450,7 +450,7 @@ public final class CoreUtils {
final Object collItem = Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {collItemClass},
ComplexTypeInvocationHandler.getInstance(
ComplexInvocationHandler.getInstance(
client, property.getName(), collItemClass, null));
populate(client, collItem, Property.class, value.asComplex().iterator());
@ -471,7 +471,7 @@ public final class CoreUtils {
final CommonEdmEnabledODataClient<?> client,
final CommonODataProperty property,
final Type typeRef,
final EntityTypeInvocationHandler entityHandler)
final EntityInvocationHandler entityHandler)
throws InstantiationException, IllegalAccessException {
Class<?> internalRef;
@ -495,7 +495,7 @@ public final class CoreUtils {
res = Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {internalRef},
ComplexTypeInvocationHandler.getInstance(
ComplexInvocationHandler.getInstance(
client, property.getValue().asComplex(), internalRef, entityHandler));
} else if (property.hasCollectionValue()) {
final ArrayList<Object> collection = new ArrayList<Object>();
@ -510,7 +510,7 @@ public final class CoreUtils {
final Object collItem = Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class<?>[] {internalRef},
ComplexTypeInvocationHandler.getInstance(
ComplexInvocationHandler.getInstance(
client, value.asComplex(), internalRef, entityHandler));
collection.add(collItem);

View File

@ -44,6 +44,7 @@ import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmEntitySet;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.api.edm.EdmEnumType;
import org.apache.olingo.commons.api.edm.EdmNavigationProperty;
import org.apache.olingo.commons.api.edm.EdmSchema;
import org.apache.olingo.commons.api.edm.EdmSingleton;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
@ -267,6 +268,20 @@ public abstract class AbstractPOJOGenMojo extends AbstractMojo {
objs.clear();
objs.put("complexType", complex);
parseObj(typesBaseDir, typesPkg, "complexType", className + ".java", objs);
for (String navPropName : complex.getNavigationPropertyNames()) {
final EdmNavigationProperty navProp = complex.getNavigationProperty(navPropName);
if ((complex.getBaseType() == null
|| edm.getEntityType(complex.getBaseType().getFullQualifiedName()).
getNavigationProperty(navPropName) == null)
&& navProp.containsTarget()) {
objs.clear();
objs.put("navProp", navProp);
parseObj(base, pkg, "containedEntitySet",
utility.capitalize(navProp.getName()) + ".java", objs);
}
}
}
for (EdmEntityType entity : schema.getEntityTypes()) {
@ -304,6 +319,20 @@ public abstract class AbstractPOJOGenMojo extends AbstractMojo {
utility.capitalize(entity.getName()) + ".java", objs);
parseObj(typesBaseDir, typesPkg, "entityCollection",
utility.capitalize(entity.getName()) + "Collection.java", objs);
for (String navPropName : entity.getNavigationPropertyNames()) {
final EdmNavigationProperty navProp = entity.getNavigationProperty(navPropName);
if ((entity.getBaseType() == null
|| edm.getEntityType(entity.getBaseType().getFullQualifiedName()).
getNavigationProperty(navPropName) == null)
&& navProp.containsTarget()) {
objs.clear();
objs.put("navProp", navProp);
parseObj(base, pkg, "containedEntitySet",
utility.capitalize(navProp.getName()) + ".java", objs);
}
}
}
// write container and top entity sets into the base package

View File

@ -69,7 +69,7 @@ public abstract class AbstractUtility {
protected final String namespace;
private final Edm metadata;
private final Edm edm;
private final EdmSchema schema;
@ -79,35 +79,43 @@ public abstract class AbstractUtility {
this.basePackage = basePackage;
this.schemaName = schema.getAlias();
this.namespace = schema.getNamespace();
this.metadata = metadata;
this.edm = metadata;
this.schema = schema;
collectEntityTypes();
}
public EdmTypeInfo getEdmTypeInfo(final EdmType type) {
return new EdmTypeInfo.Builder().setEdm(metadata).
return new EdmTypeInfo.Builder().setEdm(edm).
setTypeExpression(type.getFullQualifiedName().toString()).build();
}
public EdmTypeInfo getEdmTypeInfo(final String expression) {
return new EdmTypeInfo.Builder().setEdm(metadata).setTypeExpression(expression).build();
return new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(expression).build();
}
public EdmTypeInfo getEdmType(final EdmSingleton singleton) {
return getEdmTypeInfo(singleton.getEntityType().getFullQualifiedName().toString());
}
public EdmTypeInfo getEdmType(final EdmNavigationProperty navProp) {
return getEdmTypeInfo(navProp.getType().getFullQualifiedName().toString());
}
public boolean isComplex(final FullQualifiedName fqn) {
return metadata.getComplexType(fqn) != null;
return edm.getComplexType(fqn) != null;
}
public Map<String, String> getEntityKeyType(final EdmSingleton singleton) {
return getEntityKeyType(singleton.getEntityType());
}
public Map<String, String> getEntityKeyType(final EdmNavigationProperty navProp) {
return getEntityKeyType(navProp.getType());
}
protected Edm getMetadata() {
return metadata;
return edm;
}
protected EdmSchema getSchema() {
@ -120,8 +128,9 @@ public abstract class AbstractUtility {
public NavPropertyBindingDetails getNavigationBindingDetails(
final EdmStructuredType sourceEntityType, final EdmNavigationProperty property) {
if (property.containsTarget()) {
return new NavPropertyContainsTarget(metadata, property.getType());
return new NavPropertyContainsTarget(edm, property.getType());
}
try {
@ -138,7 +147,7 @@ public abstract class AbstractUtility {
}
try {
return new NavPropertyBindingDetails(metadata, type);
return new NavPropertyBindingDetails(edm, type);
} catch (IllegalStateException ignore) {
return getNavigationBindings(type.getBaseType());
}
@ -152,14 +161,20 @@ public abstract class AbstractUtility {
}
try {
return new NavPropertyBindingDetails(metadata, sourceEntityType, property);
return new NavPropertyBindingDetails(edm, sourceEntityType, property);
} catch (IllegalStateException ignore) {
return getNavigationBindingDetails(sourceEntityType.getBaseType(), property);
}
}
public String getContainedEntitySet(final EdmNavigationProperty navProp) {
return new StringBuilder().append(basePackage).append('.').
append(navProp.getType().getFullQualifiedName().getNamespace().toLowerCase()). // namespace
append('.').append(capitalize(navProp.getName())).toString();
}
public EdmFunction getFunctionByName(final FullQualifiedName name) {
final EdmSchema targetSchema = metadata.getSchema(name.getNamespace());
final EdmSchema targetSchema = edm.getSchema(name.getNamespace());
if (targetSchema != null) {
for (EdmFunction function : targetSchema.getFunctions()) {
@ -173,7 +188,7 @@ public abstract class AbstractUtility {
}
public EdmAction getActionByName(final FullQualifiedName name) {
final EdmSchema targetSchema = metadata.getSchema(name.getNamespace());
final EdmSchema targetSchema = edm.getSchema(name.getNamespace());
if (targetSchema != null) {
for (EdmAction action : targetSchema.getActions()) {
@ -305,7 +320,7 @@ public abstract class AbstractUtility {
if (edmType.isEntityType()) {
res.append("Collection");
} else {
res.append(">");
res.append('>');
}
}

View File

@ -23,12 +23,12 @@ import org.apache.olingo.commons.api.edm.EdmEntityType;
public class NavPropertyContainsTarget extends NavPropertyBindingDetails {
public NavPropertyContainsTarget(final Edm edm, final EdmEntityType type) {
super();
this.edm = edm;
this.entitySet = null;
this.container = null;
this.type = type;
schema = edm.getSchema(type.getNamespace());
}
public NavPropertyContainsTarget(final Edm edm, final EdmEntityType type) {
super();
this.edm = edm;
this.entitySet = null;
this.container = null;
this.type = type;
schema = edm.getSchema(type.getNamespace());
}
}

View File

@ -0,0 +1,65 @@
#*
* 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 ${package};
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
#foreach($ns in $namespaces)
import ${basePackage}.${ns}.*;
import ${basePackage}.${ns}.types.*;
#end
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;
#set( $keys = $utility.getEntityKeyType($navProp) )
#if( $keys.size() > 1 )
#set( $type = $utility.getEdmType($navProp).EntityType.Name + "Key" )
#elseif( $keys.size() == 1 )
#set( $type = $keys.values().iterator().next() )
#else
#set( $type = "" )
#end
@EntitySet(name = "$navProp.Name", contained = true)
public interface $utility.capitalize($navProp.Name)
extends AbstractEntitySet<$utility.getJavaType($navProp.Type), $type, $utility.getJavaType($navProp.Type)Collection> {
#foreach( $dos in $utility.getDescendantsOrSelf($utility.getEdmType($navProp)) )
#set( $djt = $utility.getJavaType($dos) )
#set( $sIdx = $djt.lastIndexOf('.') + 1 )
$djt new$djt.substring($sIdx)();
${djt}Collection new$djt.substring($sIdx)Collection();
#end
}

View File

@ -56,7 +56,6 @@ public interface $utility.capitalize($container.Name) extends Container {
#foreach($entitySet in $container.EntitySets)
$utility.capitalize($entitySet.Name) get$utility.capitalize($entitySet.Name)();
#end
#parse( "${odataVersion}/container.vm" )

View File

@ -52,7 +52,7 @@ import javax.xml.datatype.Duration;
#set( $type = "" )
#end
#parse( "${odataVersion}/entitySet.vm" )
@EntitySet(name = "$entitySet.Name")
public interface $utility.capitalize($entitySet.Name)
extends AbstractEntitySet<$utility.getJavaType($entitySet.EntityType), $type, $utility.getJavaType($entitySet.EntityType)Collection> {

View File

@ -95,7 +95,7 @@ public interface $utility.capitalize($entityType.Name)
fcKeepInContent = #if($fcprops.containsKey("fcKeepInContent"))$fcprops.get("fcKeepInContent")#{else}false#end)
$utility.getJavaType($property.Type, $property.Collection) get$utility.capitalize($property.Name)();
void set$utility.capitalize($property.Name)(final $utility.getJavaType($property.Type, $property.Collection) _$utility.uncapitalize($property.Name));
void set$utility.capitalize($property.Name)($utility.getJavaType($property.Type, $property.Collection) _$utility.uncapitalize($property.Name));
#if($utility.isComplex($property.Type.FullQualifiedName))#*
*##set( $adding = $complexProps.add($property) )
#end
@ -104,18 +104,24 @@ public interface $utility.capitalize($entityType.Name)
#foreach($propertyName in $entityType.NavigationPropertyNames)
#set($property = $entityType.getNavigationProperty($propertyName))
#set( $type = $utility.getNavigationType($property) )
#set( $binding = $utility.getNavigationBindingDetails($entityType, $property) )
#set($type = $utility.getNavigationType($property))
#set($binding = $utility.getNavigationBindingDetails($entityType, $property))
@NavigationProperty(name = "$property.Name",
type = "$type",
targetSchema = "$binding.Schema.Namespace",
targetContainer = "#if($binding.Container)$binding.Container.Name#end",
targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end")
$utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end",
containsTarget = $property.containsTarget())
#if($property.containsTarget() && $property.Collection)#*
*#$utility.getContainedEntitySet($property) get$utility.capitalize($property.Name)();
void set$utility.capitalize($property.Name)(final $utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
void set$utility.capitalize($property.Name)($utility.getContainedEntitySet($property) _$utility.uncapitalize($property.Name));
#else#*
*#$utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
void set$utility.capitalize($property.Name)($utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
#end
#end
#if($entityType.hasStream())

View File

@ -60,7 +60,7 @@ public class $keyRef extends AbstractEntityKey {
return _$utility.uncapitalize($entry.getKey());
}
public void set$utility.capitalize($entry.getKey())(final $entry.getValue() _$utility.uncapitalize($entry.getKey())) {
public void set$utility.capitalize($entry.getKey())($entry.getValue() _$utility.uncapitalize($entry.getKey())) {
this._$utility.uncapitalize($entry.getKey()) = _$utility.uncapitalize($entry.getKey());
}#*
*##set ( $count = $count + 1 )

View File

@ -28,7 +28,7 @@ public interface $utility.capitalize($complexType.Name)
@Property(name = "$property.Name", type = "$property.Type.FullQualifiedName.toString()", nullable = $property.Nullable)
$utility.getJavaType($property.Type, $property.Collection) get$utility.capitalize($property.Name)();
void set$utility.capitalize($property.Name)(final $utility.getJavaType($property.Type, $property.Collection) _$utility.uncapitalize($property.Name));
void set$utility.capitalize($property.Name)($utility.getJavaType($property.Type, $property.Collection) _$utility.uncapitalize($property.Name));
#if($utility.isComplex($property.Type.FullQualifiedName))#*
*##set( $adding = $complexProps.add($property) )

View File

@ -1,19 +0,0 @@
#*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*#
@EntitySet(name = "$entitySet.Name")

View File

@ -41,7 +41,7 @@ public interface $utility.capitalize($complexType.Name)
srid = "#if($property.getSRID())$property.getSRID()#end")
$utility.getJavaType($property.Type, $property.Collection) get$utility.capitalize($property.Name)();
void set$utility.capitalize($property.Name)(final $utility.getJavaType($property.Type, $property.Collection) _$utility.uncapitalize($property.Name));
void set$utility.capitalize($property.Name)($utility.getJavaType($property.Type, $property.Collection) _$utility.uncapitalize($property.Name));
#if($utility.isComplex($property.Type.FullQualifiedName))#*
*##set( $adding = $complexProps.add($property) )
@ -61,7 +61,7 @@ public interface $utility.capitalize($complexType.Name)
targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end")
$utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
void set$utility.capitalize($property.Name)(final $utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
void set$utility.capitalize($property.Name)($utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
#end

View File

@ -1,19 +0,0 @@
#*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*#
@EntitySet(name = "$entitySet.Name", includeInServiceDocument = $entitySet.IncludeInServiceDocument)

View File

@ -0,0 +1,16 @@
{
"@odata.context": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/$metadata#Accounts(101)/MyPaymentInstruments/$entity",
"@odata.type": "#Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument",
"@odata.id": "Accounts(101)/MyPaymentInstruments(101902)",
"@odata.editLink": "Accounts(101)/MyPaymentInstruments(101902)",
"PaymentInstrumentID": 101902,
"FriendlyName": "101 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(101)/MyPaymentInstruments(101902)/TheStoredPI/$ref",
"TheStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(101)/MyPaymentInstruments(101902)/TheStoredPI",
"BillingStatements@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(101)/MyPaymentInstruments(101902)/BillingStatements/$ref",
"BillingStatements@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(101)/MyPaymentInstruments(101902)/BillingStatements",
"BackupStoredPI@odata.associationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(101)/MyPaymentInstruments(101902)/BackupStoredPI/$ref",
"BackupStoredPI@odata.navigationLink": "http://localhost:${cargo.servlet.port}/stub/StaticService/V40/Static.svc/Accounts(101)/MyPaymentInstruments(101902)/BackupStoredPI"
}

View File

@ -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(101)/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(101)/MyPaymentInstruments(101902)/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(101)/MyPaymentInstruments(101902)/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(101)/MyPaymentInstruments(101902)/BackupStoredPI"/>
<id/>
<title/>
<updated>2014-04-14T12:47:37Z</updated>
<author>
<name/>
</author>
<content type="application/xml">
<m:properties>
<d:PaymentInstrumentID m:type="Int32">101902</d:PaymentInstrumentID>
<d:FriendlyName>101 first PI</d:FriendlyName>
<d:CreatedDate m:type="DateTimeOffset">2014-04-09T00:00:00Z</d:CreatedDate>
</m:properties>
</content>
</entry>

View File

@ -34,7 +34,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.olingo.ext.proxy.api.annotations.NavigationProperty;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import org.apache.olingo.ext.proxy.context.AttachedEntityStatus;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.types.
ContactDetails;
@ -62,10 +62,10 @@ public class ContextTestITCase extends AbstractTestITCase {
final Customer customer1 = container.getCustomer().newCustomer();
final Customer customer2 = container.getCustomer().newCustomer();
final EntityTypeInvocationHandler source1 =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer1);
final EntityTypeInvocationHandler source2 =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer2);
final EntityInvocationHandler source1 =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer1);
final EntityInvocationHandler source2 =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer2);
assertTrue(entityContext.isAttached(source1));
assertTrue(entityContext.isAttached(source2));
@ -85,12 +85,12 @@ public class ContextTestITCase extends AbstractTestITCase {
final Customer customer2 = container.getCustomer().get(-9);
final Customer customer3 = container.getCustomer().get(-10);
final EntityTypeInvocationHandler source1 =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer1);
final EntityTypeInvocationHandler source2 =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer2);
final EntityTypeInvocationHandler source3 =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer3);
final EntityInvocationHandler source1 =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer1);
final EntityInvocationHandler source2 =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer2);
final EntityInvocationHandler source3 =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer3);
assertFalse(entityContext.isAttached(source1));
assertFalse(entityContext.isAttached(source2));
@ -133,10 +133,10 @@ public class ContextTestITCase extends AbstractTestITCase {
assertNotNull(customer.getInfo());
final EntityTypeInvocationHandler source =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityTypeInvocationHandler target =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customerInfo);
final EntityInvocationHandler source =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityInvocationHandler target =
(EntityInvocationHandler) Proxy.getInvocationHandler(customerInfo);
assertTrue(entityContext.isAttached(source));
assertEquals(AttachedEntityStatus.NEW, entityContext.getStatus(source));
@ -160,10 +160,10 @@ public class ContextTestITCase extends AbstractTestITCase {
assertNotNull(customer.getInfo());
final EntityTypeInvocationHandler source =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityTypeInvocationHandler target =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customerInfo);
final EntityInvocationHandler source =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityInvocationHandler target =
(EntityInvocationHandler) Proxy.getInvocationHandler(customerInfo);
assertTrue(entityContext.isAttached(source));
assertEquals(AttachedEntityStatus.CHANGED, entityContext.getStatus(source));
@ -187,10 +187,10 @@ public class ContextTestITCase extends AbstractTestITCase {
assertNotNull(customer.getInfo());
final EntityTypeInvocationHandler source =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityTypeInvocationHandler target =
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(customerInfo);
final EntityInvocationHandler source =
(EntityInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityInvocationHandler target =
(EntityInvocationHandler) Proxy.getInvocationHandler(customerInfo);
assertTrue(entityContext.isAttached(source));
assertEquals(AttachedEntityStatus.CHANGED, entityContext.getStatus(source));
@ -218,14 +218,14 @@ public class ContextTestITCase extends AbstractTestITCase {
assertNotNull(customer.getOrders());
assertEquals(3, customer.getOrders().size());
final EntityTypeInvocationHandler source = (EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityInvocationHandler source = (EntityInvocationHandler) Proxy.getInvocationHandler(customer);
assertTrue(entityContext.isAttached(source));
assertEquals(AttachedEntityStatus.NEW, entityContext.getStatus(source));
assertEquals(3, ((Collection) (source.getLinkChanges().entrySet().iterator().next().getValue())).size());
for (Order order : toBeLinked) {
final EntityTypeInvocationHandler target = (EntityTypeInvocationHandler) Proxy.getInvocationHandler(order);
final EntityInvocationHandler target = (EntityInvocationHandler) Proxy.getInvocationHandler(order);
assertTrue(entityContext.isAttached(target));
assertEquals(AttachedEntityStatus.NEW, entityContext.getStatus(target));
@ -237,7 +237,7 @@ public class ContextTestITCase extends AbstractTestITCase {
assertFalse(entityContext.isAttached(source));
for (Order order : toBeLinked) {
assertFalse(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(order)));
assertFalse(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(order)));
}
}
@ -263,7 +263,7 @@ public class ContextTestITCase extends AbstractTestITCase {
assertEquals(2, customer.getBackupContactInfo().iterator().next().getAlternativeNames().size());
assertTrue(customer.getBackupContactInfo().iterator().next().getAlternativeNames().contains("alternative4"));
final EntityTypeInvocationHandler source = (EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer);
final EntityInvocationHandler source = (EntityInvocationHandler) Proxy.getInvocationHandler(customer);
assertTrue(entityContext.isAttached(source));
assertEquals(AttachedEntityStatus.NEW, entityContext.getStatus(source));
@ -320,7 +320,7 @@ public class ContextTestITCase extends AbstractTestITCase {
public void checkContextInCaseOfErrors() {
final Login login = container.getLogin().newLogin();
final EntityTypeInvocationHandler handler = (EntityTypeInvocationHandler) Proxy.getInvocationHandler(login);
final EntityInvocationHandler handler = (EntityInvocationHandler) Proxy.getInvocationHandler(login);
assertTrue(entityContext.isAttached(handler));
@ -387,18 +387,18 @@ public class ContextTestITCase extends AbstractTestITCase {
customer.setPrimaryContactInfo(cd);
customer.setBackupContactInfo(Collections.<ContactDetails>singletonList(bcd));
assertTrue(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(customerInfo)));
assertTrue(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer)));
assertTrue(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(customerInfo)));
assertTrue(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(customer)));
for (Order linked : toBeLinked) {
assertTrue(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(linked)));
assertTrue(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(linked)));
}
container.flush();
assertFalse(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(customerInfo)));
assertFalse(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer)));
assertFalse(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(customerInfo)));
assertFalse(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(customer)));
for (Order linked : toBeLinked) {
assertFalse(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(linked)));
assertFalse(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(linked)));
}
assertEquals("some new info ...", container.getCustomerInfo().get(16).getInformation());
@ -406,22 +406,22 @@ public class ContextTestITCase extends AbstractTestITCase {
container.getOrder().delete(toBeLinked);
container.getCustomer().delete(customer.getCustomerId());
assertTrue(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer)));
assertTrue(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(customer)));
for (Order linked : toBeLinked) {
assertTrue(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(linked)));
assertTrue(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(linked)));
}
container.flush();
assertFalse(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(customer)));
assertFalse(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(customer)));
for (Order linked : toBeLinked) {
assertFalse(entityContext.isAttached((EntityTypeInvocationHandler) Proxy.getInvocationHandler(linked)));
assertFalse(entityContext.isAttached((EntityInvocationHandler) Proxy.getInvocationHandler(linked)));
}
}
private void checkUnlink(
final String sourceName,
final EntityTypeInvocationHandler source) {
final EntityInvocationHandler source) {
boolean found = false;
for (Map.Entry<NavigationProperty, Object> property : source.getLinkChanges().entrySet()) {
@ -434,8 +434,8 @@ public class ContextTestITCase extends AbstractTestITCase {
private void checkLink(
final String sourceName,
final EntityTypeInvocationHandler source,
final EntityTypeInvocationHandler target,
final EntityInvocationHandler source,
final EntityInvocationHandler target,
final boolean isCollection) {
boolean found = false;
@ -444,13 +444,13 @@ public class ContextTestITCase extends AbstractTestITCase {
if (isCollection) {
found = false;
for (Object proxy : (Collection) property.getValue()) {
if (target.equals((EntityTypeInvocationHandler) Proxy.getInvocationHandler(proxy))) {
if (target.equals((EntityInvocationHandler) Proxy.getInvocationHandler(proxy))) {
found = true;
}
}
} else {
found = target.equals(
(EntityTypeInvocationHandler) Proxy.getInvocationHandler(property.getValue()));
(EntityInvocationHandler) Proxy.getInvocationHandler(property.getValue()));
}
}
}
@ -459,9 +459,9 @@ public class ContextTestITCase extends AbstractTestITCase {
private void checkUnidirectional(
final String sourceName,
final EntityTypeInvocationHandler source,
final EntityInvocationHandler source,
final String targetName,
final EntityTypeInvocationHandler target,
final EntityInvocationHandler target,
final boolean isCollection) {
checkLink(sourceName, source, target, isCollection);

View File

@ -32,7 +32,7 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.edm.geo.Geospatial.Type;
import org.apache.olingo.commons.api.edm.geo.MultiLineString;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
DefaultContainer;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
@ -212,7 +212,7 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
public void checkForETag() {
Product product = getContainer().getProduct().get(-10);
assertTrue(StringUtils.isNotBlank(
((EntityTypeInvocationHandler) Proxy.getInvocationHandler(product)).getETag()));
((EntityInvocationHandler) Proxy.getInvocationHandler(product)).getETag()));
}
@Test

View File

@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
import java.lang.reflect.Proxy;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
types.ConcurrencyInfo;
import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice.
@ -113,7 +113,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
@Test
public void concurrentModification() {
Product product = container.getProduct().get(-10);
final String etag = ((EntityTypeInvocationHandler) Proxy.getInvocationHandler(product)).getETag();
final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(product)).getETag();
assertTrue(StringUtils.isNotBlank(etag));
final String baseConcurrency = String.valueOf(System.currentTimeMillis());

View File

@ -26,6 +26,10 @@ import java.util.Calendar;
import java.util.Collections;
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.CompanyAddress;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
CreditCardPI;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
CreditCardPICollection;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
CustomerCollection;
@ -36,12 +40,19 @@ public class DerivedTypeTestITCase extends AbstractTestITCase {
@Test
public void read() {
CustomerCollection customers = container.getPeople().getAll(CustomerCollection.class);
final CustomerCollection customers = container.getPeople().getAll(CustomerCollection.class);
assertNotNull(customers);
for (Customer customer : customers) {
assertTrue(customer instanceof Customer);
}
final CreditCardPICollection creditCards = container.getAccounts().get(101).
getMyPaymentInstruments().getAll(CreditCardPICollection.class);
assertNotNull(creditCards);
for (CreditCardPI creditCard : creditCards) {
assertTrue(creditCard instanceof CreditCardPI);
}
}
@Test

View File

@ -28,6 +28,7 @@ import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.TimeZone;
import org.apache.commons.lang3.RandomUtils;
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.Color;
@ -37,6 +38,10 @@ import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.service
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
PaymentInstrument;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
PaymentInstrumentCollection;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetail;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
@ -267,4 +272,32 @@ public class EntityCreateTestITCase extends AbstractTestITCase {
assertEquals("Latte", product.getName());
assertEquals(12, product.getDetails().iterator().next().getProductDetailID(), 0);
}
@Test
public void contained() {
PaymentInstrumentCollection instruments = container.getAccounts().get(101).getMyPaymentInstruments().getAll();
final int sizeBefore = instruments.size();
final PaymentInstrument instrument = container.getAccounts().get(101).
getMyPaymentInstruments().newPaymentInstrument();
final int id = RandomUtils.nextInt(101999, 105000);
instrument.setPaymentInstrumentID(id);
instrument.setFriendlyName("New one");
instrument.setCreatedDate(Calendar.getInstance());
container.flush();
instruments = container.getAccounts().get(101).getMyPaymentInstruments().getAll();
final int sizeAfter = instruments.size();
assertEquals(sizeBefore + 1, sizeAfter);
container.getAccounts().get(101).getMyPaymentInstruments().delete(id);
container.flush();
instruments = container.getAccounts().get(101).getMyPaymentInstruments().getAll();
final int sizeEnd = instruments.size();
assertEquals(sizeBefore, sizeEnd);
}
}

View File

@ -28,7 +28,7 @@ import java.lang.reflect.Proxy;
import java.util.Calendar;
import java.util.TimeZone;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address;
@ -43,6 +43,8 @@ import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.service
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
PaymentInstrument;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
PersonCollection;
@ -158,6 +160,14 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase {
@Test
public void checkForETag() {
final Order order = getContainer().getOrders().get(8);
assertTrue(StringUtils.isNotBlank(((EntityTypeInvocationHandler) Proxy.getInvocationHandler(order)).getETag()));
assertTrue(StringUtils.isNotBlank(((EntityInvocationHandler) Proxy.getInvocationHandler(order)).getETag()));
}
@Test
public void contained() {
final PaymentInstrument instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901);
assertNotNull(instrument);
assertEquals(101901, instrument.getPaymentInstrumentID(), 0);
assertNotNull(instrument.getCreatedDate());
}
}

View File

@ -24,14 +24,17 @@ import static org.junit.Assert.assertTrue;
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
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.Order;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.
PaymentInstrument;
import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person;
import org.junit.Test;
@ -106,7 +109,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
@Test
public void concurrentModification() {
Order order = container.getOrders().get(8);
final String etag = ((EntityTypeInvocationHandler) Proxy.getInvocationHandler(order)).getETag();
final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(order)).getETag();
assertTrue(StringUtils.isNotBlank(etag));
order.setShelfLife(BigDecimal.TEN);
@ -116,4 +119,17 @@ public class EntityUpdateTestITCase extends AbstractTestITCase {
order = container.getOrders().get(8);
assertEquals(BigDecimal.TEN, order.getShelfLife());
}
@Test
public void contained() {
PaymentInstrument instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901);
final String newName = UUID.randomUUID().toString();
instrument.setFriendlyName(newName);
container.flush();
instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901);
assertEquals(newName, instrument.getFriendlyName());
}
}

View File

@ -44,7 +44,7 @@ import javax.xml.datatype.Duration;
@EntitySet(name = "Row", includeInServiceDocument = true)
@EntitySet(name = "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> {

View File

@ -44,7 +44,7 @@ import javax.xml.datatype.Duration;
@EntitySet(name = "RowIndex", includeInServiceDocument = true)
@EntitySet(name = "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> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "Accounts", includeInServiceDocument = true)
@EntitySet(name = "Accounts")
public interface Accounts
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Account, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountCollection> {

View File

@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "ActiveSubscriptions", contained = true)
public interface ActiveSubscriptions
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Subscription, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Subscription newSubscription();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection newSubscriptionCollection();
}

View File

@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "Assets", contained = true)
public interface Assets
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Asset, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AssetCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Asset newAsset();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AssetCollection newAssetCollection();
}

View File

@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "BillingStatements", contained = true)
public interface BillingStatements
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Statement, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StatementCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Statement newStatement();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StatementCollection newStatementCollection();
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;

View File

@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "Club", contained = true)
public interface Club
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Club, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ClubCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Club newClub();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ClubCollection newClubCollection();
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;

View File

@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "CreditRecords", contained = true)
public interface CreditRecords
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditRecord, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditRecordCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditRecord newCreditRecord();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditRecordCollection newCreditRecordCollection();
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "Customers", includeInServiceDocument = true)
@EntitySet(name = "Customers")
public interface Customers
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CustomerCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "Departments", includeInServiceDocument = true)
@EntitySet(name = "Departments")
public interface Departments
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Department, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.DepartmentCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "Employees", includeInServiceDocument = true)
@EntitySet(name = "Employees")
public interface Employees
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Employee, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.EmployeeCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.client.api.http.HttpMethod;
@ -53,31 +52,19 @@ import javax.xml.datatype.Duration;
public interface InMemoryEntities extends Container {
Accounts getAccounts();
StoredPIs getStoredPIs();
Customers getCustomers();
Products getProducts();
OrderDetails getOrderDetails();
Departments getDepartments();
Employees getEmployees();
Orders getOrders();
People getPeople();
SubscriptionTemplates getSubscriptionTemplates();
ProductReviews getProductReviews();
ProductDetails getProductDetails();
PublicCompany getPublicCompany();
DefaultStoredPI getDefaultStoredPI();

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;

View File

@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "MyGiftCard", contained = true)
public interface MyGiftCard
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCard, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCardCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCard newGiftCard();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCardCollection newGiftCardCollection();
}

View File

@ -0,0 +1,53 @@
/*
* 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.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.annotations.EntitySet;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKey;
import org.apache.olingo.ext.proxy.api.annotations.CompoundKeyElement;
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.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;
@EntitySet(name = "MyPaymentInstruments", contained = true)
public interface MyPaymentInstruments
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrumentCollection> {
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrument newPaymentInstrument();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrumentCollection newPaymentInstrumentCollection();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditCardPI newCreditCardPI();
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditCardPICollection newCreditCardPICollection();
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "OrderDetails", includeInServiceDocument = true)
@EntitySet(name = "OrderDetails")
public interface OrderDetails
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail, OrderDetailKey, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "Orders", includeInServiceDocument = true)
@EntitySet(name = "Orders")
public interface Orders
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "People", includeInServiceDocument = true)
@EntitySet(name = "People")
public interface People
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PersonCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "ProductDetails", includeInServiceDocument = true)
@EntitySet(name = "ProductDetails")
public interface ProductDetails
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetail, ProductDetailKey, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "ProductReviews", includeInServiceDocument = true)
@EntitySet(name = "ProductReviews")
public interface ProductReviews
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductReview, ProductReviewKey, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductReviewCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "Products", includeInServiceDocument = true)
@EntitySet(name = "Products")
public interface Products
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "StoredPIs", includeInServiceDocument = true)
@EntitySet(name = "StoredPIs")
public interface StoredPIs
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPICollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
@ -43,8 +42,7 @@ import java.util.Calendar;
import javax.xml.datatype.Duration;
@EntitySet(name = "SubscriptionTemplates", includeInServiceDocument = true)
@EntitySet(name = "SubscriptionTemplates")
public interface SubscriptionTemplates
extends AbstractEntitySet<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Subscription, Integer, org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection> {

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;

View File

@ -16,6 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface Account
fcKeepInContent = false)
Integer getAccountID();
void setAccountID(final Integer _accountID);
void setAccountID(Integer _accountID);
@Property(name = "Country",
@ -105,7 +104,7 @@ public interface Account
fcKeepInContent = false)
String getCountry();
void setCountry(final String _country);
void setCountry(String _country);
@Property(name = "AccountInfo",
@ -128,7 +127,7 @@ public interface Account
fcKeepInContent = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountInfo getAccountInfo();
void setAccountInfo(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountInfo _accountInfo);
void setAccountInfo(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccountInfo _accountInfo);
@ -136,42 +135,42 @@ public interface Account
type = "Microsoft.Test.OData.Services.ODataWCFService.GiftCard",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "",
targetEntitySet = "")
targetEntitySet = "",
containsTarget = true)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCard getMyGiftCard();
void setMyGiftCard(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCard _myGiftCard);
void setMyGiftCard(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.GiftCard _myGiftCard);
@NavigationProperty(name = "MyPaymentInstruments",
type = "Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "",
targetEntitySet = "")
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrumentCollection getMyPaymentInstruments();
void setMyPaymentInstruments(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.PaymentInstrumentCollection _myPaymentInstruments);
targetEntitySet = "",
containsTarget = true)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.MyPaymentInstruments getMyPaymentInstruments();
void setMyPaymentInstruments(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.MyPaymentInstruments _myPaymentInstruments);
@NavigationProperty(name = "ActiveSubscriptions",
type = "Microsoft.Test.OData.Services.ODataWCFService.Subscription",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "",
targetEntitySet = "")
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection getActiveSubscriptions();
void setActiveSubscriptions(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection _activeSubscriptions);
targetEntitySet = "",
containsTarget = true)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.ActiveSubscriptions getActiveSubscriptions();
void setActiveSubscriptions(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.ActiveSubscriptions _activeSubscriptions);
@NavigationProperty(name = "AvailableSubscriptionTemplatess",
type = "Microsoft.Test.OData.Services.ODataWCFService.Subscription",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "SubscriptionTemplates")
targetEntitySet = "SubscriptionTemplates",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection getAvailableSubscriptionTemplatess();
void setAvailableSubscriptionTemplatess(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection _availableSubscriptionTemplatess);
void setAvailableSubscriptionTemplatess(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.SubscriptionCollection _availableSubscriptionTemplatess);
Operations operations();

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
@ -64,7 +63,7 @@ public interface AccountInfo
srid = "")
String getFirstName();
void setFirstName(final String _firstName);
void setFirstName(String _firstName);
@ -81,7 +80,7 @@ public interface AccountInfo
srid = "")
String getLastName();
void setLastName(final String _lastName);
void setLastName(String _lastName);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
@ -64,7 +63,7 @@ public interface Address
srid = "")
String getStreet();
void setStreet(final String _street);
void setStreet(String _street);
@ -81,7 +80,7 @@ public interface Address
srid = "")
String getCity();
void setCity(final String _city);
void setCity(String _city);
@ -98,7 +97,7 @@ public interface Address
srid = "")
String getPostalCode();
void setPostalCode(final String _postalCode);
void setPostalCode(String _postalCode);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface Asset
fcKeepInContent = false)
Integer getAssetID();
void setAssetID(final Integer _assetID);
void setAssetID(Integer _assetID);
@Property(name = "Name",
@ -105,7 +104,7 @@ public interface Asset
fcKeepInContent = false)
String getName();
void setName(final String _name);
void setName(String _name);
@Property(name = "Number",
@ -128,7 +127,7 @@ public interface Asset
fcKeepInContent = false)
Integer getNumber();
void setNumber(final Integer _number);
void setNumber(Integer _number);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface Club
fcKeepInContent = false)
Integer getClubID();
void setClubID(final Integer _clubID);
void setClubID(Integer _clubID);
@Property(name = "Name",
@ -105,7 +104,7 @@ public interface Club
fcKeepInContent = false)
String getName();
void setName(final String _name);
void setName(String _name);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface Company
fcKeepInContent = false)
Integer getCompanyID();
void setCompanyID(final Integer _companyID);
void setCompanyID(Integer _companyID);
@Property(name = "CompanyCategory",
@ -105,7 +104,7 @@ public interface Company
fcKeepInContent = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyCategory getCompanyCategory();
void setCompanyCategory(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyCategory _companyCategory);
void setCompanyCategory(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyCategory _companyCategory);
@Property(name = "Revenue",
@ -128,7 +127,7 @@ public interface Company
fcKeepInContent = false)
Long getRevenue();
void setRevenue(final Long _revenue);
void setRevenue(Long _revenue);
@Property(name = "Name",
@ -151,7 +150,7 @@ public interface Company
fcKeepInContent = false)
String getName();
void setName(final String _name);
void setName(String _name);
@Property(name = "Address",
@ -174,7 +173,7 @@ public interface Company
fcKeepInContent = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address getAddress();
void setAddress(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address _address);
void setAddress(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address _address);
@ -182,42 +181,42 @@ public interface Company
type = "Microsoft.Test.OData.Services.ODataWCFService.Employee",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Employees")
targetEntitySet = "Employees",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.EmployeeCollection getEmployees();
void setEmployees(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.EmployeeCollection _employees);
void setEmployees(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.EmployeeCollection _employees);
@NavigationProperty(name = "VipCustomer",
type = "Microsoft.Test.OData.Services.ODataWCFService.Customer",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "VipCustomer")
targetEntitySet = "VipCustomer",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer getVipCustomer();
void setVipCustomer(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer _vipCustomer);
void setVipCustomer(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer _vipCustomer);
@NavigationProperty(name = "Departments",
type = "Microsoft.Test.OData.Services.ODataWCFService.Department",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Departments")
targetEntitySet = "Departments",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.DepartmentCollection getDepartments();
void setDepartments(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.DepartmentCollection _departments);
void setDepartments(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.DepartmentCollection _departments);
@NavigationProperty(name = "CoreDepartment",
type = "Microsoft.Test.OData.Services.ODataWCFService.Department",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Departments")
targetEntitySet = "Departments",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Department getCoreDepartment();
void setCoreDepartment(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Department _coreDepartment);
void setCoreDepartment(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Department _coreDepartment);
Operations operations();

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
@ -65,7 +64,7 @@ public interface CompanyAddress
srid = "")
String getStreet();
void setStreet(final String _street);
void setStreet(String _street);
@ -82,7 +81,7 @@ public interface CompanyAddress
srid = "")
String getCity();
void setCity(final String _city);
void setCity(String _city);
@ -99,7 +98,7 @@ public interface CompanyAddress
srid = "")
String getPostalCode();
void setPostalCode(final String _postalCode);
void setPostalCode(String _postalCode);
@ -116,7 +115,7 @@ public interface CompanyAddress
srid = "")
String getCompanyName();
void setCompanyName(final String _companyName);
void setCompanyName(String _companyName);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -83,7 +82,7 @@ public interface CreditCardPI
fcKeepInContent = false)
Integer getPaymentInstrumentID();
void setPaymentInstrumentID(final Integer _paymentInstrumentID);
void setPaymentInstrumentID(Integer _paymentInstrumentID);
@Property(name = "FriendlyName",
@ -106,7 +105,7 @@ public interface CreditCardPI
fcKeepInContent = false)
String getFriendlyName();
void setFriendlyName(final String _friendlyName);
void setFriendlyName(String _friendlyName);
@Property(name = "CreatedDate",
@ -129,7 +128,7 @@ public interface CreditCardPI
fcKeepInContent = false)
Calendar getCreatedDate();
void setCreatedDate(final Calendar _createdDate);
void setCreatedDate(Calendar _createdDate);
@Property(name = "CardNumber",
@ -152,7 +151,7 @@ public interface CreditCardPI
fcKeepInContent = false)
String getCardNumber();
void setCardNumber(final String _cardNumber);
void setCardNumber(String _cardNumber);
@Property(name = "CVV",
@ -175,7 +174,7 @@ public interface CreditCardPI
fcKeepInContent = false)
String getCVV();
void setCVV(final String _cVV);
void setCVV(String _cVV);
@Property(name = "HolderName",
@ -198,7 +197,7 @@ public interface CreditCardPI
fcKeepInContent = false)
String getHolderName();
void setHolderName(final String _holderName);
void setHolderName(String _holderName);
@Property(name = "Balance",
@ -221,7 +220,7 @@ public interface CreditCardPI
fcKeepInContent = false)
Double getBalance();
void setBalance(final Double _balance);
void setBalance(Double _balance);
@Property(name = "ExperationDate",
@ -244,7 +243,7 @@ public interface CreditCardPI
fcKeepInContent = false)
Calendar getExperationDate();
void setExperationDate(final Calendar _experationDate);
void setExperationDate(Calendar _experationDate);
@ -252,42 +251,42 @@ public interface CreditCardPI
type = "Microsoft.Test.OData.Services.ODataWCFService.StoredPI",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "StoredPIs")
targetEntitySet = "StoredPIs",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI getTheStoredPI();
void setTheStoredPI(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI _theStoredPI);
void setTheStoredPI(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI _theStoredPI);
@NavigationProperty(name = "BillingStatements",
type = "Microsoft.Test.OData.Services.ODataWCFService.Statement",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "",
targetEntitySet = "")
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StatementCollection getBillingStatements();
void setBillingStatements(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StatementCollection _billingStatements);
targetEntitySet = "",
containsTarget = true)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.BillingStatements getBillingStatements();
void setBillingStatements(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.BillingStatements _billingStatements);
@NavigationProperty(name = "BackupStoredPI",
type = "Microsoft.Test.OData.Services.ODataWCFService.StoredPI",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "StoredPIs")
targetEntitySet = "StoredPIs",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI getBackupStoredPI();
void setBackupStoredPI(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI _backupStoredPI);
void setBackupStoredPI(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.StoredPI _backupStoredPI);
@NavigationProperty(name = "CreditRecords",
type = "Microsoft.Test.OData.Services.ODataWCFService.CreditRecord",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "",
targetEntitySet = "")
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditRecordCollection getCreditRecords();
void setCreditRecords(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CreditRecordCollection _creditRecords);
targetEntitySet = "",
containsTarget = true)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.CreditRecords getCreditRecords();
void setCreditRecords(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.CreditRecords _creditRecords);
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface CreditRecord
fcKeepInContent = false)
Integer getCreditRecordID();
void setCreditRecordID(final Integer _creditRecordID);
void setCreditRecordID(Integer _creditRecordID);
@Property(name = "IsGood",
@ -105,7 +104,7 @@ public interface CreditRecord
fcKeepInContent = false)
Boolean getIsGood();
void setIsGood(final Boolean _isGood);
void setIsGood(Boolean _isGood);
@Property(name = "Reason",
@ -128,7 +127,7 @@ public interface CreditRecord
fcKeepInContent = false)
String getReason();
void setReason(final String _reason);
void setReason(String _reason);
@Property(name = "CreatedDate",
@ -151,7 +150,7 @@ public interface CreditRecord
fcKeepInContent = false)
Calendar getCreatedDate();
void setCreatedDate(final Calendar _createdDate);
void setCreatedDate(Calendar _createdDate);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -83,7 +82,7 @@ public interface Customer
fcKeepInContent = false)
Integer getPersonID();
void setPersonID(final Integer _personID);
void setPersonID(Integer _personID);
@Property(name = "FirstName",
@ -106,7 +105,7 @@ public interface Customer
fcKeepInContent = false)
String getFirstName();
void setFirstName(final String _firstName);
void setFirstName(String _firstName);
@Property(name = "LastName",
@ -129,7 +128,7 @@ public interface Customer
fcKeepInContent = false)
String getLastName();
void setLastName(final String _lastName);
void setLastName(String _lastName);
@Property(name = "MiddleName",
@ -152,7 +151,7 @@ public interface Customer
fcKeepInContent = false)
String getMiddleName();
void setMiddleName(final String _middleName);
void setMiddleName(String _middleName);
@Property(name = "HomeAddress",
@ -175,7 +174,7 @@ public interface Customer
fcKeepInContent = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address getHomeAddress();
void setHomeAddress(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address _homeAddress);
void setHomeAddress(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address _homeAddress);
@Property(name = "Home",
@ -198,7 +197,7 @@ public interface Customer
fcKeepInContent = false)
Point getHome();
void setHome(final Point _home);
void setHome(Point _home);
@Property(name = "Numbers",
@ -221,7 +220,7 @@ public interface Customer
fcKeepInContent = false)
Collection<String> getNumbers();
void setNumbers(final Collection<String> _numbers);
void setNumbers(Collection<String> _numbers);
@Property(name = "Emails",
@ -244,7 +243,7 @@ public interface Customer
fcKeepInContent = false)
Collection<String> getEmails();
void setEmails(final Collection<String> _emails);
void setEmails(Collection<String> _emails);
@Property(name = "City",
@ -267,7 +266,7 @@ public interface Customer
fcKeepInContent = false)
String getCity();
void setCity(final String _city);
void setCity(String _city);
@Property(name = "Birthday",
@ -290,7 +289,7 @@ public interface Customer
fcKeepInContent = false)
Calendar getBirthday();
void setBirthday(final Calendar _birthday);
void setBirthday(Calendar _birthday);
@Property(name = "TimeBetweenLastTwoOrders",
@ -313,7 +312,7 @@ public interface Customer
fcKeepInContent = false)
BigDecimal getTimeBetweenLastTwoOrders();
void setTimeBetweenLastTwoOrders(final BigDecimal _timeBetweenLastTwoOrders);
void setTimeBetweenLastTwoOrders(BigDecimal _timeBetweenLastTwoOrders);
@ -321,32 +320,32 @@ public interface Customer
type = "Microsoft.Test.OData.Services.ODataWCFService.Person",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "People")
targetEntitySet = "People",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person getParent();
void setParent(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person _parent);
void setParent(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person _parent);
@NavigationProperty(name = "Orders",
type = "Microsoft.Test.OData.Services.ODataWCFService.Order",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Orders")
targetEntitySet = "Orders",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection getOrders();
void setOrders(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection _orders);
void setOrders(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection _orders);
@NavigationProperty(name = "Company",
type = "Microsoft.Test.OData.Services.ODataWCFService.Company",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Company")
targetEntitySet = "Company",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company getCompany();
void setCompany(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company _company);
void setCompany(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company _company);
@Override
Operations operations();

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface Department
fcKeepInContent = false)
Integer getDepartmentID();
void setDepartmentID(final Integer _departmentID);
void setDepartmentID(Integer _departmentID);
@Property(name = "Name",
@ -105,7 +104,7 @@ public interface Department
fcKeepInContent = false)
String getName();
void setName(final String _name);
void setName(String _name);
@Property(name = "DepartmentNO",
@ -128,7 +127,7 @@ public interface Department
fcKeepInContent = false)
String getDepartmentNO();
void setDepartmentNO(final String _departmentNO);
void setDepartmentNO(String _departmentNO);
@ -136,12 +135,12 @@ public interface Department
type = "Microsoft.Test.OData.Services.ODataWCFService.Company",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Company")
targetEntitySet = "Company",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company getCompany();
void setCompany(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company _company);
void setCompany(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company _company);
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -83,7 +82,7 @@ public interface Employee
fcKeepInContent = false)
Integer getPersonID();
void setPersonID(final Integer _personID);
void setPersonID(Integer _personID);
@Property(name = "FirstName",
@ -106,7 +105,7 @@ public interface Employee
fcKeepInContent = false)
String getFirstName();
void setFirstName(final String _firstName);
void setFirstName(String _firstName);
@Property(name = "LastName",
@ -129,7 +128,7 @@ public interface Employee
fcKeepInContent = false)
String getLastName();
void setLastName(final String _lastName);
void setLastName(String _lastName);
@Property(name = "MiddleName",
@ -152,7 +151,7 @@ public interface Employee
fcKeepInContent = false)
String getMiddleName();
void setMiddleName(final String _middleName);
void setMiddleName(String _middleName);
@Property(name = "HomeAddress",
@ -175,7 +174,7 @@ public interface Employee
fcKeepInContent = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address getHomeAddress();
void setHomeAddress(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address _homeAddress);
void setHomeAddress(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address _homeAddress);
@Property(name = "Home",
@ -198,7 +197,7 @@ public interface Employee
fcKeepInContent = false)
Point getHome();
void setHome(final Point _home);
void setHome(Point _home);
@Property(name = "Numbers",
@ -221,7 +220,7 @@ public interface Employee
fcKeepInContent = false)
Collection<String> getNumbers();
void setNumbers(final Collection<String> _numbers);
void setNumbers(Collection<String> _numbers);
@Property(name = "Emails",
@ -244,7 +243,7 @@ public interface Employee
fcKeepInContent = false)
Collection<String> getEmails();
void setEmails(final Collection<String> _emails);
void setEmails(Collection<String> _emails);
@Property(name = "DateHired",
@ -267,7 +266,7 @@ public interface Employee
fcKeepInContent = false)
Calendar getDateHired();
void setDateHired(final Calendar _dateHired);
void setDateHired(Calendar _dateHired);
@Property(name = "Office",
@ -290,7 +289,7 @@ public interface Employee
fcKeepInContent = false)
Point getOffice();
void setOffice(final Point _office);
void setOffice(Point _office);
@ -298,22 +297,22 @@ public interface Employee
type = "Microsoft.Test.OData.Services.ODataWCFService.Person",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "People")
targetEntitySet = "People",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person getParent();
void setParent(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person _parent);
void setParent(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person _parent);
@NavigationProperty(name = "Company",
type = "Microsoft.Test.OData.Services.ODataWCFService.Company",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Company")
targetEntitySet = "Company",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company getCompany();
void setCompany(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company _company);
void setCompany(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Company _company);
@Override
Operations operations();

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface GiftCard
fcKeepInContent = false)
Integer getGiftCardID();
void setGiftCardID(final Integer _giftCardID);
void setGiftCardID(Integer _giftCardID);
@Property(name = "GiftCardNO",
@ -105,7 +104,7 @@ public interface GiftCard
fcKeepInContent = false)
String getGiftCardNO();
void setGiftCardNO(final String _giftCardNO);
void setGiftCardNO(String _giftCardNO);
@Property(name = "Amount",
@ -128,7 +127,7 @@ public interface GiftCard
fcKeepInContent = false)
Double getAmount();
void setAmount(final Double _amount);
void setAmount(Double _amount);
@Property(name = "ExperationDate",
@ -151,7 +150,7 @@ public interface GiftCard
fcKeepInContent = false)
Calendar getExperationDate();
void setExperationDate(final Calendar _experationDate);
void setExperationDate(Calendar _experationDate);
@Property(name = "OwnerName",
@ -174,7 +173,7 @@ public interface GiftCard
fcKeepInContent = false)
String getOwnerName();
void setOwnerName(final String _ownerName);
void setOwnerName(String _ownerName);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.ext.proxy.api.annotations.Namespace;
@ -65,7 +64,7 @@ public interface HomeAddress
srid = "")
String getStreet();
void setStreet(final String _street);
void setStreet(String _street);
@ -82,7 +81,7 @@ public interface HomeAddress
srid = "")
String getCity();
void setCity(final String _city);
void setCity(String _city);
@ -99,7 +98,7 @@ public interface HomeAddress
srid = "")
String getPostalCode();
void setPostalCode(final String _postalCode);
void setPostalCode(String _postalCode);
@ -116,7 +115,7 @@ public interface HomeAddress
srid = "")
String getFamilyName();
void setFamilyName(final String _familyName);
void setFamilyName(String _familyName);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface LabourUnion
fcKeepInContent = false)
Integer getLabourUnionID();
void setLabourUnionID(final Integer _labourUnionID);
void setLabourUnionID(Integer _labourUnionID);
@Property(name = "Name",
@ -105,7 +104,7 @@ public interface LabourUnion
fcKeepInContent = false)
String getName();
void setName(final String _name);
void setName(String _name);

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface Order
fcKeepInContent = false)
Integer getOrderID();
void setOrderID(final Integer _orderID);
void setOrderID(Integer _orderID);
@Property(name = "OrderDate",
@ -105,7 +104,7 @@ public interface Order
fcKeepInContent = false)
Calendar getOrderDate();
void setOrderDate(final Calendar _orderDate);
void setOrderDate(Calendar _orderDate);
@Property(name = "ShelfLife",
@ -128,7 +127,7 @@ public interface Order
fcKeepInContent = false)
BigDecimal getShelfLife();
void setShelfLife(final BigDecimal _shelfLife);
void setShelfLife(BigDecimal _shelfLife);
@Property(name = "OrderShelfLifes",
@ -151,7 +150,7 @@ public interface Order
fcKeepInContent = false)
Collection<BigDecimal> getOrderShelfLifes();
void setOrderShelfLifes(final Collection<BigDecimal> _orderShelfLifes);
void setOrderShelfLifes(Collection<BigDecimal> _orderShelfLifes);
@ -159,32 +158,32 @@ public interface Order
type = "Microsoft.Test.OData.Services.ODataWCFService.Employee",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Employees")
targetEntitySet = "Employees",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Employee getLoggedInEmployee();
void setLoggedInEmployee(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Employee _loggedInEmployee);
void setLoggedInEmployee(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Employee _loggedInEmployee);
@NavigationProperty(name = "CustomerForOrder",
type = "Microsoft.Test.OData.Services.ODataWCFService.Customer",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Customers")
targetEntitySet = "Customers",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer getCustomerForOrder();
void setCustomerForOrder(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer _customerForOrder);
void setCustomerForOrder(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer _customerForOrder);
@NavigationProperty(name = "OrderDetails",
type = "Microsoft.Test.OData.Services.ODataWCFService.OrderDetail",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "OrderDetails")
targetEntitySet = "OrderDetails",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailCollection getOrderDetails();
void setOrderDetails(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailCollection _orderDetails);
void setOrderDetails(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailCollection _orderDetails);
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;
@ -82,7 +81,7 @@ public interface OrderDetail
fcKeepInContent = false)
Integer getOrderID();
void setOrderID(final Integer _orderID);
void setOrderID(Integer _orderID);
@Key
@Property(name = "ProductID",
@ -105,7 +104,7 @@ public interface OrderDetail
fcKeepInContent = false)
Integer getProductID();
void setProductID(final Integer _productID);
void setProductID(Integer _productID);
@Property(name = "OrderPlaced",
@ -128,7 +127,7 @@ public interface OrderDetail
fcKeepInContent = false)
Calendar getOrderPlaced();
void setOrderPlaced(final Calendar _orderPlaced);
void setOrderPlaced(Calendar _orderPlaced);
@Property(name = "Quantity",
@ -151,7 +150,7 @@ public interface OrderDetail
fcKeepInContent = false)
Integer getQuantity();
void setQuantity(final Integer _quantity);
void setQuantity(Integer _quantity);
@Property(name = "UnitPrice",
@ -174,7 +173,7 @@ public interface OrderDetail
fcKeepInContent = false)
Float getUnitPrice();
void setUnitPrice(final Float _unitPrice);
void setUnitPrice(Float _unitPrice);
@ -182,22 +181,22 @@ public interface OrderDetail
type = "Microsoft.Test.OData.Services.ODataWCFService.Product",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Products")
targetEntitySet = "Products",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection getProductOrdered();
void setProductOrdered(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection _productOrdered);
void setProductOrdered(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductCollection _productOrdered);
@NavigationProperty(name = "AssociatedOrder",
type = "Microsoft.Test.OData.Services.ODataWCFService.Order",
targetSchema = "Microsoft.Test.OData.Services.ODataWCFService",
targetContainer = "InMemoryEntities",
targetEntitySet = "Orders")
targetEntitySet = "Orders",
containsTarget = false)
org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order getAssociatedOrder();
void setAssociatedOrder(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order _associatedOrder);
void setAssociatedOrder(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order _associatedOrder);
}

View File

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types;
import org.apache.olingo.client.api.http.HttpMethod;

Some files were not shown because too many files have changed in this diff Show More