[OLINGO-603] TecSvc enhancements
This commit is contained in:
parent
2d445e2a27
commit
61b0daa856
|
@ -540,7 +540,8 @@ abstract class AbstractPersistenceManager implements PersistenceManager {
|
|||
private AttachedEntityStatus resolveNavigationLink(
|
||||
final NavigationProperty property, final EntityInvocationHandler handler) {
|
||||
if (handler.getUUID().getEntitySetURI() == null) {
|
||||
final Object key = CoreUtils.getKey(service.getClient(), handler, handler.getTypeRef(), handler.getEntity());
|
||||
//Load key
|
||||
CoreUtils.getKey(service.getClient(), handler, handler.getTypeRef(), handler.getEntity());
|
||||
handler.updateUUID(CoreUtils.getTargetEntitySetURI(service.getClient(), property), handler.getTypeRef(), null);
|
||||
service.getContext().entityContext().attach(handler, AttachedEntityStatus.NEW);
|
||||
return AttachedEntityStatus.NEW;
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
|
||||
import org.apache.olingo.ext.proxy.api.EntityType;
|
||||
|
||||
public class EntityUUID implements Serializable {
|
||||
|
@ -38,8 +39,9 @@ public class EntityUUID implements Serializable {
|
|||
private final Object key;
|
||||
|
||||
/**
|
||||
* Needed when representing a new entity, where key is potentially null.
|
||||
* Needed when representing a new entity, where key is potentially null. The temp key is used via reflection
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private final int tempKey;
|
||||
|
||||
private Class<?> type;
|
||||
|
|
|
@ -36,9 +36,9 @@ public interface EdmNavigationProperty extends EdmElement, EdmAnnotationsTarget,
|
|||
boolean isNullable();
|
||||
|
||||
/**
|
||||
* @return true if containsTarget or null if not specified
|
||||
* @return true if containsTarget
|
||||
*/
|
||||
Boolean containsTarget();
|
||||
boolean containsTarget();
|
||||
|
||||
/**
|
||||
* @return the partner navigation property
|
||||
|
|
|
@ -26,6 +26,7 @@ public class EntitySet extends BindingTarget {
|
|||
|
||||
private static final long serialVersionUID = 5291570018480936643L;
|
||||
|
||||
//Default for EntitySets is true
|
||||
private boolean includeInServiceDocument = true;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -162,11 +162,12 @@ public interface HttpHeader {
|
|||
*/
|
||||
public static final String ODATA_MAX_VERSION = "OData-MaxVersion";
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
/**
|
||||
* OData Prefer Header
|
||||
* See {@link <a href="http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part1-protocol/
|
||||
* odata-v4.0-errata01-os-part1-protocol-complete.html#_Toc399426728">OData Version 4.0 Part 1:
|
||||
* Protocol Plus Errata 01</a>}
|
||||
* See
|
||||
* {@link <a href="http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part1-protocol/odata-v4.0-errata01-os-part1-protocol-complete.html#_Toc399426728"> OData Version 4.0 Part 1: Protocol Plus Errata 01</a>}
|
||||
*/
|
||||
public static final String PREFER = "Prefer";
|
||||
//CHECKSTYLE:ON
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class EdmNavigationPropertyImpl extends AbstractEdmNamed implements EdmEl
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean containsTarget() {
|
||||
public boolean containsTarget() {
|
||||
return navigationProperty.isContainsTarget();
|
||||
}
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ public class MetadataDocumentXmlSerializer {
|
|||
|
||||
private final static String NS_EDM = "http://docs.oasis-open.org/odata/ns/edm";
|
||||
private static final String XML_ENTITY_SET_PATH = "EntitySetPath";
|
||||
private static final String XML_CONTAINS_TARGET = "ContainsTarget";
|
||||
|
||||
private final ServiceMetadata serviceMetadata;
|
||||
private final Map<String, String> namespaceToAlias = new HashMap<String, String>();
|
||||
|
@ -163,15 +164,15 @@ public class MetadataDocumentXmlSerializer {
|
|||
// EnumTypes
|
||||
appendEnumTypes(writer, schema.getEnumTypes());
|
||||
|
||||
// TypeDefinitions
|
||||
appendTypeDefinitions(writer, schema.getTypeDefinitions());
|
||||
|
||||
// EntityTypes
|
||||
appendEntityTypes(writer, schema.getEntityTypes());
|
||||
|
||||
// ComplexTypes
|
||||
appendComplexTypes(writer, schema.getComplexTypes());
|
||||
|
||||
// TypeDefinitions
|
||||
appendTypeDefinitions(writer, schema.getTypeDefinitions());
|
||||
|
||||
// Actions
|
||||
appendActions(writer, schema.getActions());
|
||||
|
||||
|
@ -227,8 +228,6 @@ public class MetadataDocumentXmlSerializer {
|
|||
// EntitySets
|
||||
appendEntitySets(writer, container.getEntitySets());
|
||||
|
||||
// Singletons
|
||||
appendSingletons(writer, container.getSingletons());
|
||||
|
||||
// ActionImports
|
||||
appendActionImports(writer, container.getActionImports());
|
||||
|
@ -242,6 +241,9 @@ public class MetadataDocumentXmlSerializer {
|
|||
}
|
||||
appendFunctionImports(writer, container.getFunctionImports(), containerNamespace);
|
||||
|
||||
// Singletons
|
||||
appendSingletons(writer, container.getSingletons());
|
||||
|
||||
writer.writeEndElement();
|
||||
}
|
||||
}
|
||||
|
@ -265,8 +267,10 @@ public class MetadataDocumentXmlSerializer {
|
|||
if (returnedEntitySet != null) {
|
||||
writer.writeAttribute(XML_ENTITY_SET, containerNamespace + "." + returnedEntitySet.getName());
|
||||
}
|
||||
writer.writeAttribute(XML_INCLUDE_IN_SERVICE_DOCUMENT, "" + functionImport.isIncludeInServiceDocument());
|
||||
|
||||
// Default is false and we do not write the default
|
||||
if (functionImport.isIncludeInServiceDocument()) {
|
||||
writer.writeAttribute(XML_INCLUDE_IN_SERVICE_DOCUMENT, "" + functionImport.isIncludeInServiceDocument());
|
||||
}
|
||||
writer.writeEndElement();
|
||||
}
|
||||
}
|
||||
|
@ -311,6 +315,9 @@ public class MetadataDocumentXmlSerializer {
|
|||
writer.writeStartElement(XML_ENTITY_SET);
|
||||
writer.writeAttribute(XML_NAME, entitySet.getName());
|
||||
writer.writeAttribute(XML_ENTITY_TYPE, getAliasedFullQualifiedName(entitySet.getEntityType(), false));
|
||||
if (!entitySet.isIncludeInServiceDocument()) {
|
||||
writer.writeAttribute(XML_INCLUDE_IN_SERVICE_DOCUMENT, "" + entitySet.isIncludeInServiceDocument());
|
||||
}
|
||||
|
||||
appendNavigationPropertyBindings(writer, entitySet);
|
||||
writer.writeEndElement();
|
||||
|
@ -325,8 +332,13 @@ public class MetadataDocumentXmlSerializer {
|
|||
if (function.getEntitySetPath() != null) {
|
||||
writer.writeAttribute(XML_ENTITY_SET_PATH, function.getEntitySetPath());
|
||||
}
|
||||
writer.writeAttribute(XML_IS_BOUND, "" + function.isBound());
|
||||
writer.writeAttribute(XML_IS_COMPOSABLE, "" + function.isComposable());
|
||||
if (function.isBound()) {
|
||||
writer.writeAttribute(XML_IS_BOUND, "" + function.isBound());
|
||||
}
|
||||
|
||||
if (function.isComposable()) {
|
||||
writer.writeAttribute(XML_IS_COMPOSABLE, "" + function.isComposable());
|
||||
}
|
||||
|
||||
appendOperationParameters(writer, function);
|
||||
|
||||
|
@ -492,6 +504,10 @@ public class MetadataDocumentXmlSerializer {
|
|||
writer.writeAttribute(XML_PARTNER, partner.getName());
|
||||
}
|
||||
|
||||
if (navigationProperty.containsTarget()) {
|
||||
writer.writeAttribute(XML_CONTAINS_TARGET, "" + navigationProperty.containsTarget());
|
||||
}
|
||||
|
||||
if (navigationProperty.getReferentialConstraints() != null) {
|
||||
for (EdmReferentialConstraint constraint : navigationProperty.getReferentialConstraints()) {
|
||||
writer.writeEmptyElement("ReferentialConstraint");
|
||||
|
|
|
@ -67,11 +67,11 @@ public class ComplexTypeProvider {
|
|||
.setProperties(
|
||||
Arrays.asList(PropertyProvider.propertyString, PropertyProvider.propertyBinary,
|
||||
PropertyProvider.propertyBoolean, PropertyProvider.propertyByte, PropertyProvider.propertyDate,
|
||||
PropertyProvider.propertyDateTimeOffset, PropertyProvider.propertyDecimal_Scale_Precision,
|
||||
PropertyProvider.propertyDateTimeOffset_Precision, PropertyProvider.propertyDecimal_Scale_Precision,
|
||||
PropertyProvider.propertySingle, PropertyProvider.propertyDouble, PropertyProvider.propertyDuration,
|
||||
PropertyProvider.propertyGuid, PropertyProvider.propertyInt16, PropertyProvider.propertyInt32,
|
||||
PropertyProvider.propertyInt64, PropertyProvider.propertySByte, PropertyProvider.propertyTimeOfDay
|
||||
));
|
||||
PropertyProvider.propertyInt64, PropertyProvider.propertySByte,
|
||||
PropertyProvider.propertyTimeOfDay_Precision));
|
||||
} else if (complexTypeName.equals(nameCTCollAllPrim)) {
|
||||
return new ComplexType()
|
||||
.setName("CTCollAllPrim")
|
||||
|
@ -91,7 +91,7 @@ public class ComplexTypeProvider {
|
|||
return new ComplexType()
|
||||
.setName("CTTwoPrim")
|
||||
.setProperties(Arrays.asList(PropertyProvider.propertyInt16_NotNullable,
|
||||
PropertyProvider.propertyString_NotNullable));
|
||||
PropertyProvider.propertyString_NotNullable));
|
||||
|
||||
} else if (complexTypeName.equals(nameCTCompNav)) {
|
||||
return new ComplexType()
|
||||
|
@ -149,17 +149,17 @@ public class ComplexTypeProvider {
|
|||
.setName("NavPropertyETMediaMany")
|
||||
.setType(EntityTypeProvider.nameETMedia).setCollection(true)
|
||||
)));
|
||||
|
||||
} else if(complexTypeName.equals(nameCTNavCont)) {
|
||||
|
||||
} else if (complexTypeName.equals(nameCTNavCont)) {
|
||||
return new ComplexType()
|
||||
.setName("CTNavCont")
|
||||
.setProperties(new ArrayList<Property>())
|
||||
.setNavigationProperties(Arrays.asList(
|
||||
PropertyProvider.collectionNavPropertyETKeyNavContMany_CT_ETKeyNav,
|
||||
PropertyProvider.navPropertyETKeyNavContOne_CT_ETeyNav,
|
||||
PropertyProvider.collectionNavPropertyETTwoKeyNavContMany_CT_ETKeyNav,
|
||||
PropertyProvider.navPropertyETTwoKeyNavContOne_CT_ETKeyNav));
|
||||
|
||||
.setName("CTNavCont")
|
||||
.setProperties(new ArrayList<Property>())
|
||||
.setNavigationProperties(Arrays.asList(
|
||||
PropertyProvider.collectionNavPropertyETKeyNavContMany_CT_ETKeyNav,
|
||||
PropertyProvider.navPropertyETKeyNavContOne_CT_ETeyNav,
|
||||
PropertyProvider.collectionNavPropertyETTwoKeyNavContMany_CT_ETKeyNav,
|
||||
PropertyProvider.navPropertyETTwoKeyNavContOne_CT_ETKeyNav));
|
||||
|
||||
} else if (complexTypeName.equals(nameCTBasePrimCompNav)) {
|
||||
return new ComplexType()
|
||||
.setName("CTBasePrimCompNav")
|
||||
|
|
|
@ -463,6 +463,7 @@ public class FunctionProvider {
|
|||
.asList(
|
||||
new Function()
|
||||
.setName("BFCESTwoKeyNavRTESTwoKeyNav")
|
||||
.setEntitySetPath("BindingParam/NavPropertyETTwoKeyNavMany")
|
||||
.setBound(true)
|
||||
.setParameters(
|
||||
Arrays.asList(
|
||||
|
@ -494,21 +495,21 @@ public class FunctionProvider {
|
|||
new Parameter().setName("BindingParam").setType(EntityTypeProvider.nameETKeyNav)
|
||||
.setCollection(true).setNullable(false)))
|
||||
.setComposable(true)
|
||||
.setReturnType(
|
||||
new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav).setCollection(true)
|
||||
.setNullable(false)),
|
||||
new Function()
|
||||
.setName("BFCESTwoKeyNavRTESTwoKeyNav")
|
||||
.setBound(true)
|
||||
.setParameters(
|
||||
Arrays.asList(new Parameter().setName("BindingParam").setType(EntityTypeProvider.nameETKeyNav)
|
||||
.setCollection(true).setNullable(false),
|
||||
new Parameter().setName("ParameterString").setType(PropertyProvider.nameString)
|
||||
.setCollection(false).setNullable(false)))
|
||||
.setComposable(true)
|
||||
.setReturnType(
|
||||
new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav).setCollection(true)
|
||||
.setNullable(false))
|
||||
// new Function()
|
||||
// .setName("BFCESTwoKeyNavRTESTwoKeyNav")
|
||||
// .setBound(true)
|
||||
// .setParameters(
|
||||
// Arrays.asList(new Parameter().setName("BindingParam").setType(EntityTypeProvider.nameETKeyNav)
|
||||
// .setCollection(true).setNullable(false),
|
||||
// new Parameter().setName("ParameterString").setType(PropertyProvider.nameString)
|
||||
// .setCollection(false).setNullable(false)))
|
||||
// .setComposable(true)
|
||||
// .setReturnType(
|
||||
// new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav).setCollection(true)
|
||||
// .setNullable(false))
|
||||
);
|
||||
|
||||
} else if (functionName.equals(nameBFCStringRTESTwoKeyNav)) {
|
||||
|
@ -624,6 +625,7 @@ public class FunctionProvider {
|
|||
return Arrays.asList(
|
||||
new Function()
|
||||
.setName("BFCETTwoKeyNavRTESTwoKeyNav")
|
||||
.setEntitySetPath("BindingParam/NavPropertyETTwoKeyNavOne")
|
||||
.setBound(true)
|
||||
.setParameters(Arrays.asList(
|
||||
new Parameter().setName("BindingParam").setType(EntityTypeProvider.nameETTwoKeyNav)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -46,10 +46,17 @@ public class SchemaProvider {
|
|||
schema.setNamespace(NAMESPACE);
|
||||
schema.setAlias("Namespace1_Alias");
|
||||
schemas.add(schema);
|
||||
|
||||
// EnumTypes
|
||||
List<EnumType> enumTypes = new ArrayList<EnumType>();
|
||||
schema.setEnumTypes(enumTypes);
|
||||
|
||||
// TypeDefinitions
|
||||
List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>();
|
||||
schema.setTypeDefinitions(typeDefinitions);
|
||||
typeDefinitions.add(prov.getTypeDefinition(TypeDefinitionProvider.nameTDString));
|
||||
enumTypes.add(prov.getEnumType(EnumTypeProvider.nameENString));
|
||||
|
||||
// EntityTypes
|
||||
List<EntityType> entityTypes = new ArrayList<EntityType>();
|
||||
schema.setEntityTypes(entityTypes);
|
||||
|
@ -59,6 +66,7 @@ public class SchemaProvider {
|
|||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoPrim));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETMixPrimCollComp));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoKeyTwoPrim));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETMixEnumDefCollComp));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETBase));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoBase));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAllKey));
|
||||
|
@ -74,12 +82,12 @@ public class SchemaProvider {
|
|||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoKeyNav));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETBaseTwoKeyNav));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoBaseTwoKeyNav));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETKeyNavCont));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompMixPrimCollComp));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETKeyPrimNav));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAbstract));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAbstractBase));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETMixEnumDefCollComp));
|
||||
entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETKeyNavCont));
|
||||
|
||||
|
||||
// ComplexTypes
|
||||
List<ComplexType> complexType = new ArrayList<ComplexType>();
|
||||
|
@ -89,6 +97,7 @@ public class SchemaProvider {
|
|||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCollAllPrim));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoPrim));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixPrimCollComp));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixEnumDef));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTBase));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoBase));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompComp));
|
||||
|
@ -98,24 +107,20 @@ public class SchemaProvider {
|
|||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTBasePrimCompNav));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoBasePrimCompNav));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompNav));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixEnumDef));
|
||||
complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTNavCont));
|
||||
|
||||
// TypeDefinitions
|
||||
List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>();
|
||||
schema.setTypeDefinitions(typeDefinitions);
|
||||
typeDefinitions.add(prov.getTypeDefinition(TypeDefinitionProvider.nameTDString));
|
||||
|
||||
// Actions
|
||||
List<Action> actions = new ArrayList<Action>();
|
||||
schema.setActions(actions);
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAETAllPrimRT));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAETTwoKeyNavRTETTwoKeyNav));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAESAllPrimRTETAllPrim));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAESTwoKeyNavRTESKeyNav));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAESTwoKeyNavRTESTwoKeyNav));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAESTwoKeyNavRTESKeyNav));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAETAllPrimRT));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameBAESAllPrimRT));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameUARTString));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameUARTCollStringTwoParam));
|
||||
actions.addAll(prov.getActions(ActionProvider.nameUARTCTTwoPrimParam));
|
||||
|
@ -135,7 +140,6 @@ public class SchemaProvider {
|
|||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTInt16));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollETKeyNavContParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETTwoKeyNavParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETTwoKeyNavParamCTTwoPrim));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTStringTwoParam));
|
||||
|
@ -150,10 +154,12 @@ public class SchemaProvider {
|
|||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollCTTwoPrim));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETMedia));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollETMedia));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollETMixPrimCollCompTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTCollETMixPrimCollCompTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETAllPrimTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTESMixPrimCollCompTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollETMixPrimCollCompTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTCollCTNavFiveProp));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollETKeyNavContParam));
|
||||
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTESTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCStringRTESTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETBaseTwoKeyNavRTETTwoKeyNav));
|
||||
|
@ -173,19 +179,19 @@ public class SchemaProvider {
|
|||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCollCTPrimCompRTESAllPrim));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESKeyNavRTETKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESKeyNavRTESTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETKeyNavRTETKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFESTwoKeyNavRTESTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETTwoKeyNavRTETTwoKeyNav));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETTwoKeyNavRTCTTwoPrim));
|
||||
|
||||
//functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTESMixPrimCollCompTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCTNavFiveProp));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCollCTNavFiveProp));
|
||||
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTStringParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESKeyNavRTETKeyNavParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCTPrimCompRTETTwoKeyNavParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTCollETMixPrimCollCompTwoParam));
|
||||
functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESKeyNavRTESTwoKeyNav));
|
||||
|
||||
|
||||
// functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCTPrimCompRTESTwoKeyNavParam));
|
||||
|
||||
// EntityContainer
|
||||
|
|
|
@ -89,7 +89,7 @@ public class MetadataDocumentTest {
|
|||
assertThat(metadata, containsString("<Action Name=\"UARTCTTwoPrimParam\" IsBound=\"false\">"
|
||||
+ "<Parameter Name=\"ParameterInt16\" Type=\"Edm.Int16\" Nullable=\"false\"/>"
|
||||
+ "<ReturnType Type=\"Namespace1_Alias.CTTwoPrim\" Nullable=\"false\"/></Action>"));
|
||||
|
||||
|
||||
assertThat(metadata,
|
||||
containsString("<Action Name=\"BAESAllPrimRTETAllPrim\" IsBound=\"true\">"
|
||||
+ "<Parameter Name=\"ParameterESAllPrim\" "
|
||||
|
@ -97,11 +97,12 @@ public class MetadataDocumentTest {
|
|||
+ "<ReturnType Type=\"Namespace1_Alias.ETAllPrim\"/></Action>"));
|
||||
|
||||
assertThat(metadata,
|
||||
containsString("<Function Name=\"UFNRTInt16\" IsBound=\"false\" IsComposable=\"false\">"
|
||||
containsString("<Function Name=\"UFNRTInt16\">"
|
||||
+ "<ReturnType Type=\"Edm.Int16\"/></Function>"));
|
||||
|
||||
assertThat(metadata,
|
||||
containsString("<Function Name=\"BFCESTwoKeyNavRTESTwoKeyNav\" IsBound=\"true\" IsComposable=\"true\">"
|
||||
containsString("<Function Name=\"BFCESTwoKeyNavRTESTwoKeyNav\" "
|
||||
+ "EntitySetPath=\"BindingParam/NavPropertyETTwoKeyNavMany\" IsBound=\"true\" IsComposable=\"true\">"
|
||||
+ "<Parameter Name=\"BindingParam\" Type=\"Collection(Namespace1_Alias.ETTwoKeyNav)\" "
|
||||
+ "Nullable=\"false\"/>"
|
||||
+ "<ReturnType Type=\"Collection(Namespace1_Alias.ETTwoKeyNav)\" Nullable=\"false\"/></Function>"));
|
||||
|
@ -122,7 +123,11 @@ public class MetadataDocumentTest {
|
|||
containsString("<ActionImport Name=\"AIRTCTTwoPrimParam\" Action=\"Namespace1_Alias.UARTCTTwoPrimParam\"/>"));
|
||||
|
||||
assertThat(metadata,
|
||||
containsString("<FunctionImport Name=\"FINInvisible2RTInt16\" Function=\"Namespace1_Alias.UFNRTInt16\" "
|
||||
containsString("<FunctionImport Name=\"FINInvisible2RTInt16\" Function=\"Namespace1_Alias.UFNRTInt16\"/>"));
|
||||
|
||||
assertThat(
|
||||
metadata,
|
||||
containsString("<EntitySet Name=\"ESInvisible\" EntityType=\"Namespace1_Alias.ETAllPrim\" "
|
||||
+ "IncludeInServiceDocument=\"false\"/>"));
|
||||
|
||||
assertThat(metadata, containsString("</EntityContainer></Schema></edmx:DataServices></edmx:Edmx>"));
|
||||
|
|
|
@ -585,10 +585,10 @@ public class TestFullResourcePath {
|
|||
.isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
|
||||
.isType(EntityTypeProvider.nameETTwoKeyNav);
|
||||
|
||||
testUri.run("ESKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='3')")
|
||||
testUri.run("ESTwoKeyNav/olingo.odata.test1.BFCESTwoKeyNavRTESTwoKeyNav(ParameterString='3')")
|
||||
.isKind(UriInfoKind.resource).goPath()
|
||||
.first()
|
||||
.isEntitySet("ESKeyNav")
|
||||
.isEntitySet("ESTwoKeyNav")
|
||||
.n()
|
||||
.isFunction("BFCESTwoKeyNavRTESTwoKeyNav")
|
||||
.isParameter(0, "ParameterString", "'3'")
|
||||
|
|
Loading…
Reference in New Issue