diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java index 0a94df45d..8da4baa74 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/EntitySet.java @@ -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' - * getSimpleName(). + * class'getSimpleName(). */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @@ -34,5 +33,5 @@ public @interface EntitySet { String name(); - boolean includeInServiceDocument() default true; + boolean contained() default false; } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java index 88379bc63..fd51b04df 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/annotations/NavigationProperty.java @@ -39,4 +39,6 @@ public @interface NavigationProperty { String targetContainer(); String targetEntitySet(); + + boolean containsTarget() default false; } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java index 5181b48fa..e3a2bc9ef 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java @@ -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 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 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, diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractTypeInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java similarity index 87% rename from ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractTypeInvocationHandler.java rename to ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java index 169ddfeae..2e6103e79 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractTypeInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java @@ -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 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()); } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexFactoryInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexFactoryInvocationHandler.java index 2f833c6d6..74ea4655b 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexFactoryInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexFactoryInvocationHandler.java @@ -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()); } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexTypeInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java similarity index 90% rename from ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexTypeInvocationHandler.java rename to ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java index 2175e8cd5..72d42e801 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexTypeInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java @@ -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 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 diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java index ab824ecf3..90a4d756d 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java @@ -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 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 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 delayedUpdates, @@ -323,14 +322,14 @@ class ContainerImpl implements Container { ? ODataLinkType.ENTITY_SET_NAVIGATION : ODataLinkType.ENTITY_NAVIGATION; - final Set toBeLinked = new HashSet(); + final Set toBeLinked = new HashSet(); 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 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 keys = new ArrayList(); + private final List keys = new ArrayList(); private final List values = new ArrayList(); - 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); } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java index 299a84262..17f2f5ce4 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java @@ -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()); diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityTypeInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java similarity index 89% rename from ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityTypeInvocationHandler.java rename to ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java index 57b73d0cc..361c14031 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityTypeInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java @@ -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 propertyChanges = new HashMap(); protected Map linkChanges = new HashMap(); @@ -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); } } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java index 18c2ce29a..6e70a0e9f 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java @@ -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 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) entitySetParams[0]; - this.collTypeRef = (Class) 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) entitySetParams[0]; + this.collTypeRef = (Class) entitySetParams[2]; + + this.uri = uri; } protected Class 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 items = new ArrayList(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; } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java index cdc0bfba2..69e1f9baf 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java @@ -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 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 getBoundOperation(final Operation operation, final List parameterNames) { - final CommonODataEntity entity = ((EntityTypeInvocationHandler) target).getEntity(); + final CommonODataEntity entity = ((EntityInvocationHandler) target).getEntity(); ODataOperation boundOp = entity.getOperation(operation.name()); if (boundOp == null) { diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SingletonInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SingletonInvocationHandler.java index 4ec75eb1d..57b1b3988 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SingletonInvocationHandler.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SingletonInvocationHandler.java @@ -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> @@ -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 diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/AttachedEntity.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/AttachedEntity.java index 96cad427a..8126bcc96 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/AttachedEntity.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/AttachedEntity.java @@ -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; } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityContext.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityContext.java index ab2c9a899..2b42cd16e 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityContext.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityContext.java @@ -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 { *
* This map have to be used to search for entities by key. */ - private final Map searchableEntities = - new HashMap(); + private final Map searchableEntities = + new HashMap(); /** * All attached entities (new entities included). *
* Attachment order will be maintained. */ - private final Map allAttachedEntities = - new LinkedHashMap(); + private final Map allAttachedEntities = + new LinkedHashMap(); /** * Attaches an entity with status NEW. @@ -55,7 +55,7 @@ public class EntityContext implements Iterable { * @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 { * @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 { * @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 { * * @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 { * @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 { * @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 { * @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 { * @param entity entity. * @return true if is attached; false 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 { @Override public Iterator iterator() { final List res = new ArrayList(); - for (Map.Entry attachedEntity : allAttachedEntities. + for (Map.Entry attachedEntity : allAttachedEntities. entrySet()) { res.add(new AttachedEntity(attachedEntity.getKey(), attachedEntity.getValue())); } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java index 791f471ac..3c8daddc9 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java @@ -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 targets; + private final Collection targets; private final ODataLinkType type; public EntityLinkDesc( final String sourceName, - final EntityTypeInvocationHandler source, - final Collection target, + final EntityInvocationHandler source, + final Collection 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.singleton(target); + this.targets = Collections.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 getTargets() { + public Collection getTargets() { return targets; } diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java index cc39d4cd8..edfc227c2 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java @@ -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() { diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java index cda964e1e..38dd4ccb5 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java @@ -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 collection = new ArrayList(); @@ -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); diff --git a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractPOJOGenMojo.java b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractPOJOGenMojo.java index 420d4c280..f8ab5f231 100644 --- a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractPOJOGenMojo.java +++ b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractPOJOGenMojo.java @@ -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 diff --git a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java index 32bfc6bc9..ebbeb53f6 100644 --- a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java +++ b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java @@ -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 getEntityKeyType(final EdmSingleton singleton) { return getEntityKeyType(singleton.getEntityType()); } + public Map 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('>'); } } diff --git a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/NavPropertyContainsTarget.java b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/NavPropertyContainsTarget.java index 54ce6fe0c..8e3d2c56f 100644 --- a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/NavPropertyContainsTarget.java +++ b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/NavPropertyContainsTarget.java @@ -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()); + } } diff --git a/ext/pojogen-maven-plugin/src/main/resources/containedEntitySet.vm b/ext/pojogen-maven-plugin/src/main/resources/containedEntitySet.vm new file mode 100644 index 000000000..6433d47e7 --- /dev/null +++ b/ext/pojogen-maven-plugin/src/main/resources/containedEntitySet.vm @@ -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 +} diff --git a/ext/pojogen-maven-plugin/src/main/resources/container.vm b/ext/pojogen-maven-plugin/src/main/resources/container.vm index 18d383d96..362018d85 100644 --- a/ext/pojogen-maven-plugin/src/main/resources/container.vm +++ b/ext/pojogen-maven-plugin/src/main/resources/container.vm @@ -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" ) diff --git a/ext/pojogen-maven-plugin/src/main/resources/entitySet.vm b/ext/pojogen-maven-plugin/src/main/resources/entitySet.vm index e98ed977f..8ba5ce6e5 100644 --- a/ext/pojogen-maven-plugin/src/main/resources/entitySet.vm +++ b/ext/pojogen-maven-plugin/src/main/resources/entitySet.vm @@ -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> { diff --git a/ext/pojogen-maven-plugin/src/main/resources/entityType.vm b/ext/pojogen-maven-plugin/src/main/resources/entityType.vm index 11144455b..aeebe7bb7 100644 --- a/ext/pojogen-maven-plugin/src/main/resources/entityType.vm +++ b/ext/pojogen-maven-plugin/src/main/resources/entityType.vm @@ -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()) diff --git a/ext/pojogen-maven-plugin/src/main/resources/entityTypeKey.vm b/ext/pojogen-maven-plugin/src/main/resources/entityTypeKey.vm index 143ae5e10..423b0e15d 100644 --- a/ext/pojogen-maven-plugin/src/main/resources/entityTypeKey.vm +++ b/ext/pojogen-maven-plugin/src/main/resources/entityTypeKey.vm @@ -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 ) diff --git a/ext/pojogen-maven-plugin/src/main/resources/v30/complexType.vm b/ext/pojogen-maven-plugin/src/main/resources/v30/complexType.vm index 4f0f86b3a..2c3c7ff59 100644 --- a/ext/pojogen-maven-plugin/src/main/resources/v30/complexType.vm +++ b/ext/pojogen-maven-plugin/src/main/resources/v30/complexType.vm @@ -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) ) diff --git a/ext/pojogen-maven-plugin/src/main/resources/v30/entitySet.vm b/ext/pojogen-maven-plugin/src/main/resources/v30/entitySet.vm deleted file mode 100644 index 86f2bad67..000000000 --- a/ext/pojogen-maven-plugin/src/main/resources/v30/entitySet.vm +++ /dev/null @@ -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") diff --git a/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm b/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm index e3d2a554e..b76717ff4 100644 --- a/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm +++ b/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm @@ -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 diff --git a/ext/pojogen-maven-plugin/src/main/resources/v40/entitySet.vm b/ext/pojogen-maven-plugin/src/main/resources/v40/entitySet.vm deleted file mode 100644 index cf60af0cd..000000000 --- a/ext/pojogen-maven-plugin/src/main/resources/v40/entitySet.vm +++ /dev/null @@ -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) diff --git a/fit/src/main/resources/V40/Accounts/101/links/MyPaymentInstruments(101902).full.json b/fit/src/main/resources/V40/Accounts/101/links/MyPaymentInstruments(101902).full.json new file mode 100644 index 000000000..ba7e1d877 --- /dev/null +++ b/fit/src/main/resources/V40/Accounts/101/links/MyPaymentInstruments(101902).full.json @@ -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" +} diff --git a/fit/src/main/resources/V40/Accounts/101/links/MyPaymentInstruments(101902).xml b/fit/src/main/resources/V40/Accounts/101/links/MyPaymentInstruments(101902).xml new file mode 100644 index 000000000..78397c9f1 --- /dev/null +++ b/fit/src/main/resources/V40/Accounts/101/links/MyPaymentInstruments(101902).xml @@ -0,0 +1,40 @@ + + + + + + + + + + <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> diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/ContextTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/ContextTestITCase.java index b1b2e7544..df6ef1335 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/ContextTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/ContextTestITCase.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityRetrieveTestITCase.java index 7ec8cdfc3..0ea8ad557 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityRetrieveTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityRetrieveTestITCase.java @@ -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 diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java index 82660eb34..9450d29a3 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java @@ -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()); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java index 8c48d985e..06ad28f76 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/DerivedTypeTestITCase.java @@ -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 diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java index 9ad13646a..aee312773 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java @@ -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); + } } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java index ee5b04901..7d79a6038 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityRetrieveTestITCase.java @@ -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()); } } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java index a4a613197..943eda60d 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java @@ -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()); + } } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/Row.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/Row.java index 0fa9886ba..5c970acf3 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/Row.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/Row.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/RowIndex.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/RowIndex.java index 33b4eefe0..22dee42f5 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/RowIndex.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/microsoft/test/odata/services/opentypesservicev4/RowIndex.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Accounts.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Accounts.java index e503d059c..8628426a1 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Accounts.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Accounts.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ActiveSubscriptions.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ActiveSubscriptions.java new file mode 100644 index 000000000..83746b91e --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ActiveSubscriptions.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Assets.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Assets.java new file mode 100644 index 000000000..f2d4f710d --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Assets.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/BillingStatements.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/BillingStatements.java new file mode 100644 index 000000000..5c8cac9ee --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/BillingStatements.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Boss.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Boss.java index a0bfefc6b..70c41bec0 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Boss.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Boss.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Club.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Club.java new file mode 100644 index 000000000..b7f874aa6 --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Club.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Company.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Company.java index 936b85f43..4ed276135 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Company.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Company.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/CreditRecords.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/CreditRecords.java new file mode 100644 index 000000000..62eaa94c7 --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/CreditRecords.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Customers.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Customers.java index 93057f440..575cf0d19 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Customers.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Customers.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/DefaultStoredPI.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/DefaultStoredPI.java index 28fc9b976..9d5035350 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/DefaultStoredPI.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/DefaultStoredPI.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Departments.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Departments.java index b0b217aaa..27f570876 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Departments.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Departments.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Employees.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Employees.java index 5c1c3af70..005c65bfa 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Employees.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Employees.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/InMemoryEntities.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/InMemoryEntities.java index cb8cd0b10..e2256f165 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/InMemoryEntities.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/InMemoryEntities.java @@ -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(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/LabourUnion.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/LabourUnion.java index 35cfa0a91..3aa2ddfd2 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/LabourUnion.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/LabourUnion.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/MyGiftCard.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/MyGiftCard.java new file mode 100644 index 000000000..2557126de --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/MyGiftCard.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/MyPaymentInstruments.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/MyPaymentInstruments.java new file mode 100644 index 000000000..3043b90d8 --- /dev/null +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/MyPaymentInstruments.java @@ -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(); +} diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/OrderDetails.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/OrderDetails.java index 352e5fca9..bbbec65c1 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/OrderDetails.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/OrderDetails.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Orders.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Orders.java index 046ac8001..0c6460269 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Orders.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Orders.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/People.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/People.java index 4a14f9011..04e5dc274 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/People.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/People.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductDetails.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductDetails.java index 390100bcc..d9acf1b9f 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductDetails.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductDetails.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductReviews.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductReviews.java index 9939b4762..2cb201037 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductReviews.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/ProductReviews.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Products.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Products.java index d3cdde300..d9e66fa2e 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Products.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/Products.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/PublicCompany.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/PublicCompany.java index 53d540ac4..e44d0e597 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/PublicCompany.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/PublicCompany.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/StoredPIs.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/StoredPIs.java index 0d0d0662b..ab6cbc4af 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/StoredPIs.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/StoredPIs.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/SubscriptionTemplates.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/SubscriptionTemplates.java index 31341d63f..7ddb271b7 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/SubscriptionTemplates.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/SubscriptionTemplates.java @@ -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> { diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/VipCustomer.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/VipCustomer.java index a2fc2d75f..ddee96b70 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/VipCustomer.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/VipCustomer.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/package-info.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/package-info.java index abf2d52f1..e7fb1fc79 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/package-info.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/package-info.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccessLevel.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccessLevel.java index 4b3c72384..5055bde31 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccessLevel.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccessLevel.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Account.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Account.java index fe5b427db..4c68b8b5a 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Account.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Account.java @@ -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(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountCollection.java index c9159860d..00ec845f6 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountInfo.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountInfo.java index 9f5d34a10..597de706a 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountInfo.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AccountInfo.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Address.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Address.java index 1aaed33ff..2a64ec378 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Address.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Address.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Asset.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Asset.java index 9ae476a23..6fdc75a0b 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Asset.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Asset.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AssetCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AssetCollection.java index be1c6021c..12b8ef127 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AssetCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/AssetCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Club.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Club.java index b66b1a249..f5dd65834 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Club.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Club.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ClubCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ClubCollection.java index 2cf21287c..4647fed33 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ClubCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ClubCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Color.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Color.java index 5432f9efe..17a0a7d67 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Color.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Color.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Company.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Company.java index 3f4e1d340..38d6e9321 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Company.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Company.java @@ -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(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyAddress.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyAddress.java index 9314d0f8c..35c82e0a2 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyAddress.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyAddress.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCategory.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCategory.java index 361f9128a..47aa8eb6c 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCategory.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCategory.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCollection.java index 27c79511c..7eb03e441 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CompanyCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPI.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPI.java index 81e61cd27..98139ef6a 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPI.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPI.java @@ -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); + } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPICollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPICollection.java index 9f528e301..d673c514c 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPICollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditCardPICollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecord.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecord.java index 4a3900aa8..d63a19976 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecord.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecord.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecordCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecordCollection.java index 1c53c8df6..24542010e 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecordCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CreditRecordCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Customer.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Customer.java index d02e4fc40..461cdd39e 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Customer.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Customer.java @@ -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(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CustomerCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CustomerCollection.java index e73f8bfb5..2b0ce94c0 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CustomerCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/CustomerCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Department.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Department.java index 7c9b52844..dd7ba2709 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Department.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Department.java @@ -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); + } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/DepartmentCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/DepartmentCollection.java index 47cd2f2ef..27b40de0f 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/DepartmentCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/DepartmentCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Employee.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Employee.java index 924211fe2..aff7b3618 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Employee.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Employee.java @@ -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(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/EmployeeCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/EmployeeCollection.java index 4cf82d5e8..9ed998727 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/EmployeeCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/EmployeeCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCard.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCard.java index 844a15344..4c2c83fce 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCard.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCard.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCardCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCardCollection.java index 6ce3ce3f6..5ca4350d6 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCardCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/GiftCardCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/HomeAddress.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/HomeAddress.java index 75b73c965..9327fe8ed 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/HomeAddress.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/HomeAddress.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnion.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnion.java index 6602aaa97..5170a41b4 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnion.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnion.java @@ -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); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnionCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnionCollection.java index c6ab1e7c0..644f6d865 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnionCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/LabourUnionCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Order.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Order.java index 671a504db..6e4c5395b 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Order.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Order.java @@ -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); + } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderCollection.java index 694eab50a..3e3712cdb 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetail.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetail.java index c412a87aa..15a0b9bdb 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetail.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetail.java @@ -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); + } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailCollection.java index 474af08d2..a0d2058f7 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailKey.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailKey.java index a6251dbcc..a7d0af370 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailKey.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/OrderDetailKey.java @@ -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.EntityType; @@ -57,7 +56,7 @@ public class OrderDetailKey extends AbstractEntityKey { return _orderID; } - public void setOrderID(final Integer _orderID) { + public void setOrderID(Integer _orderID) { this._orderID = _orderID; } @@ -68,7 +67,7 @@ public class OrderDetailKey extends AbstractEntityKey { return _productID; } - public void setProductID(final Integer _productID) { + public void setProductID(Integer _productID) { this._productID = _productID; } } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrument.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrument.java index a8662285f..3ecaedfc6 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrument.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrument.java @@ -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 PaymentInstrument fcKeepInContent = false) Integer getPaymentInstrumentID(); - void setPaymentInstrumentID(final Integer _paymentInstrumentID); + void setPaymentInstrumentID(Integer _paymentInstrumentID); @Property(name = "FriendlyName", @@ -105,7 +104,7 @@ public interface PaymentInstrument fcKeepInContent = false) String getFriendlyName(); - void setFriendlyName(final String _friendlyName); + void setFriendlyName(String _friendlyName); @Property(name = "CreatedDate", @@ -128,7 +127,7 @@ public interface PaymentInstrument fcKeepInContent = false) Calendar getCreatedDate(); - void setCreatedDate(final Calendar _createdDate); + void setCreatedDate(Calendar _createdDate); @@ -136,32 +135,32 @@ public interface PaymentInstrument 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); + } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrumentCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrumentCollection.java index f093eb382..878a3ffee 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrumentCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PaymentInstrumentCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Person.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Person.java index b175259da..f197b3c06 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Person.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Person.java @@ -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 Person fcKeepInContent = false) Integer getPersonID(); - void setPersonID(final Integer _personID); + void setPersonID(Integer _personID); @Property(name = "FirstName", @@ -105,7 +104,7 @@ public interface Person fcKeepInContent = false) String getFirstName(); - void setFirstName(final String _firstName); + void setFirstName(String _firstName); @Property(name = "LastName", @@ -128,7 +127,7 @@ public interface Person fcKeepInContent = false) String getLastName(); - void setLastName(final String _lastName); + void setLastName(String _lastName); @Property(name = "MiddleName", @@ -151,7 +150,7 @@ public interface Person fcKeepInContent = false) String getMiddleName(); - void setMiddleName(final String _middleName); + void setMiddleName(String _middleName); @Property(name = "HomeAddress", @@ -174,7 +173,7 @@ public interface Person 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", @@ -197,7 +196,7 @@ public interface Person fcKeepInContent = false) Point getHome(); - void setHome(final Point _home); + void setHome(Point _home); @Property(name = "Numbers", @@ -220,7 +219,7 @@ public interface Person fcKeepInContent = false) Collection<String> getNumbers(); - void setNumbers(final Collection<String> _numbers); + void setNumbers(Collection<String> _numbers); @Property(name = "Emails", @@ -243,7 +242,7 @@ public interface Person fcKeepInContent = false) Collection<String> getEmails(); - void setEmails(final Collection<String> _emails); + void setEmails(Collection<String> _emails); @@ -251,12 +250,12 @@ public interface Person 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); + Operations operations(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PersonCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PersonCollection.java index c34786dc4..778e8cc93 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PersonCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PersonCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Product.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Product.java index 271f97659..574e98dc1 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Product.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Product.java @@ -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 Product fcKeepInContent = false) Integer getProductID(); - void setProductID(final Integer _productID); + void setProductID(Integer _productID); @Property(name = "Name", @@ -105,7 +104,7 @@ public interface Product fcKeepInContent = false) String getName(); - void setName(final String _name); + void setName(String _name); @Property(name = "QuantityPerUnit", @@ -128,7 +127,7 @@ public interface Product fcKeepInContent = false) String getQuantityPerUnit(); - void setQuantityPerUnit(final String _quantityPerUnit); + void setQuantityPerUnit(String _quantityPerUnit); @Property(name = "UnitPrice", @@ -151,7 +150,7 @@ public interface Product fcKeepInContent = false) Float getUnitPrice(); - void setUnitPrice(final Float _unitPrice); + void setUnitPrice(Float _unitPrice); @Property(name = "QuantityInStock", @@ -174,7 +173,7 @@ public interface Product fcKeepInContent = false) Integer getQuantityInStock(); - void setQuantityInStock(final Integer _quantityInStock); + void setQuantityInStock(Integer _quantityInStock); @Property(name = "Discontinued", @@ -197,7 +196,7 @@ public interface Product fcKeepInContent = false) Boolean getDiscontinued(); - void setDiscontinued(final Boolean _discontinued); + void setDiscontinued(Boolean _discontinued); @Property(name = "UserAccess", @@ -220,7 +219,7 @@ public interface Product fcKeepInContent = false) org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel getUserAccess(); - void setUserAccess(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel _userAccess); + void setUserAccess(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel _userAccess); @Property(name = "SkinColor", @@ -243,7 +242,7 @@ public interface Product fcKeepInContent = false) org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color getSkinColor(); - void setSkinColor(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color _skinColor); + void setSkinColor(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color _skinColor); @Property(name = "CoverColors", @@ -266,7 +265,7 @@ public interface Product fcKeepInContent = false) Collection<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color> getCoverColors(); - void setCoverColors(final Collection<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color> _coverColors); + void setCoverColors(Collection<org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Color> _coverColors); @@ -274,12 +273,12 @@ public interface Product type = "Microsoft.Test.OData.Services.ODataWCFService.ProductDetail", targetSchema = "Microsoft.Test.OData.Services.ODataWCFService", targetContainer = "InMemoryEntities", - targetEntitySet = "ProductDetails") + targetEntitySet = "ProductDetails", + containsTarget = false) org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection getDetails(); - void setDetails(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection _details); - - + void setDetails(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductDetailCollection _details); + Operations operations(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductCollection.java index 39a23b543..88cd63d34 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetail.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetail.java index 3a6432cf9..945bb2be0 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetail.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetail.java @@ -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 ProductDetail fcKeepInContent = false) Integer getProductID(); - void setProductID(final Integer _productID); + void setProductID(Integer _productID); @Key @Property(name = "ProductDetailID", @@ -105,7 +104,7 @@ public interface ProductDetail fcKeepInContent = false) Integer getProductDetailID(); - void setProductDetailID(final Integer _productDetailID); + void setProductDetailID(Integer _productDetailID); @Property(name = "ProductName", @@ -128,7 +127,7 @@ public interface ProductDetail fcKeepInContent = false) String getProductName(); - void setProductName(final String _productName); + void setProductName(String _productName); @Property(name = "Description", @@ -151,7 +150,7 @@ public interface ProductDetail fcKeepInContent = false) String getDescription(); - void setDescription(final String _description); + void setDescription(String _description); @@ -159,22 +158,22 @@ public interface ProductDetail 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.Product getRelatedProduct(); - void setRelatedProduct(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product _relatedProduct); - - + void setRelatedProduct(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Product _relatedProduct); + @NavigationProperty(name = "Reviews", type = "Microsoft.Test.OData.Services.ODataWCFService.ProductReview", targetSchema = "Microsoft.Test.OData.Services.ODataWCFService", targetContainer = "InMemoryEntities", - targetEntitySet = "ProductReviews") + targetEntitySet = "ProductReviews", + containsTarget = false) org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductReviewCollection getReviews(); - void setReviews(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductReviewCollection _reviews); - - + void setReviews(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.ProductReviewCollection _reviews); + Operations operations(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailCollection.java index 26781026d..31b8c1b1e 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailKey.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailKey.java index fbe7632f8..b1d850828 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailKey.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductDetailKey.java @@ -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.EntityType; @@ -57,7 +56,7 @@ public class ProductDetailKey extends AbstractEntityKey { return _productID; } - public void setProductID(final Integer _productID) { + public void setProductID(Integer _productID) { this._productID = _productID; } @@ -68,7 +67,7 @@ public class ProductDetailKey extends AbstractEntityKey { return _productDetailID; } - public void setProductDetailID(final Integer _productDetailID) { + public void setProductDetailID(Integer _productDetailID) { this._productDetailID = _productDetailID; } } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReview.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReview.java index 2faa843af..32bfa8f88 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReview.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReview.java @@ -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 ProductReview fcKeepInContent = false) Integer getProductID(); - void setProductID(final Integer _productID); + void setProductID(Integer _productID); @Key @Property(name = "ProductDetailID", @@ -105,7 +104,7 @@ public interface ProductReview fcKeepInContent = false) Integer getProductDetailID(); - void setProductDetailID(final Integer _productDetailID); + void setProductDetailID(Integer _productDetailID); @Key @Property(name = "ReviewTitle", @@ -128,7 +127,7 @@ public interface ProductReview fcKeepInContent = false) String getReviewTitle(); - void setReviewTitle(final String _reviewTitle); + void setReviewTitle(String _reviewTitle); @Key @Property(name = "RevisionID", @@ -151,7 +150,7 @@ public interface ProductReview fcKeepInContent = false) Integer getRevisionID(); - void setRevisionID(final Integer _revisionID); + void setRevisionID(Integer _revisionID); @Property(name = "Comment", @@ -174,7 +173,7 @@ public interface ProductReview fcKeepInContent = false) String getComment(); - void setComment(final String _comment); + void setComment(String _comment); @Property(name = "Author", @@ -197,7 +196,7 @@ public interface ProductReview fcKeepInContent = false) String getAuthor(); - void setAuthor(final String _author); + void setAuthor(String _author); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewCollection.java index 745ce9cd3..9825a7005 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewKey.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewKey.java index aad0cddaf..500624e4c 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewKey.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/ProductReviewKey.java @@ -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.EntityType; @@ -57,7 +56,7 @@ public class ProductReviewKey extends AbstractEntityKey { return _productID; } - public void setProductID(final Integer _productID) { + public void setProductID(Integer _productID) { this._productID = _productID; } @@ -68,7 +67,7 @@ public class ProductReviewKey extends AbstractEntityKey { return _productDetailID; } - public void setProductDetailID(final Integer _productDetailID) { + public void setProductDetailID(Integer _productDetailID) { this._productDetailID = _productDetailID; } @@ -79,7 +78,7 @@ public class ProductReviewKey extends AbstractEntityKey { return _reviewTitle; } - public void setReviewTitle(final String _reviewTitle) { + public void setReviewTitle(String _reviewTitle) { this._reviewTitle = _reviewTitle; } @@ -90,7 +89,7 @@ public class ProductReviewKey extends AbstractEntityKey { return _revisionID; } - public void setRevisionID(final Integer _revisionID) { + public void setRevisionID(Integer _revisionID) { this._revisionID = _revisionID; } } diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompany.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompany.java index af0484a09..a3c971315 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompany.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompany.java @@ -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 PublicCompany fcKeepInContent = false) Integer getCompanyID(); - void setCompanyID(final Integer _companyID); + void setCompanyID(Integer _companyID); @Property(name = "CompanyCategory", @@ -106,7 +105,7 @@ public interface PublicCompany 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", @@ -129,7 +128,7 @@ public interface PublicCompany fcKeepInContent = false) Long getRevenue(); - void setRevenue(final Long _revenue); + void setRevenue(Long _revenue); @Property(name = "Name", @@ -152,7 +151,7 @@ public interface PublicCompany fcKeepInContent = false) String getName(); - void setName(final String _name); + void setName(String _name); @Property(name = "Address", @@ -175,7 +174,7 @@ public interface PublicCompany 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); @Property(name = "StockExchange", @@ -198,7 +197,7 @@ public interface PublicCompany fcKeepInContent = false) String getStockExchange(); - void setStockExchange(final String _stockExchange); + void setStockExchange(String _stockExchange); @@ -206,72 +205,72 @@ public interface PublicCompany 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); + @NavigationProperty(name = "Assets", type = "Microsoft.Test.OData.Services.ODataWCFService.Asset", targetSchema = "Microsoft.Test.OData.Services.ODataWCFService", targetContainer = "", - targetEntitySet = "") - org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AssetCollection getAssets(); - - void setAssets(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AssetCollection _assets); - + targetEntitySet = "", + containsTarget = true) + org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.Assets getAssets(); + void setAssets(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.Assets _assets); + @NavigationProperty(name = "Club", type = "Microsoft.Test.OData.Services.ODataWCFService.Club", targetSchema = "Microsoft.Test.OData.Services.ODataWCFService", targetContainer = "", - targetEntitySet = "") + targetEntitySet = "", + containsTarget = true) org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Club getClub(); - void setClub(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Club _club); - - + void setClub(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Club _club); + @NavigationProperty(name = "LabourUnion", type = "Microsoft.Test.OData.Services.ODataWCFService.LabourUnion", targetSchema = "Microsoft.Test.OData.Services.ODataWCFService", targetContainer = "InMemoryEntities", - targetEntitySet = "LabourUnion") + targetEntitySet = "LabourUnion", + containsTarget = false) org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.LabourUnion getLabourUnion(); - void setLabourUnion(final org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.LabourUnion _labourUnion); - - + void setLabourUnion(org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.LabourUnion _labourUnion); + @Override Operations operations(); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyCollection.java index f7a149d80..b90e82f90 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/PublicCompanyCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java index ed3f6ee08..4b7e86f65 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Statement.java @@ -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 Statement fcKeepInContent = false) Integer getStatementID(); - void setStatementID(final Integer _statementID); + void setStatementID(Integer _statementID); @Property(name = "TransactionType", @@ -105,7 +104,7 @@ public interface Statement fcKeepInContent = false) String getTransactionType(); - void setTransactionType(final String _transactionType); + void setTransactionType(String _transactionType); @Property(name = "TransactionDescription", @@ -128,7 +127,7 @@ public interface Statement fcKeepInContent = false) String getTransactionDescription(); - void setTransactionDescription(final String _transactionDescription); + void setTransactionDescription(String _transactionDescription); @Property(name = "Amount", @@ -151,7 +150,7 @@ public interface Statement fcKeepInContent = false) Double getAmount(); - void setAmount(final Double _amount); + void setAmount(Double _amount); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java index 7a52544c6..2f4c0a6de 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StatementCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java index 4035fed30..a99ff85f9 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPI.java @@ -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 StoredPI fcKeepInContent = false) Integer getStoredPIID(); - void setStoredPIID(final Integer _storedPIID); + void setStoredPIID(Integer _storedPIID); @Property(name = "PIName", @@ -105,7 +104,7 @@ public interface StoredPI fcKeepInContent = false) String getPIName(); - void setPIName(final String _pIName); + void setPIName(String _pIName); @Property(name = "PIType", @@ -128,7 +127,7 @@ public interface StoredPI fcKeepInContent = false) String getPIType(); - void setPIType(final String _pIType); + void setPIType(String _pIType); @Property(name = "CreatedDate", @@ -151,7 +150,7 @@ public interface StoredPI fcKeepInContent = false) Calendar getCreatedDate(); - void setCreatedDate(final Calendar _createdDate); + void setCreatedDate(Calendar _createdDate); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java index 2435a26dd..ba7ab8f6c 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/StoredPICollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java index 60345e8c7..de3de5d83 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/Subscription.java @@ -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 Subscription fcKeepInContent = false) Integer getSubscriptionID(); - void setSubscriptionID(final Integer _subscriptionID); + void setSubscriptionID(Integer _subscriptionID); @Property(name = "TemplateGuid", @@ -105,7 +104,7 @@ public interface Subscription fcKeepInContent = false) String getTemplateGuid(); - void setTemplateGuid(final String _templateGuid); + void setTemplateGuid(String _templateGuid); @Property(name = "Title", @@ -128,7 +127,7 @@ public interface Subscription fcKeepInContent = false) String getTitle(); - void setTitle(final String _title); + void setTitle(String _title); @Property(name = "Category", @@ -151,7 +150,7 @@ public interface Subscription fcKeepInContent = false) String getCategory(); - void setCategory(final String _category); + void setCategory(String _category); @Property(name = "CreatedDate", @@ -174,7 +173,7 @@ public interface Subscription fcKeepInContent = false) Calendar getCreatedDate(); - void setCreatedDate(final Calendar _createdDate); + void setCreatedDate(Calendar _createdDate); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java index 17885bf1c..08393e72e 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/SubscriptionCollection.java @@ -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; diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java index 1b20c6bcd..4bc5702f9 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/microsoft/test/odata/services/odatawcfservice/types/package-info.java @@ -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.types; diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java index 4960a48b7..bff599313 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java @@ -81,7 +81,7 @@ public class AsyncTestITCase extends AbstractTestITCase { assertNotNull(entity); assertEquals("Microsoft.Test.OData.Services.ODataWCFService.Customer", entity.getTypeName().toString()); - assertEquals(testStaticServiceRootURL + "/Customers(PersonID=1)", entity.getEditLink().toASCIIString()); + assertEquals(testStaticServiceRootURL + "/Customers(1)", entity.getEditLink().toASCIIString()); assertEquals(3, entity.getNavigationLinks().size()); diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java index ec82cca9f..dafe38cd0 100644 --- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java @@ -310,14 +310,14 @@ public class EntityRetrieveTestITCase extends AbstractTestITCase { private void contained(final ODataClient client, final ODataPubFormat format) throws EdmPrimitiveTypeException { final URI uri = client.getURIBuilder(testStaticServiceRootURL). appendEntitySetSegment("Accounts").appendKeySegment(101). - appendNavigationSegment("MyPaymentInstruments").appendKeySegment(101901).build(); + appendNavigationSegment("MyPaymentInstruments").appendKeySegment(101902).build(); final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(uri); req.setFormat(format); final ODataEntity contained = req.execute().getBody(); assertNotNull(contained); assertEquals("Microsoft.Test.OData.Services.ODataWCFService.PaymentInstrument", contained.getTypeName().toString()); - assertEquals(101901, + assertEquals(101902, contained.getProperty("PaymentInstrumentID").getPrimitiveValue().toCastValue(Integer.class), 0); assertEquals("Edm.DateTimeOffset", contained.getProperty("CreatedDate").getPrimitiveValue().getTypeName()); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java index e39b8e788..cd0aaeada 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java @@ -81,7 +81,6 @@ public class EdmDuration extends SingletonPrimitiveType { throw new EdmPrimitiveTypeException( "EdmPrimitiveTypeException.LITERAL_UNCONVERTIBLE_TO_VALUE_TYPE.addContent(value, returnType), e"); } catch (final ClassCastException e) { - e.printStackTrace(); throw new EdmPrimitiveTypeException( "EdmPrimitiveTypeException.VALUE_TYPE_NOT_SUPPORTED.addContent(returnType), e"); }