diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java index 238686af2..06c190a42 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java @@ -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; 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 1f6bdf018..b8e4fd75f 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 @@ -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; diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java index ff0936c3a..445ef5f98 100644 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java @@ -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 diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java index b6356f74d..51d28dbd2 100644 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java @@ -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 diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpHeader.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpHeader.java index 23a396c79..7fb682777 100644 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpHeader.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpHeader.java @@ -162,11 +162,12 @@ public interface HttpHeader { */ public static final String ODATA_MAX_VERSION = "OData-MaxVersion"; + // CHECKSTYLE:OFF /** * OData Prefer Header - * See {@link OData Version 4.0 Part 1: - * Protocol Plus Errata 01} + * See + * {@link OData Version 4.0 Part 1: Protocol Plus Errata 01} */ public static final String PREFER = "Prefer"; + //CHECKSTYLE:ON } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/provider/EdmNavigationPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/provider/EdmNavigationPropertyImpl.java index 11b4caecb..2dd6dce12 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/provider/EdmNavigationPropertyImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/provider/EdmNavigationPropertyImpl.java @@ -59,7 +59,7 @@ public class EdmNavigationPropertyImpl extends AbstractEdmNamed implements EdmEl } @Override - public Boolean containsTarget() { + public boolean containsTarget() { return navigationProperty.isContainsTarget(); } diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java index a2f54c744..14fe14759 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java @@ -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 namespaceToAlias = new HashMap(); @@ -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"); diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java index 52761c577..b8b489517 100644 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java +++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java @@ -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()) - .setNavigationProperties(Arrays.asList( - PropertyProvider.collectionNavPropertyETKeyNavContMany_CT_ETKeyNav, - PropertyProvider.navPropertyETKeyNavContOne_CT_ETeyNav, - PropertyProvider.collectionNavPropertyETTwoKeyNavContMany_CT_ETKeyNav, - PropertyProvider.navPropertyETTwoKeyNavContOne_CT_ETKeyNav)); - + .setName("CTNavCont") + .setProperties(new ArrayList()) + .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") diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java index bcf08633a..f641c2a37 100644 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java +++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java @@ -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) diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java index 07fbd25b3..db1976612 100644 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java +++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java @@ -32,7 +32,7 @@ public class PropertyProvider { public static final FullQualifiedName nameDate = EdmPrimitiveTypeKind.Date.getFullQualifiedName(); public static final FullQualifiedName nameDateTimeOffset = - EdmPrimitiveTypeKind.DateTimeOffset.getFullQualifiedName(); + EdmPrimitiveTypeKind.DateTimeOffset.getFullQualifiedName(); public static final FullQualifiedName nameDecimal = EdmPrimitiveTypeKind.Decimal.getFullQualifiedName(); public static final FullQualifiedName nameDouble = EdmPrimitiveTypeKind.Double.getFullQualifiedName(); @@ -51,723 +51,732 @@ public class PropertyProvider { // Primitive Properties -------------------------------------------------------------------------------------------- public static final Property collPropertyBinary = new Property() - .setName("CollPropertyBinary") - .setType(nameBinary) - .setCollection(true); + .setName("CollPropertyBinary") + .setType(nameBinary) + .setCollection(true); public static final Property collPropertyBinary_ExplicitNullable = new Property() - .setName("CollPropertyBinary") - .setType(nameBinary) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyBinary") + .setType(nameBinary) + .setNullable(true) + .setCollection(true); public static final Property collPropertyBinary_NotNullable = new Property() - .setName("CollPropertyBinary") - .setType(nameBinary) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyBinary") + .setType(nameBinary) + .setNullable(false) + .setCollection(true); public static final Property collPropertyBoolean = new Property() - .setName("CollPropertyBoolean") - .setType(nameBoolean) - .setCollection(true); + .setName("CollPropertyBoolean") + .setType(nameBoolean) + .setCollection(true); public static final Property collPropertyBoolean_ExplicitNullable = new Property() - .setName("CollPropertyBoolean") - .setType(nameBoolean) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyBoolean") + .setType(nameBoolean) + .setNullable(true) + .setCollection(true); public static final Property collPropertyBoolean_NotNullable = new Property() - .setName("CollPropertyBoolean") - .setType(nameBoolean) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyBoolean") + .setType(nameBoolean) + .setNullable(true) + .setCollection(true); public static final Property collPropertyByte = new Property() - .setName("CollPropertyByte") - .setType(nameByte) - .setCollection(true); + .setName("CollPropertyByte") + .setType(nameByte) + .setCollection(true); public static final Property collPropertyByte_ExplicitNullable = new Property() - .setName("CollPropertyByte") - .setType(nameByte) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyByte") + .setType(nameByte) + .setNullable(true) + .setCollection(true); public static final Property collPropertyByte_NotNullable = new Property() - .setName("CollPropertyByte") - .setType(nameByte) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyByte") + .setType(nameByte) + .setNullable(false) + .setCollection(true); public static final Property collPropertyDate = new Property() - .setName("CollPropertyDate") - .setType(nameDate) - .setCollection(true); + .setName("CollPropertyDate") + .setType(nameDate) + .setCollection(true); public static final Property collPropertyDate_ExplicitNullable = new Property() - .setName("CollPropertyDate") - .setType(nameDate) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyDate") + .setType(nameDate) + .setNullable(true) + .setCollection(true); public static final Property collPropertyDate_NotNullable = new Property() - .setName("CollPropertyDate") - .setType(nameDate) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyDate") + .setType(nameDate) + .setNullable(false) + .setCollection(true); public static final Property collPropertyDateTimeOffset = new Property() - .setName("CollPropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setCollection(true); + .setName("CollPropertyDateTimeOffset") + .setType(nameDateTimeOffset) + .setCollection(true); public static final Property collPropertyDateTimeOffset_ExplicitNullable = new Property() - .setName("CollPropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyDateTimeOffset") + .setType(nameDateTimeOffset) + .setNullable(true) + .setCollection(true); public static final Property collPropertyDateTimeOffset_NotNullable = new Property() - .setName("CollPropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyDateTimeOffset") + .setType(nameDateTimeOffset) + .setNullable(false) + .setCollection(true); public static final Property collPropertyDecimal = new Property() - .setName("CollPropertyDecimal") - .setType(nameDecimal) - .setCollection(true); + .setName("CollPropertyDecimal") + .setType(nameDecimal) + .setCollection(true); public static final Property collPropertyDecimal_ExplicitNullable = new Property() - .setName("CollPropertyDecimal") - .setType(nameDecimal) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyDecimal") + .setType(nameDecimal) + .setNullable(true) + .setCollection(true); public static final Property collPropertyDecimal_NotNullable = new Property() - .setName("CollPropertyDecimal") - .setType(nameDecimal) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyDecimal") + .setType(nameDecimal) + .setNullable(false) + .setCollection(true); public static final Property collPropertyDouble = new Property() - .setName("CollPropertyDouble") - .setType(nameDouble) - .setCollection(true); + .setName("CollPropertyDouble") + .setType(nameDouble) + .setCollection(true); public static final Property collPropertyDouble_ExplicitNullable = new Property() - .setName("CollPropertyDouble") - .setType(nameDouble) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyDouble") + .setType(nameDouble) + .setNullable(true) + .setCollection(true); public static final Property collPropertyDouble_NotNullable = new Property() - .setName("CollPropertyDouble") - .setType(nameDouble) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyDouble") + .setType(nameDouble) + .setNullable(false) + .setCollection(true); public static final Property collPropertyDuration = new Property() - .setName("CollPropertyDuration") - .setType(nameDuration) - .setCollection(true); + .setName("CollPropertyDuration") + .setType(nameDuration) + .setCollection(true); public static final Property collPropertyDuration_ExplicitNullable = new Property() - .setName("CollPropertyDuration") - .setType(nameDuration) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyDuration") + .setType(nameDuration) + .setNullable(true) + .setCollection(true); public static final Property collPropertyDuration_NotNullable = new Property() - .setName("CollPropertyDuration") - .setType(nameDuration) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyDuration") + .setType(nameDuration) + .setNullable(false) + .setCollection(true); public static final Property collPropertyGuid = new Property() - .setName("CollPropertyGuid") - .setType(nameGuid) - .setCollection(true); + .setName("CollPropertyGuid") + .setType(nameGuid) + .setCollection(true); public static final Property collPropertyGuid_ExplicitNullable = new Property() - .setName("CollPropertyGuid") - .setType(nameGuid) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyGuid") + .setType(nameGuid) + .setNullable(true) + .setCollection(true); public static final Property collPropertyGuid_NotNullable = new Property() - .setName("CollPropertyGuid") - .setType(nameGuid) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyGuid") + .setType(nameGuid) + .setNullable(false) + .setCollection(true); public static final Property collPropertyInt16 = new Property() - .setName("CollPropertyInt16") - .setType(nameInt16) - .setCollection(true); + .setName("CollPropertyInt16") + .setType(nameInt16) + .setCollection(true); public static final Property collPropertyInt16_ExplicitNullable = new Property() - .setName("CollPropertyInt16") - .setType(nameInt16) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyInt16") + .setType(nameInt16) + .setNullable(true) + .setCollection(true); public static final Property collPropertyInt16_NotNullable = new Property() - .setName("CollPropertyInt16") - .setType(nameInt16) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyInt16") + .setType(nameInt16) + .setNullable(false) + .setCollection(true); public static final Property collPropertyInt32 = new Property() - .setName("CollPropertyInt32") - .setType(nameInt32) - .setCollection(true); + .setName("CollPropertyInt32") + .setType(nameInt32) + .setCollection(true); public static final Property collPropertyInt32_ExplicitNullable = new Property() - .setName("CollPropertyInt32") - .setType(nameInt32) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyInt32") + .setType(nameInt32) + .setNullable(true) + .setCollection(true); public static final Property collPropertyInt32_NotNullable = new Property() - .setName("CollPropertyInt32") - .setType(nameInt32) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyInt32") + .setType(nameInt32) + .setNullable(false) + .setCollection(true); public static final Property collPropertyInt64 = new Property() - .setName("CollPropertyInt64") - .setType(nameInt64) - .setCollection(true); + .setName("CollPropertyInt64") + .setType(nameInt64) + .setCollection(true); public static final Property collPropertyInt64_ExplicitNullable = new Property() - .setName("CollPropertyInt64") - .setType(nameInt64) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyInt64") + .setType(nameInt64) + .setNullable(true) + .setCollection(true); public static final Property collPropertyInt64_NotNullable = new Property() - .setName("CollPropertyInt64") - .setType(nameInt64) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyInt64") + .setType(nameInt64) + .setNullable(false) + .setCollection(true); public static final Property collPropertySByte = new Property() - .setName("CollPropertySByte") - .setType(nameSByte) - .setCollection(true); + .setName("CollPropertySByte") + .setType(nameSByte) + .setCollection(true); public static final Property collPropertySByte_ExplicitNullable = new Property() - .setName("CollPropertySByte") - .setType(nameSByte) - .setNullable(true) - .setCollection(true); + .setName("CollPropertySByte") + .setType(nameSByte) + .setNullable(true) + .setCollection(true); public static final Property collPropertySByte_NotNullable = new Property() - .setName("CollPropertySByte") - .setType(nameSByte) - .setNullable(false) - .setCollection(true); + .setName("CollPropertySByte") + .setType(nameSByte) + .setNullable(false) + .setCollection(true); public static final Property collPropertySingle = new Property() - .setName("CollPropertySingle") - .setType(nameSingle) - .setCollection(true); + .setName("CollPropertySingle") + .setType(nameSingle) + .setCollection(true); public static final Property collPropertySingle_ExplicitNullable = new Property() - .setName("CollPropertySingle") - .setType(nameSingle) - .setNullable(true) - .setCollection(true); + .setName("CollPropertySingle") + .setType(nameSingle) + .setNullable(true) + .setCollection(true); public static final Property collPropertySingle_NotNullable = new Property() - .setName("CollPropertySingle") - .setType(nameSingle) - .setNullable(false) - .setCollection(true); + .setName("CollPropertySingle") + .setType(nameSingle) + .setNullable(false) + .setCollection(true); public static final Property collPropertyString = new Property() - .setName("CollPropertyString") - .setType(nameString) - .setCollection(true); + .setName("CollPropertyString") + .setType(nameString) + .setCollection(true); public static final Property collPropertyString_ExplicitNullable = new Property() - .setName("CollPropertyString") - .setType(nameString) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyString") + .setType(nameString) + .setNullable(true) + .setCollection(true); public static final Property collPropertyString_NotNullable = new Property() - .setName("CollPropertyString") - .setType(nameString) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyString") + .setType(nameString) + .setNullable(false) + .setCollection(true); public static final Property collPropertyTimeOfDay = new Property() - .setName("CollPropertyTimeOfDay") - .setType(nameTimeOfDay) - .setCollection(true); + .setName("CollPropertyTimeOfDay") + .setType(nameTimeOfDay) + .setCollection(true); public static final Property collPropertyTimeOfDay_ExplicitNullable = new Property() - .setName("CollPropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(true) - .setCollection(true); + .setName("CollPropertyTimeOfDay") + .setType(nameTimeOfDay) + .setNullable(true) + .setCollection(true); public static final Property collPropertyTimeOfDay_NotNullable = new Property() - .setName("CollPropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(false) - .setCollection(true); + .setName("CollPropertyTimeOfDay") + .setType(nameTimeOfDay) + .setNullable(false) + .setCollection(true); public static final Property propertyBinary = new Property() - .setName("PropertyBinary") - .setType(nameBinary); + .setName("PropertyBinary") + .setType(nameBinary); public static final Property propertyBinary_NotNullable = new Property() - .setName("PropertyBinary") - .setType(nameBinary) - .setNullable(false); + .setName("PropertyBinary") + .setType(nameBinary) + .setNullable(false); public static final Property propertyBinary_ExplicitNullable = new Property() - .setName("PropertyBinary") - .setType(nameBinary) - .setNullable(true); + .setName("PropertyBinary") + .setType(nameBinary) + .setNullable(true); public static final Property propertyBoolean = new Property() - .setName("PropertyBoolean") - .setType(nameBoolean); + .setName("PropertyBoolean") + .setType(nameBoolean); public static final Property propertyBoolean_NotNullable = new Property() - .setName("PropertyBoolean") - .setType(nameBoolean) - .setNullable(false); + .setName("PropertyBoolean") + .setType(nameBoolean) + .setNullable(false); public static final Property propertyBoolean_ExplicitNullable = new Property() - .setName("PropertyBoolean") - .setType(nameBoolean) - .setNullable(true); + .setName("PropertyBoolean") + .setType(nameBoolean) + .setNullable(true); public static final Property propertyByte = new Property() - .setName("PropertyByte") - .setType(nameByte); + .setName("PropertyByte") + .setType(nameByte); public static final Property propertyByte_NotNullable = new Property() - .setName("PropertyByte") - .setType(nameByte) - .setNullable(false); + .setName("PropertyByte") + .setType(nameByte) + .setNullable(false); public static final Property propertyByte_ExplicitNullable = new Property() - .setName("PropertyByte") - .setType(nameByte) - .setNullable(true); + .setName("PropertyByte") + .setType(nameByte) + .setNullable(true); public static final Property propertyDate = new Property() - .setName("PropertyDate") - .setType(nameDate); + .setName("PropertyDate") + .setType(nameDate); public static final Property propertyDate_NotNullable = new Property() - .setName("PropertyDate") - .setType(nameDate) - .setNullable(false); + .setName("PropertyDate") + .setType(nameDate) + .setNullable(false); public static final Property propertyDate_ExplicitNullable = new Property() - .setName("PropertyDate") - .setType(nameDate) - .setNullable(true); + .setName("PropertyDate") + .setType(nameDate) + .setNullable(true); public static final Property propertyDateTimeOffset = new Property() - .setName("PropertyDateTimeOffset") - .setPrecision(20) - .setType(nameDateTimeOffset); + .setName("PropertyDateTimeOffset") + .setType(nameDateTimeOffset); + + public static final Property propertyDateTimeOffset_Precision = new Property() + .setName("PropertyDateTimeOffset") + .setPrecision(12) + .setType(nameDateTimeOffset); public static final Property propertyDateTimeOffset_NotNullable = new Property() - .setName("PropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(false); + .setName("PropertyDateTimeOffset") + .setType(nameDateTimeOffset) + .setNullable(false); public static final Property propertyDateTimeOffset_ExplicitNullable = new Property() - .setName("PropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(true); + .setName("PropertyDateTimeOffset") + .setType(nameDateTimeOffset) + .setNullable(true); public static final Property propertyDecimal_Scale_Precision = new Property() - .setName("PropertyDecimal") - .setScale(10) - .setPrecision(11) - .setType(nameDecimal); - + .setName("PropertyDecimal") + .setScale(5) + .setPrecision(11) + .setType(nameDecimal); + public static final Property propertyDecimal_Scale = new Property() - .setName("PropertyDecimal") - .setScale(10) - .setType(nameDecimal); - + .setName("PropertyDecimal") + .setScale(10) + .setType(nameDecimal); + public static final Property propertyDecimal_NotNullable = new Property() - .setName("PropertyDecimal") - .setType(nameDecimal) - .setNullable(false); + .setName("PropertyDecimal") + .setType(nameDecimal) + .setNullable(false); public static final Property propertyDecimal_ExplicitNullable = new Property() - .setName("PropertyDecimal") - .setType(nameDecimal) - .setNullable(true); + .setName("PropertyDecimal") + .setType(nameDecimal) + .setNullable(true); public static final Property propertyDouble = new Property() - .setName("PropertyDouble") - .setType(nameDouble); + .setName("PropertyDouble") + .setType(nameDouble); public static final Property propertyDouble_NotNullable = new Property() - .setName("PropertyDouble") - .setType(nameDouble) - .setNullable(false); + .setName("PropertyDouble") + .setType(nameDouble) + .setNullable(false); public static final Property propertyDouble_ExplicitNullable = new Property() - .setName("PropertyDouble") - .setType(nameDouble) - .setNullable(true); + .setName("PropertyDouble") + .setType(nameDouble) + .setNullable(true); public static final Property propertyDuration = new Property() - .setName("PropertyDuration") - .setType(nameDuration); + .setName("PropertyDuration") + .setType(nameDuration); public static final Property propertyDuration_NotNullable = new Property() - .setName("PropertyDuration") - .setType(nameDuration) - .setNullable(false); + .setName("PropertyDuration") + .setType(nameDuration) + .setNullable(false); public static final Property propertyDuration_ExplicitNullable = new Property() - .setName("PropertyDuration") - .setType(nameDuration) - .setNullable(true); + .setName("PropertyDuration") + .setType(nameDuration) + .setNullable(true); public static final Property propertyGuid = new Property() - .setName("PropertyGuid") - .setType(nameGuid); + .setName("PropertyGuid") + .setType(nameGuid); public static final Property propertyGuid_NotNullable = new Property() - .setName("PropertyGuid") - .setType(nameGuid) - .setNullable(false); + .setName("PropertyGuid") + .setType(nameGuid) + .setNullable(false); public static final Property propertyGuid_ExplicitNullable = new Property() - .setName("PropertyGuid") - .setType(nameGuid) - .setNullable(true); + .setName("PropertyGuid") + .setType(nameGuid) + .setNullable(true); public static final Property propertyInt16 = new Property() - .setName("PropertyInt16") - .setType(nameInt16); + .setName("PropertyInt16") + .setType(nameInt16); public static final Property propertyInt16_NotNullable = new Property() - .setName("PropertyInt16") - .setType(nameInt16) - .setNullable(false); + .setName("PropertyInt16") + .setType(nameInt16) + .setNullable(false); public static final Property propertyInt16_ExplicitNullable = new Property() - .setName("PropertyInt16") - .setType(nameInt16) - .setNullable(true); + .setName("PropertyInt16") + .setType(nameInt16) + .setNullable(true); public static final Property propertyInt32 = new Property() - .setName("PropertyInt32") - .setType(nameInt32); + .setName("PropertyInt32") + .setType(nameInt32); public static final Property propertyInt32_NotNullable = new Property() - .setName("PropertyInt32") - .setType(nameInt32) - .setNullable(false); + .setName("PropertyInt32") + .setType(nameInt32) + .setNullable(false); public static final Property propertyInt32_ExplicitNullable = new Property() - .setName("PropertyInt32") - .setType(nameInt32) - .setNullable(true); + .setName("PropertyInt32") + .setType(nameInt32) + .setNullable(true); public static final Property propertyInt64 = new Property() - .setName("PropertyInt64") - .setType(nameInt64); + .setName("PropertyInt64") + .setType(nameInt64); public static final Property propertyInt64_NotNullable = new Property() - .setName("PropertyInt64") - .setType(nameInt64) - .setNullable(false); + .setName("PropertyInt64") + .setType(nameInt64) + .setNullable(false); public static final Property propertyInt64_ExplicitNullable = new Property() - .setName("PropertyInt64") - .setType(nameInt64) - .setNullable(true); + .setName("PropertyInt64") + .setType(nameInt64) + .setNullable(true); public static final Property propertySByte = new Property() - .setName("PropertySByte") - .setType(nameSByte); + .setName("PropertySByte") + .setType(nameSByte); public static final Property propertySByte_NotNullable = new Property() - .setName("PropertySByte") - .setType(nameSByte) - .setNullable(false); + .setName("PropertySByte") + .setType(nameSByte) + .setNullable(false); public static final Property propertySByte_ExplicitNullable = new Property() - .setName("PropertySByte") - .setType(nameSByte) - .setNullable(true); + .setName("PropertySByte") + .setType(nameSByte) + .setNullable(true); public static final Property propertySingle = new Property() - .setName("PropertySingle") - .setType(nameSingle); + .setName("PropertySingle") + .setType(nameSingle); public static final Property propertySingle_NotNullable = new Property() - .setName("PropertySingle") - .setType(nameSingle) - .setNullable(false); + .setName("PropertySingle") + .setType(nameSingle) + .setNullable(false); public static final Property propertySingle_ExplicitNullable = new Property() - .setName("PropertySingle") - .setType(nameSingle) - .setNullable(true); + .setName("PropertySingle") + .setType(nameSingle) + .setNullable(true); public static final Property propertyString = new Property() - .setName("PropertyString") - .setType(nameString); + .setName("PropertyString") + .setType(nameString); public static final Property propertyString_NotNullable = new Property() - .setName("PropertyString") - .setType(nameString) - .setNullable(false); + .setName("PropertyString") + .setType(nameString) + .setNullable(false); public static final Property propertyString_ExplicitNullable = new Property() - .setName("PropertyString") - .setType(nameString) - .setNullable(true); + .setName("PropertyString") + .setType(nameString) + .setNullable(true); public static final Property propertyTimeOfDay = new Property() - .setName("PropertyTimeOfDay") - .setPrecision(10) - .setType(nameTimeOfDay); + .setName("PropertyTimeOfDay") + .setType(nameTimeOfDay); + + public static final Property propertyTimeOfDay_Precision = new Property() + .setName("PropertyTimeOfDay") + .setPrecision(12) + .setType(nameTimeOfDay); public static final Property propertyTimeOfDay_NotNullable = new Property() - .setName("PropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(false); + .setName("PropertyTimeOfDay") + .setType(nameTimeOfDay) + .setNullable(false); public static final Property propertyTimeOfDay_ExplicitNullable = new Property() - .setName("PropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(true); + .setName("PropertyTimeOfDay") + .setType(nameTimeOfDay) + .setNullable(true); // Complex Properties ---------------------------------------------------------------------------------------------- public static final Property collPropertyComp_CTPrimComp = new Property() - .setName("CollPropertyComp") - .setType(ComplexTypeProvider.nameCTPrimComp) - .setCollection(true); + .setName("CollPropertyComp") + .setType(ComplexTypeProvider.nameCTPrimComp) + .setCollection(true); public static final Property collPropertyComp_CTTwoPrim = new Property() - .setName("CollPropertyComp") - .setType(ComplexTypeProvider.nameCTTwoPrim) - .setCollection(true); + .setName("CollPropertyComp") + .setType(ComplexTypeProvider.nameCTTwoPrim) + .setCollection(true); public static final Property propertyComp_CTAllPrim = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTAllPrim); + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTAllPrim); public static final Property propertyComp_CTCollAllPrim = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTCollAllPrim); + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTCollAllPrim); public static final Property propertyComp_CTCompCollComp = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTCompCollComp); + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTCompCollComp); public static final Property propertyComp_CTCompComp = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTCompComp); + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTCompComp); public static final Property propertyComp_CTNavFiveProp = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTNavFiveProp); - + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTNavFiveProp); + public static final Property propertyCompNav_CTNavFiveProp = new Property() - .setName("PropertyCompNav") - .setType(ComplexTypeProvider.nameCTNavFiveProp); - + .setName("PropertyCompNav") + .setType(ComplexTypeProvider.nameCTNavFiveProp); + public static final Property propertyComp_CTPrimComp_NotNullable = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTPrimComp) - .setNullable(false); + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTPrimComp) + .setNullable(false); public static final Property propertyComp_CTTwoPrim = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTTwoPrim); + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTTwoPrim); public static final Property propertyComp_CTTwoPrim_NotNullable = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTTwoPrim) - .setNullable(false); - - public static final Property propertyCompNavCont = new Property() - .setName("PropertyCompNavCont") - .setType(ComplexTypeProvider.nameCTNavCont); - + .setName("PropertyComp") + .setType(ComplexTypeProvider.nameCTTwoPrim) + .setNullable(false); + + public static final Property propertyCompNavCont = new Property() + .setName("PropertyCompNavCont") + .setType(ComplexTypeProvider.nameCTNavCont); + public static final Property propertyCompAllPrim_CTAllPrim = new Property() - .setName("PropertyCompAllPrim") - .setType(ComplexTypeProvider.nameCTAllPrim); + .setName("PropertyCompAllPrim") + .setType(ComplexTypeProvider.nameCTAllPrim); public static final Property propertyCompComp_CTCompComp = new Property() - .setName("PropertyCompComp") - .setType(ComplexTypeProvider.nameCTCompComp); + .setName("PropertyCompComp") + .setType(ComplexTypeProvider.nameCTCompComp); public static final Property propertyCompComp_CTCompComp_NotNullable = new Property() - .setName("PropertyCompComp") - .setType(ComplexTypeProvider.nameCTCompComp) - .setNullable(false); - + .setName("PropertyCompComp") + .setType(ComplexTypeProvider.nameCTCompComp) + .setNullable(false); + public static final Property propertyCompTwoPrim_CTTwoPrim = new Property() - .setName("PropertyCompTwoPrim") - .setType(ComplexTypeProvider.nameCTTwoPrim); + .setName("PropertyCompTwoPrim") + .setType(ComplexTypeProvider.nameCTTwoPrim); public static final Property propertyMixedPrimCollComp_CTMixPrimCollComp = new Property() - .setName("PropertyMixedPrimCollComp") - .setType(ComplexTypeProvider.nameCTMixPrimCollComp); + .setName("PropertyMixedPrimCollComp") + .setType(ComplexTypeProvider.nameCTMixPrimCollComp); public static final Property propertyComp_CTMixEnumTypeDefColl = new Property() - .setName("PropertyCompMixedEnumDef") - .setType(ComplexTypeProvider.nameCTMixEnumDef); + .setName("PropertyCompMixedEnumDef") + .setType(ComplexTypeProvider.nameCTMixEnumDef); public static final Property propertyCompColl_CTMixEnumTypeDefColl = new Property() - .setName("CollPropertyCompMixedEnumDef") - .setType(ComplexTypeProvider.nameCTMixEnumDef) - .setCollection(true); + .setName("CollPropertyCompMixedEnumDef") + .setType(ComplexTypeProvider.nameCTMixEnumDef) + .setCollection(true); // Navigation Properties ------------------------------------------------------------------------------------------- public static final NavigationProperty collectionNavPropertyETKeyNavMany_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETKeyNavMany") - .setType(EntityTypeProvider.nameETKeyNav) - .setCollection(true); + .setName("NavPropertyETKeyNavMany") + .setType(EntityTypeProvider.nameETKeyNav) + .setCollection(true); public static final NavigationProperty collectionNavPropertyETMediaMany_ETMedia = new NavigationProperty() - .setName("NavPropertyETMediaMany") - .setType(EntityTypeProvider.nameETMedia) - .setCollection(true); + .setName("NavPropertyETMediaMany") + .setType(EntityTypeProvider.nameETMedia) + .setCollection(true); + + public static final NavigationProperty collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav_WithPartnerERKeyNavOne = + new NavigationProperty() + .setName("NavPropertyETTwoKeyNavMany") + .setType(EntityTypeProvider.nameETTwoKeyNav) + .setCollection(true) + .setPartner("NavPropertyETKeyNavOne"); - public static final NavigationProperty collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav_WithPartnerERKeyNavOne - = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavMany") - .setType(EntityTypeProvider.nameETTwoKeyNav) - .setCollection(true) - .setPartner("NavPropertyETKeyNavOne"); - public static final NavigationProperty collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavMany") - .setType(EntityTypeProvider.nameETTwoKeyNav) - .setCollection(true); - + .setName("NavPropertyETTwoKeyNavMany") + .setType(EntityTypeProvider.nameETTwoKeyNav) + .setCollection(true); + public static final NavigationProperty collectionNavPropertyETTwoKeyNavOne_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavOne") - .setType(EntityTypeProvider.nameETTwoKeyNav); + .setName("NavPropertyETTwoKeyNavOne") + .setType(EntityTypeProvider.nameETTwoKeyNav); public static final NavigationProperty collectionNavPropertyETTwoPrimMany_ETTwoPrim = new NavigationProperty() - .setName("NavPropertyETTwoPrimMany") - .setType(EntityTypeProvider.nameETTwoPrim) - .setCollection(true); + .setName("NavPropertyETTwoPrimMany") + .setType(EntityTypeProvider.nameETTwoPrim) + .setCollection(true); public static final NavigationProperty collectionNavPropertyETAllPrimMany_ETAllPrim = new NavigationProperty() - .setName("NavPropertyETAllPrimMany") - .setType(EntityTypeProvider.nameETAllPrim) - .setCollection(true); + .setName("NavPropertyETAllPrimMany") + .setType(EntityTypeProvider.nameETAllPrim) + .setCollection(true); public static final NavigationProperty collectionNavPropertySINav = new NavigationProperty() - .setName("NavPropertySINav") - .setCollection(true) - .setType(EntityTypeProvider.nameETTwoKeyNav); - + .setName("NavPropertySINav") + .setCollection(true) + .setType(EntityTypeProvider.nameETTwoKeyNav); + public static final NavigationProperty collectionNavPropertyETKeyNavContMany_CT_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETKeyNavContMany") - .setCollection(true) - .setContainsTarget(true) - .setType(EntityTypeProvider.nameETKeyNav); - - public static final NavigationProperty collectionNavPropertyETTwoKeyNavContMany_CT_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavContMany") - .setCollection(true) - .setContainsTarget(true) - .setType(EntityTypeProvider.nameETKeyNav); - - public static final NavigationProperty navPropertyETKeyNavOne_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETKeyNavOne") - .setType(EntityTypeProvider.nameETKeyNav); + .setName("NavPropertyETKeyNavContMany") + .setCollection(true) + .setContainsTarget(true) + .setType(EntityTypeProvider.nameETKeyNav); - public static final NavigationProperty navPropertyETMediaOne_ETMedia = new NavigationProperty() - .setName("NavPropertyETMediaOne") - .setType(EntityTypeProvider.nameETMedia); - - public static final NavigationProperty navPropertyETKeyPrimNavOne_ETKeyPrimNav = new NavigationProperty() - .setName("NavPropertyETKeyPrimNavOne") - .setType(EntityTypeProvider.nameETKeyPrimNav); - - public static final NavigationProperty navPropertyETTwoKeyNavOne_ETTwoKeyNav_NotNullable = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavOne") - .setType(EntityTypeProvider.nameETTwoKeyNav) - .setNullable(false); - - public static final NavigationProperty navPropertyETTwoKeyNavOne_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavOne") - .setType(EntityTypeProvider.nameETTwoKeyNav); - - public static final NavigationProperty navPropertyETTwoPrimOne_ETTwoPrim = new NavigationProperty() - .setName("NavPropertyETTwoPrimOne") - .setType(EntityTypeProvider.nameETTwoPrim) - .setNullable(false); - - public static final NavigationProperty navPropertyETAllPrimOne_ETAllPrim = new NavigationProperty() - .setName("NavPropertyETAllPrimOne") - .setType(EntityTypeProvider.nameETAllPrim); - - public static final NavigationProperty navPropertyETKeyNavContOne_CT_ETeyNav = new NavigationProperty() - .setName("NavPropertyETKeyNavContOne") + public static final NavigationProperty collectionNavPropertyETTwoKeyNavContMany_CT_ETKeyNav = + new NavigationProperty() + .setName("NavPropertyETTwoKeyNavContMany") + .setCollection(true) .setContainsTarget(true) .setType(EntityTypeProvider.nameETKeyNav); - + + public static final NavigationProperty navPropertyETKeyNavOne_ETKeyNav = new NavigationProperty() + .setName("NavPropertyETKeyNavOne") + .setType(EntityTypeProvider.nameETKeyNav); + + public static final NavigationProperty navPropertyETMediaOne_ETMedia = new NavigationProperty() + .setName("NavPropertyETMediaOne") + .setType(EntityTypeProvider.nameETMedia); + + public static final NavigationProperty navPropertyETKeyPrimNavOne_ETKeyPrimNav = new NavigationProperty() + .setName("NavPropertyETKeyPrimNavOne") + .setType(EntityTypeProvider.nameETKeyPrimNav); + + public static final NavigationProperty navPropertyETTwoKeyNavOne_ETTwoKeyNav_NotNullable = new NavigationProperty() + .setName("NavPropertyETTwoKeyNavOne") + .setType(EntityTypeProvider.nameETTwoKeyNav) + .setNullable(false); + + public static final NavigationProperty navPropertyETTwoKeyNavOne_ETTwoKeyNav = new NavigationProperty() + .setName("NavPropertyETTwoKeyNavOne") + .setType(EntityTypeProvider.nameETTwoKeyNav); + + public static final NavigationProperty navPropertyETTwoPrimOne_ETTwoPrim = new NavigationProperty() + .setName("NavPropertyETTwoPrimOne") + .setType(EntityTypeProvider.nameETTwoPrim) + .setNullable(false); + + public static final NavigationProperty navPropertyETAllPrimOne_ETAllPrim = new NavigationProperty() + .setName("NavPropertyETAllPrimOne") + .setType(EntityTypeProvider.nameETAllPrim); + + public static final NavigationProperty navPropertyETKeyNavContOne_CT_ETeyNav = new NavigationProperty() + .setName("NavPropertyETKeyNavContOne") + .setContainsTarget(true) + .setType(EntityTypeProvider.nameETKeyNav); + public static final NavigationProperty navPropertyETTwoKeyNavContOne_CT_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavContOne") - .setContainsTarget(true) - .setType(EntityTypeProvider.nameETKeyNav); - + .setName("NavPropertyETTwoKeyNavContOne") + .setContainsTarget(true) + .setType(EntityTypeProvider.nameETKeyNav); + public static final NavigationProperty navPropertyETTwoKeyNavContOneCT_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavContOne") - .setContainsTarget(true) - .setType(EntityTypeProvider.nameETTwoKeyNav); - - public static final NavigationProperty collectionNavPropertyETTwoKeyNavContMany_CT_ETTwoKeyNav - = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavContMany") - .setContainsTarget(true) - .setCollection(true) - .setType(EntityTypeProvider.nameETTwoKeyNav); - + .setName("NavPropertyETTwoKeyNavContOne") + .setContainsTarget(true) + .setType(EntityTypeProvider.nameETTwoKeyNav); + + public static final NavigationProperty collectionNavPropertyETTwoKeyNavContMany_CT_ETTwoKeyNav = + new NavigationProperty() + .setName("NavPropertyETTwoKeyNavContMany") + .setContainsTarget(true) + .setCollection(true) + .setType(EntityTypeProvider.nameETTwoKeyNav); + // EnumProperties -------------------------------------------------------------------------------------------------- public static final Property propertyEnumString_ENString = new Property() - .setName("PropertyEnumString") - .setType(EnumTypeProvider.nameENString) - .setNullable(false); - + .setName("PropertyEnumString") + .setType(EnumTypeProvider.nameENString) + .setNullable(false); + public static final Property propertyEnumString_ENString_Nullable = new Property() - .setName("PropertyEnumString") - .setType(EnumTypeProvider.nameENString); + .setName("PropertyEnumString") + .setType(EnumTypeProvider.nameENString); public static final Property collPropertyEnumString_ENString = new Property() - .setName("CollPropertyEnumString") - .setType(EnumTypeProvider.nameENString) - .setCollection(true); + .setName("CollPropertyEnumString") + .setType(EnumTypeProvider.nameENString) + .setCollection(true); // TypeDefinition Properties --------------------------------------------------------------------------------------- public static final Property propertyTypeDefinition_TDString = new Property() - .setName("PropertyDefString") - .setType(TypeDefinitionProvider.nameTDString) - .setMaxLength(15); + .setName("PropertyDefString") + .setType(TypeDefinitionProvider.nameTDString) + .setMaxLength(15); public static final Property collPropertyTypeDefinition_TDString = new Property() - .setName("CollPropertyDefString") - .setType(TypeDefinitionProvider.nameTDString) - .setMaxLength(15) - .setCollection(true); + .setName("CollPropertyDefString") + .setType(TypeDefinitionProvider.nameTDString) + .setMaxLength(15) + .setCollection(true); } diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java index b8e5ad386..33f98a64a 100644 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java +++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java @@ -46,10 +46,17 @@ public class SchemaProvider { schema.setNamespace(NAMESPACE); schema.setAlias("Namespace1_Alias"); schemas.add(schema); + // EnumTypes List enumTypes = new ArrayList(); schema.setEnumTypes(enumTypes); + + // TypeDefinitions + List typeDefinitions = new ArrayList(); + schema.setTypeDefinitions(typeDefinitions); + typeDefinitions.add(prov.getTypeDefinition(TypeDefinitionProvider.nameTDString)); enumTypes.add(prov.getEnumType(EnumTypeProvider.nameENString)); + // EntityTypes List entityTypes = new ArrayList(); 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 = new ArrayList(); @@ -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 typeDefinitions = new ArrayList(); - schema.setTypeDefinitions(typeDefinitions); - typeDefinitions.add(prov.getTypeDefinition(TypeDefinitionProvider.nameTDString)); // Actions List actions = new ArrayList(); 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 diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java index f673787fb..dce658935 100644 --- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java +++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java @@ -89,7 +89,7 @@ public class MetadataDocumentTest { assertThat(metadata, containsString("" + "" + "")); - + assertThat(metadata, containsString("" + "")); assertThat(metadata, - containsString("" + containsString("" + "")); assertThat(metadata, - containsString("" + containsString("" + "" + "")); @@ -122,7 +123,11 @@ public class MetadataDocumentTest { containsString("")); assertThat(metadata, - containsString("")); + + assertThat( + metadata, + containsString("")); assertThat(metadata, containsString("")); diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java index 863b800c0..416346cc6 100644 --- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java +++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java @@ -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'")