From b7dabdb735e54c282764d9807bfbb953fb224ac3 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Tue, 21 Jul 2026 13:53:39 +0200 Subject: [PATCH 01/28] Add generated solution --- datamodel/openapi/OAS31_CHANGES.md | 182 +++++++++ datamodel/openapi/OAS31_GAPS.md | 386 ++++++++++++++++++ .../generator/CustomJavaClientCodegen.java | 29 +- .../generator/CustomOpenAPINormalizer.java | 61 ++- .../GenerationConfigurationConverter.java | 7 + .../openapi/generator/OasVersionUtil.java | 30 ++ .../ValidationKeywordsPreprocessor.java | 93 ++++- .../generator/DataModelGeneratorUnitTest.java | 46 +++ .../ValidationKeywordsPreprocessorTest.java | 68 +++ .../sodastore-31-mutual-tls.yaml | 40 ++ .../sodastore-31.yaml | 148 +++++++ .../sodastore-31-nullable.json | 67 +++ 12 files changed, 1133 insertions(+), 24 deletions(-) create mode 100644 datamodel/openapi/OAS31_CHANGES.md create mode 100644 datamodel/openapi/OAS31_GAPS.md create mode 100644 datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/ValidationKeywordsPreprocessorTest/sodastore-31-nullable.json diff --git a/datamodel/openapi/OAS31_CHANGES.md b/datamodel/openapi/OAS31_CHANGES.md new file mode 100644 index 000000000..ed724da43 --- /dev/null +++ b/datamodel/openapi/OAS31_CHANGES.md @@ -0,0 +1,182 @@ +# OAS 3.1 Support — Change Summary + +This document describes all code changes made to add OAS 3.1.x support to the SAP Cloud SDK OpenAPI +generator. The full gap analysis is in [OAS31_GAPS.md](OAS31_GAPS.md). Gaps 9, 12, 14, and 15 are +out of scope and remain documented there for future work. + +--- + +## New File: `OasVersionUtil.java` + +**Path:** `openapi-generator/src/main/java/.../generator/OasVersionUtil.java` + +A small utility class with three static `isOas31(...)` overloads accepting a `String`, an `OpenAPI` +object, or a `JsonNode`. Every version-conditional code path in the other changed files delegates to +this class so the version check is defined in one place. + +--- + +## Changed: `CustomOpenAPINormalizer.java` + +**Gaps addressed:** 1, 2, 4, 7, 8 + +### What changed + +**`isOas31` field** — Set in the constructor via `OasVersionUtil.isOas31(openAPI)`. All new +behaviour in this class is gated on this flag, so OAS 3.0 specs are processed identically to before. + +**`normalizeReferenceSchema` — Gap 1 (nullable deprecation warning)** +When processing an OAS 3.1 spec and encountering a `$ref` schema that still carries `nullable: true` +(which is not valid in 3.1), the normalizer now emits a `WARN` log telling the spec author to use +`anyOf: [{$ref: "..."}, {type: "null"}]` instead. This does not block generation. + +**`normalizeReferenceSchema` — Gap 2 (numeric exclusiveMinimum/Maximum)** +In OAS 3.0 `exclusiveMinimum`/`exclusiveMaximum` are booleans. In OAS 3.1 they are independent +numeric values (`BigDecimal`). The swagger-core model exposes these as separate fields: +`getExclusiveMinimumValue()` / `getExclusiveMaximumValue()`. Both are now included in the +sibling-property condition that triggers `allOf` wrapping, so a `$ref` schema with a numeric +exclusive bound is handled correctly. + +**`normalizeReferenceSchema` — Gap 4 (`const` as $ref sibling)** +The OAS 3.1 `const` keyword (from JSON Schema 2020-12) is now included in the sibling-property +condition, so a `$ref` schema with a `const` sibling is wrapped in `allOf` and the constant +constraint is preserved in generated code. + +**New `normalizeSchema` override — Gap 7 (example deprecation warning)** +In OAS 3.1 the singular `example` keyword inside Schema Objects is deprecated in favour of the +array form `examples: [...]`. When `isOas31` and a schema carries `example`, a `WARN` log is +emitted. Generation is not blocked. + +**New `normalizeSchema` override — Gap 8 (binary file upload encoding)** +OAS 3.1 replaces `format: binary` / `format: byte` with JSON Schema keywords `contentEncoding` and +`contentMediaType`. This normalizer override maps those back to the legacy `format` values before +the upstream code generator sees the schema, preserving the existing `File → byte[]` type mapping: + +| OAS 3.1 input | Mapped to | +|---|---| +| `contentEncoding: base64` | `format: byte` | +| `contentEncoding: ` | `format: binary` | +| `contentMediaType: ` (no encoding) | `format: binary` | + +--- + +## Changed: `ValidationKeywordsPreprocessor.java` + +**Gaps addressed:** 5, 10 + +### What changed + +**Gap 5 — Webhooks-only documents** +OAS 3.1 makes the top-level `paths` field optional. A document with only `webhooks` (and no `paths`) +is now detected early and a clear `OpenApiGeneratorException` is thrown explaining that webhook +client generation is not yet supported. Previously, such a document would silently produce no output +or cause a `NullPointerException` downstream. + +A document with only `components` and neither `paths` nor `webhooks` is allowed to continue — +the upstream generator handles this case gracefully. + +**Gap 10 — Canonical OAS 3.1 nullable-ref pattern** +The preprocessor used to block *any* occurrence of `anyOf` or `oneOf` when +`oneOfAnyOfGenerationEnabled=false`. In OAS 3.1 the standard way to express a nullable `$ref` is: + +```yaml +anyOf: + - $ref: '#/components/schemas/Foo' + - type: "null" +``` + +A new private `isNullUnionPattern(JsonNode)` method recognises this exact two-element array +(one `$ref`-only object, one `{type: "null"}`-only object) and exempts it from the block. All other +multi-element or non-null-union `anyOf`/`oneOf` occurrences are still blocked unless the +`oneOfAnyOfGenerationEnabled` flag is set. + +--- + +## Changed: `CustomJavaClientCodegen.java` + +**Gaps addressed:** 5, 6 + +### What changed + +**Gap 5 — Null-safe `paths` access** +Two places called `openAPI.getPaths()` without guarding against `null`: + +- `preprocessOpenAPI`: the `USE_EXCLUDE_PATHS` loop now checks `openAPI.getPaths() != null` before + calling `.keySet().remove(...)`. +- `preprocessRemoveRedundancies`: an early-return guard is added at the top. If `paths` is null or + empty a warning is logged and the method returns immediately, avoiding a `NullPointerException` on + webhooks-only or components-only documents. + +**Gap 6 — `components/pathItems` traversal** +The `preprocessRemoveRedundancies` method discovers which `components/schemas` are in use by +scanning path definitions for `$ref` strings. In OAS 3.1 reusable path items can be stored in +`components/pathItems` and referenced from both `paths` and `webhooks`. The method now also scans +`openAPI.getComponents().getPathItems()` using the same regex-based approach, so schemas referenced +only via a reusable path item are not wrongly pruned by the remove-unused-components feature. + +--- + +## Changed: `GenerationConfigurationConverter.java` + +**Gap addressed:** 11 + +### What changed + +After the spec is parsed, `OasVersionUtil.isOas31(result)` is checked. If true, an `INFO` log is +emitted stating the detected version and pointing to `OAS31_GAPS.md` for known limitations. This +gives users a clear signal that OAS 3.1 mode is active without blocking generation. + +--- + +## New Test Fixtures + +### `DataModelGeneratorUnitTest/sodastore-31.yaml` + +An OAS 3.1.0 version of the standard sodastore spec that exercises the following 3.1 features: + +- `info.summary` and `info.license.identifier` (SPDX) +- `type: ["string", "null"]` (Gap 1 / Gap 3 — type as array) +- `exclusiveMinimum: 0` / `exclusiveMaximum: 5` as numeric values (Gap 2) +- `$ref` with a sibling `description` (Gap 4) +- `anyOf: [{$ref: ...}, {type: "null"}]` on a schema property (Gap 10) + +### `DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml` + +An OAS 3.1.0 spec with a `type: mutualTLS` security scheme in `components/securitySchemes` (Gap 13). +Verifies the generator does not crash on the new security scheme type. + +### `ValidationKeywordsPreprocessorTest/sodastore-31-nullable.json` + +An OAS 3.1.0 spec with null-union `anyOf` patterns in both a path request body and a component +schema. Used by the new preprocessor tests to verify Gap 10. + +--- + +## New Tests + +### `DataModelGeneratorUnitTest` + +| Test | What it verifies | +|---|---| +| `testSuccessfulGenerationWithOas31Spec` | Full generation from `sodastore-31.yaml` succeeds and produces files | +| `testSuccessfulGenerationWithMutualTlsSecurityScheme` | Generation with `mutualTLS` security scheme does not throw | + +### `ValidationKeywordsPreprocessorTest` + +| Test | What it verifies | +|---|---| +| `testOas31NullUnionAnyOfInPaths_isAllowed` | Null-union `anyOf` in a path request body is not blocked (Gap 10) | +| `testOas31NullUnionAnyOfInSchemas_isAllowed` | Null-union `anyOf` in a component schema is not blocked (Gap 10) | +| `testNonNullUnionOneOfInPaths_isBlocked` | A `oneOf` with two `$ref` items (no null type) in a path is still blocked without the `oneOfAnyOfGenerationEnabled` flag | + +--- + +## What Is Not Changed (Out of Scope) + +| Gap | Reason deferred | +|---|---| +| Gap 9 — `if/then/else`, `prefixItems`, `$dynamicRef` | No Java equivalent; left to upstream `openapi-generator` | +| Gap 12 — `info.summary` / `license.identifier` in metadata | No code generation impact; metadata output not changed | +| Gap 13 — `mutualTLS` test coverage | Covered by smoke test above; no custom codegen needed | +| Gap 14 — Server `summary` field | No code generation impact | +| Gap 15 — `jsonSchemaDialect` field | Uncommon; handled by upstream parser | diff --git a/datamodel/openapi/OAS31_GAPS.md b/datamodel/openapi/OAS31_GAPS.md new file mode 100644 index 000000000..21f12aafc --- /dev/null +++ b/datamodel/openapi/OAS31_GAPS.md @@ -0,0 +1,386 @@ +# OAS 3.1 Generator Gaps Analysis + +This document summarizes the gaps between the current SAP Cloud SDK OpenAPI generator (targeting OAS 3.0) +and full OAS 3.1.x support. It covers every release from 3.1.0-rc0 (June 2020) through 3.1.2 (September 2025). + +## Background + +The generator is built on top of `openapi-generator` 7.23.0 and `swagger-parser` 2.1.45. +Its custom layers are concentrated in: + +- [CustomOpenAPINormalizer.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java) — schema normalisation before code generation +- [ValidationKeywordsPreprocessor.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java) — spec validation on raw `JsonNode` +- [GenerationConfigurationConverter.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java) — parser invocation and additional properties +- [CustomJavaClientCodegen.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java) — codegen overrides (composed schemas, array types, etc.) + +All test specs use `openapi: 3.0.0` or `openapi: 3.0.3`. No OAS 3.1 test fixtures exist. + +--- + +## Gap 1 — `nullable` Keyword Removed (Breaking) + +**Spec change (3.1.0-rc0):** `nullable: true` is entirely removed. The replacement is expressing null as a member of a type union: + +```yaml +# OAS 3.0 +type: string +nullable: true + +# OAS 3.1 +type: + - string + - "null" +``` + +**Current code:** +`CustomOpenAPINormalizer.normalizeReferenceSchema()` (line 51) reads `schema.getNullable()` and uses it to decide whether to wrap a `$ref` schema in `allOf`. This logic silently passes when `nullable` is absent (as in a 3.1 spec), leaving nullable intent unexpressed. + +`GenerationConfigurationConverter` forces `openApiNullable=false` (line 184) as a workaround for `JsonNullable` issues (BLI CLOUDECOSYSTEM-9843), which further masks any nullable annotation generated from 3.0's `nullable: true`. + +**Impact:** +- A 3.1 spec using `type: ["string", "null"]` will be parsed with the upstream `swagger-parser`, but the custom normalizer and codegen have no path to propagate "null-union" types to `@Nullable` Java annotations or `JsonNullable` wrappers. +- Any pre-existing 3.0 spec migrated to 3.1 with `nullable: true` kept will have nullability silently dropped. + +**Action required:** +- Replace `getNullable()` checks with inspection of `schema.getTypes()` for the presence of `"null"`. +- Resolve CLOUDECOSYSTEM-9843 to re-enable `openApiNullable` correctly. +- Add test fixtures using `type: ["string", "null"]` and `anyOf: [{$ref: ...}, {type: "null"}]`. + +--- + +## Gap 2 — `exclusiveMinimum` / `exclusiveMaximum` Semantic Inversion (Breaking) + +**Spec change (3.1.0-rc0):** These keywords change from boolean modifiers on `minimum`/`maximum` to standalone numeric bounds: + +```yaml +# OAS 3.0: boolean modifier — minimum is 7, exclusive +minimum: 7 +exclusiveMinimum: true + +# OAS 3.1: standalone — exclusive minimum is 7 (minimum keyword unused) +exclusiveMinimum: 7 +``` + +**Current code:** +`CustomOpenAPINormalizer.normalizeReferenceSchema()` (lines 56–57) reads `schema.getExclusiveMaximum()` and `schema.getExclusiveMinimum()` purely to detect the presence of sibling keywords alongside a `$ref`. In `swagger-parser` 2.1.45 the model class `Schema` maps both 3.0 `Boolean` and 3.1 `BigDecimal` forms, but the current custom code does not branch on version. + +**Impact:** +- A 3.1 spec with `exclusiveMinimum: 7` (numeric) will be parsed as a BigDecimal by `swagger-parser`, but the normalizer checks `!= null` only to trigger `allOf` wrapping — it does not validate or pass through the exclusive bound value. +- Bean-validation annotations generated for 3.0 schemas (e.g., `@DecimalMin(value="7", inclusive=false)`) will be generated incorrectly for 3.1 specs because the numeric value of `exclusiveMinimum` is conflated with the boolean flag. + +**Action required:** +- Detect OAS version at parse time and branch on `exclusiveMinimum`/`exclusiveMaximum` semantics accordingly. +- For 3.1: treat the keyword value directly as the exclusive bound; do not read `minimum`/`maximum` as the companion inclusive bound. +- Add version-conditional normalizer logic or a dedicated preprocessing step. + +--- + +## Gap 3 — `type` as Array (Breaking) + +**Spec change (3.1.0-rc0, JSON Schema 2020-12):** `type` may now be either a string or an array of strings: + +```yaml +# Both valid in 3.1 +type: string +type: ["string", "integer", "null"] +``` + +**Current code:** +`CustomOpenAPINormalizer.normalizeReferenceSchema()` (line 42) correctly checks both `schema.getType()` (single string, OAS 3.0) and `schema.getTypes()` (set, OAS 3.1) in the same condition. However it only *clears* both fields; it does not model or propagate multi-type unions through code generation. + +Downstream in `CustomJavaClientCodegen`, type resolution is delegated entirely to `JavaClientCodegen` from upstream openapi-generator. The upstream library has partial 3.1 support, but union types beyond null-union are not mapped to Java types (there is no direct Java equivalent of `type: ["string", "integer"]`). + +**Impact:** +- Multi-type arrays beyond `["X", "null"]` have no Java representation and will silently fall back to `Object`. +- The `checkForValidatorsInSchemas` in `ValidationKeywordsPreprocessor` does not check for multi-type arrays, so no validation error is raised for unsupported cases. + +**Action required:** +- Document supported subset: only `["X", "null"]` (nullable scalar) is mappable to Java. +- Emit a warning or error for multi-value type arrays that are not null-unions. +- Add a test fixture with multi-type schemas to verify fallback behaviour. + +--- + +## Gap 4 — `$ref` Sibling Properties Now Merged in Schema Objects (Breaking) + +**Spec change (3.1.0-rc0):** In OAS 3.0 any properties alongside a `$ref` were **ignored**. In OAS 3.1 (following JSON Schema 2020-12) sibling keywords are **combined** with the referenced schema: + +```yaml +# 3.0 — description was silently ignored +schema: + $ref: '#/components/schemas/Pet' + description: "ignored in 3.0" + +# 3.1 — description is combined with the referenced schema +schema: + $ref: '#/components/schemas/Pet' + description: "applied in 3.1" +``` + +**Current code:** +`CustomOpenAPINormalizer.normalizeReferenceSchema()` (lines 84–88) already implements an `allOf` wrapping strategy to handle sibling properties on `$ref` schemas. The workaround exists because `swagger-parser` may copy properties from a referenced schema onto the `$ref` node (lines 71–88 comments). This happens to produce correct results for OAS 3.0 sibling-annotation patterns. + +However the logic gates on `schema.getNullable()` (OAS 3.0 only) and several other 3.0-specific fields. A 3.1 schema with a `$ref` + `description` or `$ref` + `const` pair will only trigger wrapping if those properties are among the checked set. + +**Impact:** +- New 3.1 sibling keywords (`const`, `$comment`, JSON Schema 2020-12 vocabulary keywords) are not included in the trigger condition. They will be silently dropped. +- Reference Object contexts (parameter `$ref`, response `$ref`) allow **only** `summary` and `description` as overrides in 3.1. The current preprocessor does not validate this restriction. + +**Action required:** +- Extend the sibling-property condition in `normalizeReferenceSchema()` to cover `const`, `$comment`, `if`/`then`/`else`, `unevaluatedProperties`, and other 3.1 keywords. +- Add a validation check that non-Schema Reference Objects (parameters, responses, headers) carry at most `summary` and `description` alongside `$ref`. + +--- + +## Gap 5 — `webhooks` Top-Level Field Not Supported + +**Spec change (3.1.0-rc0):** A new top-level `webhooks` field maps webhook names to Path Item Objects. The `paths` top-level field is now **optional**. + +**Current code:** +`ValidationKeywordsPreprocessor.execute()` (line 23) reads `input.path(PATHS_NODE)` unconditionally. If `paths` is absent (a valid 3.1 document), `pathsNode` will be a `MissingNode`; the `findValue` calls return `null`, so no exception is thrown — but the document is effectively ignored. + +`CustomJavaClientCodegen.preprocessRemoveRedundancies()` (line 204) calls `openAPI.getPaths().values()` without a null check; a webhooks-only document would throw a `NullPointerException` here. + +No `webhooks` field is traversed anywhere in the custom code. + +**Impact:** +- Webhooks-only or paths-absent 3.1 documents cannot be processed. +- NPE risk in `preprocessRemoveRedundancies` when `paths` is null. + +**Action required:** +- Add null-check guards for `openAPI.getPaths()` wherever it is called. +- Evaluate whether SAP Cloud SDK should support generating webhook subscriber clients and decide on scope. +- At minimum, emit a clear error message when a document contains `webhooks` but no `paths`. + +--- + +## Gap 6 — `components.pathItems` Not Handled + +**Spec change (3.1.0-rc0):** The `components` object gains a `pathItems` map for reusable Path Item Objects. + +**Current code:** +`GenerationConfigurationConverter.preprocessSpecification()` (lines 139–158) and the remove-redundancies logic in `CustomJavaClientCodegen` only walk `components.schemas`, `components.responses`, and paths. No code traverses `components.pathItems`. + +**Impact:** +- `$ref` references pointing into `#/components/pathItems/...` will not be resolved correctly during preprocessing. +- The remove-unused-components feature (`FIX_REMOVE_UNUSED_COMPONENTS`) will not count path item references and may spuriously remove schemas referenced only from a reusable path item. + +**Action required:** +- Extend schema/ref traversal in `preprocessRemoveRedundancies` to descend into `components.pathItems`. +- Verify that `swagger-parser` 2.1.45 correctly resolves `#/components/pathItems/` references (upgrade may be needed). + +--- + +## Gap 7 — `schema.example` Deprecated in Favour of `examples` Array + +**Spec change (3.1.0):** Inside Schema Objects, the singular `example` keyword is deprecated. The JSON Schema 2020-12 standard uses `examples` (an array): + +```yaml +# 3.0 / deprecated 3.1 +example: "Berlin" + +# 3.1 preferred +examples: ["Berlin"] +``` + +**Current code:** +`CustomOpenAPINormalizer.normalizeReferenceSchema()` (line 66) checks `schema.getExample() != null` as a trigger for `allOf` wrapping. This means a 3.1 schema that uses `examples` (array) alongside a `$ref` will not be wrapped, potentially losing those examples. + +Line 67 checks `schema.getExamples() != null` as well, so the array form is covered in the wrap condition. However the two are treated identically — no deprecation warning for singular `example` in 3.1 documents is emitted. + +**Impact:** +- No generation failure, but no deprecation guidance for spec authors using 3.0's `example` in a 3.1 document. +- Example values from the `examples` array are not surfaced differently from the singular `example` in generated code or API documentation. + +**Action required:** +- Emit a deprecation warning when `schema.getExample()` is non-null in a 3.1 document. +- Ensure generated Javadoc/swagger annotations use the `examples` array form when targeting 3.1. + +--- + +## Gap 8 — File Upload / Binary Encoding Pattern Changed (Breaking) + +**Spec change (3.1.0-rc0):** Binary file descriptions change from format-based to JSON Schema content keywords: + +```yaml +# OAS 3.0 (still parseable but deprecated in 3.1) +type: string +format: binary + +# OAS 3.1 (correct) +type: string +contentEncoding: base64 +contentMediaType: image/png +``` + +**Current code:** +`GenerationConfigurationConverter` contains a type mapping for `File -> byte[]` passed from `GenerationConfiguration.typeMappings`. The underlying `JavaClientCodegen` maps `format: binary` to a byte-array or `File` Java type. Neither the custom normalizer nor the preprocessing steps handle `contentEncoding` or `contentMediaType`. + +**Impact:** +- A 3.1 spec using `contentEncoding`/`contentMediaType` for file uploads will not generate a `byte[]` or `InputStream` Java type; it will likely fall back to `Object` or `String`. +- The `format: binary` pattern still works via the upstream library for 3.0-style specs even when served under `openapi: 3.1.0`. + +**Action required:** +- Add a preprocessing step or normalizer hook that maps `contentEncoding: base64` → `format: byte` and `contentMediaType: application/octet-stream` → `format: binary` for compatibility with downstream type mapping. +- Add a test fixture for file upload with `contentEncoding`. + +--- + +## Gap 9 — JSON Schema 2020-12 Vocabulary Keywords Unhandled + +**Spec change (3.1.0):** Full JSON Schema 2020-12 alignment introduces keywords the OAS 3.0-era generator has never seen: + +| Keyword | Description | +|---|---| +| `$defs` | Inline reusable schemas (replaces `definitions`) | +| `$comment` | Non-validating developer annotation | +| `const` | Single-value constraint (cleaner than single-item `enum`) | +| `prefixItems` | Positional array item schemas (replaces array form of `items`) | +| `unevaluatedProperties` | Stricter `additionalProperties` that sees through `$ref`/combinators | +| `unevaluatedItems` | Same as above for array items | +| `if` / `then` / `else` | Conditional schema application | +| `$dynamicRef` / `$dynamicAnchor` | Dynamic references for recursive schemas | + +**Current code:** +None of these keywords are referenced anywhere in the custom generator code. They will either be passed through silently to the upstream `JavaClientCodegen` (which has partial support) or be ignored. + +`CustomJavaClientCodegen.updateModelForObject()` (line 264) unconditionally sets `additionalProperties` to `Boolean.FALSE`. In 3.1 `unevaluatedProperties` is the correct mechanism for sealing an object that uses `allOf`/`anyOf`/`oneOf` — `additionalProperties: false` does not see through those combinators. This means any 3.1 schema that uses `unevaluatedProperties: false` instead of `additionalProperties: false` will NOT be sealed by the codegen. + +**Impact:** +- `const` schemas will generate as single-value `enum` — workable but different from the intended model. +- `$defs` references will not be resolved by the preprocessing traversal in `preprocessRemoveRedundancies`, potentially causing schemas that are only referenced via `$defs` to be pruned. +- `unevaluatedProperties` is silently ignored; generated model classes will have an `additionalProperties` map even when the spec author intended to seal the object. +- `prefixItems` / tuple arrays are not mapped — they will likely generate as `List`. +- `if`/`then`/`else` schemas are not mapped — they will generate as `Object`. + +**Action required:** +- `$defs`: extend `preprocessRemoveRedundancies` traversal to follow `$defs` references. +- `const`: map to a single-element enum or a `@JsonProperty` constant in generated code; add a preprocessing step to normalise `const` to a single-item `enum` if the upstream generator does not handle it. +- `unevaluatedProperties`: do not force-set `additionalProperties: false` in `updateModelForObject`; instead inspect whether `unevaluatedProperties` is present. +- `if`/`then`/`else`, `prefixItems`, `$dynamicRef`: emit unsupported-feature warnings. + +--- + +## Gap 10 — `ValidationKeywordsPreprocessor` Assumes `paths` is Present + +**Current code:** +`ValidationKeywordsPreprocessor.execute()` (line 23) always walks `input.path("paths")`. In OAS 3.1 a document may omit `paths` entirely and provide only `webhooks` or `components`. + +When `paths` is missing, `pathsNode` is a `MissingNode`; `findValue()` returns `null` and no exception is raised — but it also means the validator silently skips validation entirely, allowing invalid `anyOf`/`oneOf` placements in a spec that does have `paths` nested inside `webhooks`. + +**Action required:** +- Guard on `pathsNode.isMissingNode()` and emit a warning when `paths` is absent. +- Extend validation to traverse `webhooks` operations for the same `anyOf`/`oneOf` placement rules. +- Consider whether the `oneOfAnyOfGenerationEnabled=false` default restriction makes sense for 3.1 specs, where `anyOf: [{$ref:...}, {type:"null"}]` is the canonical nullable pattern and must be supported. + +--- + +## Gap 11 — No OAS Version Detection or Version-Specific Routing + +**Current state:** +There is no code in the custom layers that reads `openAPI.getOpenapi()` (the version string) to branch behaviour. All processing assumes OAS 3.0.x semantics. `swagger-parser` 2.1.45 transparently parses both versions into the same `io.swagger.v3.oas.models.OpenAPI` object model, hiding the version distinction from consumers. + +**Impact:** +- The same preprocessing logic is applied regardless of whether the document declares `openapi: 3.0.3` or `openapi: 3.1.0`, leading to incorrect behaviour for `exclusiveMinimum`/`exclusiveMaximum`, `nullable`, and `$ref` sibling semantics. +- No validation that the spec version matches expected conventions. + +**Action required:** +- Read the version from `openAPI.getOpenapi()` (or from the raw `JsonNode` in preprocessing steps) and gate version-specific logic behind it. +- Add an explicit unsupported-version warning (or error) when the generator encounters a version it is not yet fully tested against. + +--- + +## Gap 12 — `info.summary` and `info.license.identifier` Not Surfaced + +**Spec change (3.1.0-rc0):** The Info Object gains a `summary` field (plain string) and the License Object gains an `identifier` field (SPDX expression): + +```yaml +info: + title: My API + summary: Short one-liner for catalog views + license: + name: Apache 2.0 + identifier: Apache-2.0 +``` + +**Current code:** +The generator does not read or surface `info.summary` or `license.identifier` anywhere. These fields exist only in documentation metadata and are not directly relevant to Java code generation. + +**Impact:** Low. These fields affect tooling that reads the spec for catalog/discovery purposes, not the generated Java client. + +**Action required:** No code change needed. Note that `DatamodelMetadataGeneratorAdapter` may wish to persist `info.summary` as part of the generated `.json` metadata file. + +--- + +## Gap 13 — `mutualTLS` Security Scheme Type Not Tested + +**Spec change (3.1.0-rc0):** A new `mutualTLS` security scheme type is added. It has no extra fields beyond `description`. + +**Current code:** +Security scheme types are not handled in the custom code; upstream `JavaClientCodegen` manages them. The upstream library maps security schemes to authentication annotations and configuration classes. + +**Impact:** Low for code generation (no extra fields to generate). Generated client code does not require special handling for `mutualTLS` at the source level — it is a transport-layer concern. + +**Action required:** +- Verify that `swagger-parser` 2.1.45 correctly parses `type: mutualTLS` without throwing an unknown-type exception. +- Add a test fixture with a `mutualTLS` security scheme. + +--- + +## Gap 14 — Server Object `summary` Field Not Surfaced + +**Spec change (3.1.0-rc0):** Server Objects gain a `summary` field (plain text label for tooling). + +**Current code:** Not used in code generation. No impact on generated Java clients. + +**Action required:** None for code generation. May be relevant for generated documentation or `DatamodelMetadataGeneratorAdapter`. + +--- + +## Gap 15 — `jsonSchemaDialect` Top-Level Field Not Handled + +**Spec change (3.1.0):** A new top-level `jsonSchemaDialect` URI field declares the default JSON Schema dialect for all Schema Objects. The OAS dialect URI is `https://spec.openapis.org/oas/3.1/dialect/base`. + +**Current code:** `swagger-parser` accepts this field without error, but neither the custom normalizer nor the preprocessing steps read or act on it. + +**Impact:** Low for the common case (spec authors rarely override the dialect). Non-standard dialects (e.g., pure JSON Schema 2020-12 without OAS extensions) may cause the upstream `JavaClientCodegen` to mishandle discriminator or `xml` objects. + +**Action required:** +- Emit a warning when `jsonSchemaDialect` is set to a non-OAS URI. +- Consider passing the dialect URI through to `swagger-parser` parse options. + +--- + +## Dependency Versions to Verify + +The following library versions determine how much OAS 3.1 support is available out-of-the-box: + +| Library | Current version | Notes | +|---|---|---| +| `openapi-generator` | 7.23.0 | 3.1 support present but has known bugs (nullable+allOf+$ref, unevaluatedProperties) | +| `io-swagger-parser-v3` | 2.1.45 | Parses 3.1 but full 2020-12 JSON Schema validation is incomplete | +| `io-swagger-core-v3` | 2.2.52 | Model classes expose both `getType()` and `getTypes()` — sufficient for dual-version handling | + +Recommend checking the upstream changelogs for any 3.1-related fixes released after these versions before implementing the gaps above. + +--- + +## Priority Summary + +| Priority | Gap | Effort | +|---|---|---| +| P0 — Breaking | Gap 1: `nullable` removed | Medium | +| P0 — Breaking | Gap 2: `exclusiveMinimum/Maximum` semantic change | Low | +| P0 — Breaking | Gap 3: `type` as array | Medium | +| P0 — Breaking | Gap 4: `$ref` sibling merging | Medium | +| P1 — Functional | Gap 5: `webhooks` / optional `paths` (NPE risk) | Medium | +| P1 — Functional | Gap 8: Binary/file upload encoding | Low | +| P1 — Functional | Gap 9: JSON Schema 2020-12 keywords (`$defs`, `const`, `unevaluatedProperties`) | High | +| P1 — Functional | Gap 10: `ValidationKeywordsPreprocessor` blocks canonical nullable pattern | Low | +| P1 — Functional | Gap 11: No OAS version detection | Low | +| P2 — Quality | Gap 6: `components.pathItems` traversal | Low | +| P2 — Quality | Gap 7: `example` deprecation warning | Low | +| P3 — Informational | Gap 12: `info.summary` / `license.identifier` | Trivial | +| P3 — Informational | Gap 13: `mutualTLS` test coverage | Trivial | +| P3 — Informational | Gap 14: Server `summary` | Trivial | +| P3 — Informational | Gap 15: `jsonSchemaDialect` field | Trivial | diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java index 889e37092..2f409f74a 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java @@ -55,11 +55,14 @@ public void preprocessOpenAPI( @Nonnull final OpenAPI openAPI ) } } + // Gap 5: OAS 3.1 documents may have no paths (webhooks-only or components-only). if( USE_EXCLUDE_PATHS.isEnabled(config) ) { final String[] exclusions = USE_EXCLUDE_PATHS.getValue(config).trim().split("[,\\s]+"); - for( final String exclusion : exclusions ) { - if( !openAPI.getPaths().keySet().remove(exclusion) ) { - log.error("Could not remove path {}", exclusion); + if( openAPI.getPaths() != null ) { + for( final String exclusion : exclusions ) { + if( !openAPI.getPaths().keySet().remove(exclusion) ) { + log.error("Could not remove path {}", exclusion); + } } } } @@ -200,6 +203,12 @@ private void preprocessRemoveRedundancies( @Nonnull final OpenAPI openAPI ) final var refs = new LinkedHashSet(); final var pattern = Pattern.compile("\\$ref: #/components/schemas/(\\w+)"); + // Gap 5: OAS 3.1 documents may have no paths (webhooks-only or components-only). + if( openAPI.getPaths() == null || openAPI.getPaths().isEmpty() ) { + log.warn("No paths found in OpenAPI spec; skipping unused-component removal."); + return; + } + // find and queue schemas nested in paths for( final var path : openAPI.getPaths().values() ) { final var m = pattern.matcher(path.toString()); @@ -211,6 +220,20 @@ private void preprocessRemoveRedundancies( @Nonnull final OpenAPI openAPI ) } } + // Gap 6: OAS 3.1 adds components/pathItems — traverse them for schema references too + final var pathItems = openAPI.getComponents() != null ? openAPI.getComponents().getPathItems() : null; + if( pathItems != null ) { + for( final var pathItem : pathItems.values() ) { + final var m = pattern.matcher(pathItem.toString()); + while( m.find() ) { + final var name = m.group(1); + final var schema = openAPI.getComponents().getSchemas().get(name); + queue.add(schema); + refs.add(m.group(0).split(" ")[1]); + } + } + } + while( !queue.isEmpty() ) { final var s = queue.remove(); if( s == null || !done.add(s) ) { diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java index 9122eac60..039673cdf 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java @@ -1,6 +1,7 @@ package com.sap.cloud.sdk.datamodel.openapi.generator; import java.util.Map; +import java.util.Set; import javax.annotation.Nonnull; @@ -11,10 +12,13 @@ import io.swagger.v3.oas.models.media.Schema; /** - * Fix Api client methods with oneOf primitive param to stay simplified from OpenAPI generator 7.22.0 + * Fix Api client methods with oneOf primitive param to stay simplified from OpenAPI generator 7.22.0. Also adds OAS + * 3.1-aware normalisation: nullable warnings, example deprecation warnings, and contentEncoding/contentMediaType → + * format mapping for binary file uploads. */ public class CustomOpenAPINormalizer extends OpenAPINormalizer { + private final boolean isOas31; /** * Initializes OpenAPI Normalizer with a set of rules @@ -27,10 +31,12 @@ public class CustomOpenAPINormalizer extends OpenAPINormalizer public CustomOpenAPINormalizer( final @Nonnull OpenAPI openAPI, final @Nonnull Map inputRules ) { super(openAPI, inputRules); + this.isOas31 = OasVersionUtil.isOas31(openAPI); } /** - * Normalize reference schema with allOf to support sibling properties + * Normalize reference schema with allOf to support sibling properties. Also warns on OAS 3.1 deprecated keywords + * when processing a 3.1 spec. * * @param schema * Schema @@ -46,6 +52,15 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) LOGGER.warn("Type(s) cleared (set to null) given $ref is set to {}.", schema.get$ref()); } + // Gap 1: warn when deprecated nullable: true is used in an OAS 3.1 spec + if( isOas31 && schema.getNullable() != null ) { + LOGGER + .warn( + "'nullable: true' is not a valid OAS 3.1 keyword on $ref schema '{}'. " + + "Use anyOf: [{{$ref: \"...\"}}, {{type: \"null\"}}] instead.", + schema.get$ref()); + } + if( schema.getTitle() != null || schema.getDescription() != null || schema.getNullable() != null @@ -53,8 +68,12 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) || schema.getDeprecated() != null || schema.getMaximum() != null || schema.getMinimum() != null + // Gap 2: OAS 3.0 boolean exclusiveMaximum/exclusiveMinimum || schema.getExclusiveMaximum() != null || schema.getExclusiveMinimum() != null + // Gap 2: OAS 3.1 numeric exclusiveMaximumValue/exclusiveMinimumValue + || schema.getExclusiveMaximumValue() != null + || schema.getExclusiveMinimumValue() != null || schema.getMaxItems() != null || schema.getMinItems() != null || schema.getMaxProperties() != null @@ -65,6 +84,8 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) || schema.getReadOnly() != null || schema.getExample() != null || (schema.getExamples() != null && !schema.getExamples().isEmpty()) + // Gap 4: OAS 3.1 const keyword as $ref sibling + || schema.getConst() != null || schema.getMultipleOf() != null || schema.getPattern() != null || (schema.getExtensions() != null && !schema.getExtensions().isEmpty()) ) { @@ -87,4 +108,40 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) schema.set$ref(null); } } + + /** + * Normalizes any schema (not just $ref schemas). Adds OAS 3.1 specific mappings: + *
    + *
  • Gap 7: warn on deprecated singular {@code example} keyword in OAS 3.1 schemas
  • + *
  • Gap 8: map {@code contentEncoding}/{@code contentMediaType} to {@code format} for binary file uploads
  • + *
+ */ + @Override + @SuppressWarnings( { "rawtypes" } ) + public Schema normalizeSchema( final @Nonnull Schema schema, final @Nonnull Set visitedSchemas ) + { + // Gap 7: warn on deprecated singular `example` in OAS 3.1 Schema Objects + if( isOas31 && schema.getExample() != null ) { + LOGGER + .warn( + "The 'example' keyword is deprecated in OAS 3.1 Schema Objects. " + + "Use 'examples: [...]' (array form) instead."); + } + + // Gap 8: map OAS 3.1 contentEncoding/contentMediaType to legacy format keyword + // so that downstream type-mapping (File -> byte[]) continues to work. + if( schema.getFormat() == null ) { + if( "base64".equalsIgnoreCase(schema.getContentEncoding()) ) { + schema.setFormat("byte"); + } else if( schema.getContentEncoding() != null ) { + // Any other content encoding (e.g., "binary") → treat as binary + schema.setFormat("binary"); + } else if( schema.getContentMediaType() != null ) { + // contentMediaType without contentEncoding → binary stream + schema.setFormat("binary"); + } + } + + return super.normalizeSchema(schema, visitedSchemas); + } } diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java index 100b8e9f9..84824b58d 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java @@ -115,6 +115,13 @@ private static void setGlobalSettings( @Nonnull final GenerationConfiguration co log.warn("Parsing the specification yielded the following messages: {}", spec.getMessages()); } final var result = spec.getOpenAPI(); + if( OasVersionUtil.isOas31(result) ) { + log + .info( + "Detected OAS 3.1 specification (version: {}). " + + "OAS 3.1 support is available with known limitations documented in OAS31_GAPS.md.", + result.getOpenapi()); + } preprocessSpecification(result, config); return result; } diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java new file mode 100644 index 000000000..adcb546ef --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java @@ -0,0 +1,30 @@ +package com.sap.cloud.sdk.datamodel.openapi.generator; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.fasterxml.jackson.databind.JsonNode; + +import io.swagger.v3.oas.models.OpenAPI; + +final class OasVersionUtil +{ + private OasVersionUtil() + { + } + + static boolean isOas31( @Nullable final String version ) + { + return version != null && version.startsWith("3.1"); + } + + static boolean isOas31( @Nonnull final OpenAPI openAPI ) + { + return isOas31(openAPI.getOpenapi()); + } + + static boolean isOas31( @Nonnull final JsonNode rootNode ) + { + return isOas31(rootNode.path("openapi").asText(null)); + } +} diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java index 08af5a717..167ed9d54 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java @@ -13,6 +13,7 @@ class ValidationKeywordsPreprocessor implements PreprocessingStep { private final List POTENTIALLY_UNSUPPORTED_VALIDATION_KEYWORDS = Arrays.asList("anyOf", "oneOf"); private final String PATHS_NODE = "paths"; + private final String WEBHOOKS_NODE = "webhooks"; private final String COMPONENTS_NODE = "components"; private final String SCHEMAS_NODE = "schemas"; @@ -21,33 +22,37 @@ class ValidationKeywordsPreprocessor implements PreprocessingStep public PreprocessingStepResult execute( @Nonnull final JsonNode input, @Nonnull final ObjectMapper objectMapper ) { final JsonNode pathsNode = input.path(PATHS_NODE); + + // Gap 5: OAS 3.1 documents may omit `paths` and use only `webhooks` or `components`. + // Webhook client generation is not yet supported; emit a clear error so the user knows why. + if( pathsNode.isMissingNode() ) { + final JsonNode webhooksNode = input.path(WEBHOOKS_NODE); + if( !webhooksNode.isMissingNode() ) { + throw new OpenApiGeneratorException( + "The OAS 3.1 document contains 'webhooks' but no 'paths'. " + + "Webhook client generation is not yet supported by this generator. " + + "Add at least one path to generate a client."); + } + // components-only or empty document — no paths to validate; let upstream handle it + return noChanges(input); + } + checkForValidatorsInPaths(pathsNode); final JsonNode schemasNode = input.path(COMPONENTS_NODE).path(SCHEMAS_NODE); checkForValidatorsInSchemas(schemasNode); - return new PreprocessingStepResult() - { - @Nonnull - @Override - public JsonNode getJsonNode() - { - return input; - } - - @Nonnull - @Override - public boolean changesApplied() - { - return false; - } - }; + return noChanges(input); } private void checkForValidatorsInPaths( final JsonNode pathsNode ) { for( final String field : POTENTIALLY_UNSUPPORTED_VALIDATION_KEYWORDS ) { - final boolean isUnsupported = pathsNode.findValue(field) != null; + // Gap 10: allow the OAS 3.1 canonical null-union pattern: + // anyOf/oneOf: [{$ref: "..."}, {type: "null"}] + // Only block occurrences that are NOT null-union patterns. + final boolean isUnsupported = + pathsNode.findValues(field).stream().anyMatch(node -> !isNullUnionPattern(node)); if( isUnsupported ) { throw new OpenApiGeneratorException( "The OpenAPI spec contains keyword " @@ -63,7 +68,9 @@ private void checkForValidatorsInSchemas( final JsonNode schemasNode ) for( final String field : POTENTIALLY_UNSUPPORTED_VALIDATION_KEYWORDS ) { for( final JsonNode schema : schemasNode ) { for( final JsonNode schemaChild : schema ) { - final boolean isUnsupported = schemaChild.findValue(field) != null; + // Gap 10: allow the OAS 3.1 canonical null-union pattern. + final boolean isUnsupported = + schemaChild.findValues(field).stream().anyMatch(node -> !isNullUnionPattern(node)); if( isUnsupported ) { throw new OpenApiGeneratorException( "The OpenAPI spec contains keyword " @@ -71,10 +78,58 @@ private void checkForValidatorsInSchemas( final JsonNode schemasNode ) + " inside schemas which is only supported if it is a direct child." + " Occurrences under additionalProperties and nesting inside a property is supported only if you explicitly enable it's processing using parameter in the OpenAPI generator maven plugin." + " Please regenerate your client by including parameter."); - } } } } } + + /** + * Returns {@code true} when the given JSON node represents the OAS 3.1 canonical nullable-ref pattern: + * + *
+     * anyOf/oneOf:
+     *   - $ref: "..."
+     *   - type: "null"
+     * 
+ * + * This two-element array pattern is the standard way to express a nullable $ref in OAS 3.1 and must be allowed even + * when oneOf/anyOf generation is otherwise disabled. + */ + private boolean isNullUnionPattern( final JsonNode node ) + { + if( !node.isArray() || node.size() != 2 ) { + return false; + } + boolean hasRef = false; + boolean hasNullType = false; + for( final JsonNode item : node ) { + if( item.has("$ref") && item.size() == 1 ) { + hasRef = true; + } else if( item.has("type") && "null".equals(item.path("type").asText()) && item.size() == 1 ) { + hasNullType = true; + } + } + return hasRef && hasNullType; + } + + private PreprocessingStepResult noChanges( final JsonNode input ) + { + return new PreprocessingStepResult() + { + @Nonnull + @Override + public JsonNode getJsonNode() + { + return input; + } + + @Nonnull + @Override + public boolean changesApplied() + { + return false; + } + }; + } } diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java index 1517023d8..1b43bf66c 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java @@ -32,6 +32,12 @@ class DataModelGeneratorUnitTest private final String INPUT_FILE_PATH = "src/test/resources/" + INPUT_CLASS_PATH; + private final String INPUT_31_FILE_PATH = + "src/test/resources/" + DataModelGeneratorUnitTest.class.getSimpleName() + "/sodastore-31.yaml"; + + private final String INPUT_31_MUTUAL_TLS_FILE_PATH = + "src/test/resources/" + DataModelGeneratorUnitTest.class.getSimpleName() + "/sodastore-31-mutual-tls.yaml"; + @Test void testSuccessfulGenerationWithInputSpecAsFilePath() { @@ -389,4 +395,44 @@ void testConfigOptionsArePassedToGenerator() // assert output directory was created implicitly assertThat(outputDirectory.toFile().exists()).isTrue(); } + + @Test + void testSuccessfulGenerationWithOas31Spec() + { + final GenerationConfiguration configuration = + GenerationConfiguration + .builder() + .inputSpec(INPUT_31_FILE_PATH) + .modelPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.model") + .apiPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.api") + .outputDirectory(outputDirectory.toAbsolutePath().toString()) + .verbose(false) + .apiMaturity(ApiMaturity.RELEASED) + .build(); + + final Try generationResult = new DataModelGenerator().generateDataModel(configuration); + + assertThat(generationResult.isSuccess()).isTrue(); + assertThat(generationResult.get().getGeneratedFiles()).isNotEmpty(); + } + + @Test + void testSuccessfulGenerationWithMutualTlsSecurityScheme() + { + final GenerationConfiguration configuration = + GenerationConfiguration + .builder() + .inputSpec(INPUT_31_MUTUAL_TLS_FILE_PATH) + .modelPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.model") + .apiPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.api") + .outputDirectory(outputDirectory.toAbsolutePath().toString()) + .verbose(false) + .apiMaturity(ApiMaturity.RELEASED) + .build(); + + final Try generationResult = new DataModelGenerator().generateDataModel(configuration); + + assertThat(generationResult.isSuccess()).isTrue(); + assertThat(generationResult.get().getGeneratedFiles()).isNotEmpty(); + } } diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java index 362d8075a..1d9fe1490 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java @@ -116,4 +116,72 @@ void testSodastoreApiWithAllOf() assertThat(result.getJsonNode()).isEqualTo(jsonNode); } + // --- OAS 3.1 tests --- + + @Test + void testOas31NullUnionAnyOfInPaths_isAllowed() + throws IOException + { + // Gap 10: anyOf: [{$ref: "..."}, {type: "null"}] in a path request body is the OAS 3.1 + // canonical nullable-$ref pattern and must be allowed even when oneOf/anyOf generation + // is otherwise disabled. + final Path inputFilePath = + Paths + .get( + "src/test/resources/" + + ValidationKeywordsPreprocessorTest.class.getSimpleName() + + "/sodastore-31-nullable.json"); + + final ObjectMapper objectMapper = new ObjectMapper(); + final JsonNode jsonNode = objectMapper.readTree(inputFilePath.toFile()); + + final PreprocessingStep.PreprocessingStepResult result = + new ValidationKeywordsPreprocessor().execute(jsonNode, objectMapper); + + assertThat(result.changesApplied()).isFalse(); + assertThat(result.getJsonNode()).isEqualTo(jsonNode); + } + + @Test + void testOas31NullUnionAnyOfInSchemas_isAllowed() + throws IOException + { + // The sodastore-31-nullable.json fixture also contains null-union anyOf in component schemas. + final Path inputFilePath = + Paths + .get( + "src/test/resources/" + + ValidationKeywordsPreprocessorTest.class.getSimpleName() + + "/sodastore-31-nullable.json"); + + final ObjectMapper objectMapper = new ObjectMapper(); + final JsonNode jsonNode = objectMapper.readTree(inputFilePath.toFile()); + + // Must not throw — null-union patterns in schemas are allowed + final PreprocessingStep.PreprocessingStepResult result = + new ValidationKeywordsPreprocessor().execute(jsonNode, objectMapper); + + assertThat(result.changesApplied()).isFalse(); + } + + @Test + void testNonNullUnionOneOfInPaths_isBlocked() + throws IOException + { + // A oneOf with two $ref items (no null type) in a path must still be blocked + // when oneOf/anyOf generation is disabled. + final Path inputFilePath = + Paths + .get( + "src/test/resources/" + + ValidationKeywordsPreprocessorTest.class.getSimpleName() + + "/AggregatorInPathSchema.json"); + + final ObjectMapper objectMapper = new ObjectMapper(); + final JsonNode jsonNode = objectMapper.readTree(inputFilePath.toFile()); + + assertThatThrownBy(() -> new ValidationKeywordsPreprocessor().execute(jsonNode, objectMapper)) + .isInstanceOf(OpenApiGeneratorException.class); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml new file mode 100644 index 000000000..802f339a4 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml @@ -0,0 +1,40 @@ +openapi: 3.1.0 +info: + title: Soda Store API (mutualTLS) + version: 1.0.0 + description: OAS 3.1 test fixture with mutualTLS security scheme (Gap 13) + +paths: + /sodas: + get: + summary: Get a list of all sodas + operationId: getSodas + security: + - mtlsAuth: [] + responses: + '200': + description: A list of sodas + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Soda' + +components: + securitySchemes: + mtlsAuth: + type: mutualTLS + description: Client certificate issued via the production dashboard. + + schemas: + Soda: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml new file mode 100644 index 000000000..c0264c898 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml @@ -0,0 +1,148 @@ +openapi: 3.1.0 +info: + title: Soda Store API + summary: A sample OAS 3.1 soda store API + version: 1.0.0 + description: API for managing sodas in a soda store (OAS 3.1 test fixture) + license: + name: Apache 2.0 + identifier: Apache-2.0 + +paths: + /sodas: + get: + summary: Get a list of all sodas + operationId: getSodas + x-sap-cloud-sdk-api-name: soda-shop + responses: + '200': + description: A list of sodas + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Soda' + + post: + summary: Add a new soda to the store + operationId: addSoda + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewSoda' + responses: + '201': + description: The newly added soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + + /sodas/{sodaId}: + get: + summary: Get details of a specific soda + operationId: getSodaById + parameters: + - name: sodaId + in: path + description: ID of the soda to retrieve + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: The requested soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + '404': + description: Soda not found + + delete: + summary: Delete a specific soda from the store + operationId: deleteSodaById + parameters: + - name: sodaId + in: path + description: ID of the soda to delete + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Soda successfully deleted + '404': + description: Soda not found + +components: + schemas: + Soda: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + brand: + # Gap 1: OAS 3.1 nullable via type array instead of nullable: true + type: + - string + - "null" + flavor: + type: string + price: + type: number + format: float + # Gap 2: OAS 3.1 numeric exclusiveMinimum (direct value, not a boolean modifier) + rating: + type: number + exclusiveMinimum: 0 + exclusiveMaximum: 5 + description: + # Gap 4: $ref with sibling description — valid in OAS 3.1 + $ref: '#/components/schemas/SodaDescription' + description: Human-readable description override + # Gap 10 / canonical nullable-$ref: anyOf with null type for nullable reference + category: + anyOf: + - $ref: '#/components/schemas/SodaCategory' + - type: "null" + required: + - name + - flavor + - price + + SodaDescription: + type: string + + SodaCategory: + type: object + properties: + name: + type: string + + NewSoda: + type: object + properties: + name: + type: string + brand: + type: + - string + - "null" + flavor: + type: string + price: + type: number + format: float + required: + - name + - flavor + - price diff --git a/datamodel/openapi/openapi-generator/src/test/resources/ValidationKeywordsPreprocessorTest/sodastore-31-nullable.json b/datamodel/openapi/openapi-generator/src/test/resources/ValidationKeywordsPreprocessorTest/sodastore-31-nullable.json new file mode 100644 index 000000000..cdb605420 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/ValidationKeywordsPreprocessorTest/sodastore-31-nullable.json @@ -0,0 +1,67 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OAS 3.1 Nullable Test API", + "version": "1.0.0" + }, + "paths": { + "/sodas": { + "post": { + "operationId": "addSoda", + "summary": "Add a soda with nullable fields", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "brand": { + "anyOf": [ + { "$ref": "#/components/schemas/Brand" }, + { "type": "null" } + ] + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created" + } + } + } + } + }, + "components": { + "schemas": { + "Brand": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "NullableRef": { + "type": "object", + "properties": { + "optionalBrand": { + "anyOf": [ + { "$ref": "#/components/schemas/Brand" }, + { "type": "null" } + ] + }, + "requiredName": { + "type": "string" + } + } + } + } + } +} From cbddab14c73efbffc39ec747a91d7e038607e72a Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 11:21:09 +0200 Subject: [PATCH 02/28] fix: PMD Nonnull --- .../sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java index 039673cdf..91cb8c0f5 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java @@ -117,6 +117,7 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) * */ @Override + @Nonnull @SuppressWarnings( { "rawtypes" } ) public Schema normalizeSchema( final @Nonnull Schema schema, final @Nonnull Set visitedSchemas ) { From 42a0e609c20301c5a9622355cddefd153ac02862 Mon Sep 17 00:00:00 2001 From: I538344 Date: Wed, 22 Jul 2026 15:10:04 +0200 Subject: [PATCH 03/28] Fix log --- .../generator/CreatorForInterfaceSubtypesFeature.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CreatorForInterfaceSubtypesFeature.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CreatorForInterfaceSubtypesFeature.java index df5a5122e..c97da7cbd 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CreatorForInterfaceSubtypesFeature.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CreatorForInterfaceSubtypesFeature.java @@ -34,8 +34,10 @@ void apply() final var creators = new HashSet(); for( final String candidate : Sets.union(m.anyOf, m.oneOf) ) { - final var creator = processCandidate(candidate); - creators.add(creator); + if( candidate != null ) { + final var creator = processCandidate(candidate); + creators.add(creator); + } } final var hasArray = creators.stream().anyMatch(CreatorDetails::isArray); @@ -52,7 +54,7 @@ void apply() log.warn(msg, m.name); } if( hasArray ) { - final var msg = "Field can be oneOf %d array types. Deserialization may not work as expected."; + final var msg = "Object contains oneOf with array types: {}. Deserialization may not work as expected."; log.warn(msg, m.name); } From ffe6a01319745cbe5d8cd1fb65e0d9a0af4df6b4 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 16:39:41 +0200 Subject: [PATCH 04/28] Remove unnecessary log warning and error --- .../datamodel/openapi/generator/CustomJavaClientCodegen.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java index 2f409f74a..cdfda7c6c 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java @@ -60,9 +60,7 @@ public void preprocessOpenAPI( @Nonnull final OpenAPI openAPI ) final String[] exclusions = USE_EXCLUDE_PATHS.getValue(config).trim().split("[,\\s]+"); if( openAPI.getPaths() != null ) { for( final String exclusion : exclusions ) { - if( !openAPI.getPaths().keySet().remove(exclusion) ) { - log.error("Could not remove path {}", exclusion); - } + openAPI.getPaths().remove(exclusion); } } } @@ -205,7 +203,6 @@ private void preprocessRemoveRedundancies( @Nonnull final OpenAPI openAPI ) // Gap 5: OAS 3.1 documents may have no paths (webhooks-only or components-only). if( openAPI.getPaths() == null || openAPI.getPaths().isEmpty() ) { - log.warn("No paths found in OpenAPI spec; skipping unused-component removal."); return; } From ad395cb48ac978cdaf8d1469d98c3d7259b0c88c Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 16:43:23 +0200 Subject: [PATCH 05/28] Log spec OAS version instead of mentioning 3.1 limitation --- .../generator/GenerationConfigurationConverter.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java index 84824b58d..c1ba970ce 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java @@ -115,13 +115,7 @@ private static void setGlobalSettings( @Nonnull final GenerationConfiguration co log.warn("Parsing the specification yielded the following messages: {}", spec.getMessages()); } final var result = spec.getOpenAPI(); - if( OasVersionUtil.isOas31(result) ) { - log - .info( - "Detected OAS 3.1 specification (version: {}). " - + "OAS 3.1 support is available with known limitations documented in OAS31_GAPS.md.", - result.getOpenapi()); - } + log.info("Detected OpenAPI specification version {}.", result.getOpenapi()); preprocessSpecification(result, config); return result; } From fe0363194a6244998e6c6d9588f33ed526854e9a Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 17:01:38 +0200 Subject: [PATCH 06/28] Remove unused overload in oas version util --- .../openapi/generator/OasVersionUtil.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java index adcb546ef..0a4453230 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/OasVersionUtil.java @@ -1,9 +1,6 @@ package com.sap.cloud.sdk.datamodel.openapi.generator; import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.fasterxml.jackson.databind.JsonNode; import io.swagger.v3.oas.models.OpenAPI; @@ -13,18 +10,9 @@ private OasVersionUtil() { } - static boolean isOas31( @Nullable final String version ) - { - return version != null && version.startsWith("3.1"); - } - static boolean isOas31( @Nonnull final OpenAPI openAPI ) { - return isOas31(openAPI.getOpenapi()); - } - - static boolean isOas31( @Nonnull final JsonNode rootNode ) - { - return isOas31(rootNode.path("openapi").asText(null)); + final String version = openAPI.getOpenapi(); + return version != null && version.startsWith("3.1"); } } From 189c47258f4c73f7ea1913e133b20d2775aead41 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 17:59:01 +0200 Subject: [PATCH 07/28] Add integration tests and fix exclusive min max in 3.0 and 3.1 --- .../mustache-templates/pojo.mustache | 12 +- .../DataModelGeneratorIntegrationTest.java | 55 +++ .../generator/DataModelGeneratorUnitTest.java | 46 --- .../input/sodastore.yaml | 38 ++ .../datamodel/rest/test/api/DefaultApi.java | 91 +++++ .../sdk/datamodel/rest/test/model/Soda.java | 256 +++++++++++++ .../input/sodastore.yaml | 47 +++ .../datamodel/rest/test/api/DefaultApi.java | 91 +++++ .../sdk/datamodel/rest/test/model/Soda.java | 335 ++++++++++++++++++ .../oas31-nullable-ref/input/sodastore.yaml | 37 ++ .../datamodel/rest/test/api/DefaultApi.java | 91 +++++ .../sdk/datamodel/rest/test/model/Soda.java | 209 +++++++++++ .../rest/test/model/SodaCategory.java | 173 +++++++++ .../input/sodastore.yaml | 31 ++ .../datamodel/rest/test/api/DefaultApi.java | 91 +++++ .../sdk/datamodel/rest/test/model/Soda.java | 208 +++++++++++ .../input/sodastore.yaml | 33 ++ .../datamodel/rest/test/api/DefaultApi.java | 91 +++++ .../sdk/datamodel/rest/test/model/Soda.java | 208 +++++++++++ .../sodastore-31-mutual-tls.yaml | 40 --- .../sodastore-31.yaml | 148 -------- 21 files changed, 2091 insertions(+), 240 deletions(-) create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml diff --git a/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache b/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache index b139c82a7..167cfbecb 100644 --- a/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache +++ b/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache @@ -109,10 +109,10 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens * * @param {{name}} {{#description}}{{description}}{{/description}}{{^description}}The {{name}} of this {@link {{classname}}}{{/description}} {{#minimum}} - * Minimum: {{minimum}} + * Minimum: {{minimum}}{{#exclusiveMinimum}} (exclusive){{/exclusiveMinimum}} {{/minimum}} {{#maximum}} - * Maximum: {{maximum}} + * Maximum: {{maximum}}{{#exclusiveMaximum}} (exclusive){{/exclusiveMaximum}} {{/maximum}} * @return The same instance of this {@link {{classname}}} class */ @@ -190,10 +190,10 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{.}} + * minimum: {{.}}{{#exclusiveMinimum}} (exclusive){{/exclusiveMinimum}} {{/minimum}} {{#maximum}} - * maximum: {{.}} + * maximum: {{.}}{{#exclusiveMaximum}} (exclusive){{/exclusiveMaximum}} {{/maximum}} * @return {{name}} The {{name}} of this {@link {{classname}}} instance. {{#deprecated}} @@ -234,10 +234,10 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens * * @param {{name}} {{#description}}{{description}}{{/description}}{{^description}}The {{name}} of this {@link {{classname}}}{{/description}} {{#minimum}} - * Minimum: {{minimum}} + * Minimum: {{minimum}}{{#exclusiveMinimum}} (exclusive){{/exclusiveMinimum}} {{/minimum}} {{#maximum}} - * Maximum: {{maximum}} + * Maximum: {{maximum}}{{#exclusiveMaximum}} (exclusive){{/exclusiveMaximum}} {{/maximum}} */ public void {{setter}}( {{#isNullable}}@Nullable{{/isNullable}}{{^isNullable}}{{#required}}@Nonnull{{/required}}{{^required}}@Nullable{{/required}}{{/isNullable}} final {{{datatypeWithEnum}}} {{name}}) { diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java index 27487ab47..8d017f943 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java @@ -166,6 +166,61 @@ enum TestCase 7, Map.of(), Map.of()), + OAS31_NULLABLE_TYPE_ARRAY( + "oas31-nullable-type-array", + "sodastore.yaml", + "com.sap.cloud.sdk.datamodel.rest.test.api", + "com.sap.cloud.sdk.datamodel.rest.test.model", + ApiMaturity.RELEASED, + false, + true, + 2, + Map.of(), + Map.of()), + OAS31_EXCLUSIVE_MIN_MAX( + "oas31-exclusive-min-max", + "sodastore.yaml", + "com.sap.cloud.sdk.datamodel.rest.test.api", + "com.sap.cloud.sdk.datamodel.rest.test.model", + ApiMaturity.RELEASED, + false, + true, + 2, + Map.of(), + Map.of()), + OAS31_REF_WITH_SIBLING( + "oas31-ref-with-sibling", + "sodastore.yaml", + "com.sap.cloud.sdk.datamodel.rest.test.api", + "com.sap.cloud.sdk.datamodel.rest.test.model", + ApiMaturity.RELEASED, + false, + true, + 2, + Map.of(), + Map.of()), + OAS31_NULLABLE_REF( + "oas31-nullable-ref", + "sodastore.yaml", + "com.sap.cloud.sdk.datamodel.rest.test.api", + "com.sap.cloud.sdk.datamodel.rest.test.model", + ApiMaturity.RELEASED, + false, + true, + 3, + Map.of(), + Map.of()), + OAS30_EXCLUSIVE_MIN_MAX( + "oas30-exclusive-min-max", + "sodastore.yaml", + "com.sap.cloud.sdk.datamodel.rest.test.api", + "com.sap.cloud.sdk.datamodel.rest.test.model", + ApiMaturity.RELEASED, + false, + true, + 2, + Map.of(), + Map.of()), FILE_HANDLING( "file-handling", "file-handling.yaml", diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java index 1b43bf66c..1517023d8 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java @@ -32,12 +32,6 @@ class DataModelGeneratorUnitTest private final String INPUT_FILE_PATH = "src/test/resources/" + INPUT_CLASS_PATH; - private final String INPUT_31_FILE_PATH = - "src/test/resources/" + DataModelGeneratorUnitTest.class.getSimpleName() + "/sodastore-31.yaml"; - - private final String INPUT_31_MUTUAL_TLS_FILE_PATH = - "src/test/resources/" + DataModelGeneratorUnitTest.class.getSimpleName() + "/sodastore-31-mutual-tls.yaml"; - @Test void testSuccessfulGenerationWithInputSpecAsFilePath() { @@ -395,44 +389,4 @@ void testConfigOptionsArePassedToGenerator() // assert output directory was created implicitly assertThat(outputDirectory.toFile().exists()).isTrue(); } - - @Test - void testSuccessfulGenerationWithOas31Spec() - { - final GenerationConfiguration configuration = - GenerationConfiguration - .builder() - .inputSpec(INPUT_31_FILE_PATH) - .modelPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.model") - .apiPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.api") - .outputDirectory(outputDirectory.toAbsolutePath().toString()) - .verbose(false) - .apiMaturity(ApiMaturity.RELEASED) - .build(); - - final Try generationResult = new DataModelGenerator().generateDataModel(configuration); - - assertThat(generationResult.isSuccess()).isTrue(); - assertThat(generationResult.get().getGeneratedFiles()).isNotEmpty(); - } - - @Test - void testSuccessfulGenerationWithMutualTlsSecurityScheme() - { - final GenerationConfiguration configuration = - GenerationConfiguration - .builder() - .inputSpec(INPUT_31_MUTUAL_TLS_FILE_PATH) - .modelPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.model") - .apiPackage("com.sap.cloud.sdk.datamodel.rest.sodastore.api") - .outputDirectory(outputDirectory.toAbsolutePath().toString()) - .verbose(false) - .apiMaturity(ApiMaturity.RELEASED) - .build(); - - final Try generationResult = new DataModelGenerator().generateDataModel(configuration); - - assertThat(generationResult.isSuccess()).isTrue(); - assertThat(generationResult.get().getGeneratedFiles()).isNotEmpty(); - } } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml new file mode 100644 index 000000000..9ad45cbb3 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml @@ -0,0 +1,38 @@ +openapi: 3.0.3 +info: + title: OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + Soda: + type: object + properties: + name: + type: string + rating: + # OAS 3.0: boolean exclusiveMinimum/exclusiveMaximum as flags alongside minimum/maximum + type: number + minimum: 0 + exclusiveMinimum: true + maximum: 5 + exclusiveMaximum: true + score: + # OAS 3.0: non-exclusive minimum/maximum (no boolean flags) + type: number + minimum: 0 + maximum: 100 + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..09d8e0ade --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; +import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import com.google.common.annotations.Beta; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + +/** + * OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum in version 1.0.0. + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends AbstractOpenApiService { + /** + * Instantiates this API class to invoke operations on the OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + @Beta + public DefaultApi( @Nonnull final ApiClient apiClient ) + { + super(apiClient); + } + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + final Object localVarPostBody = null; + + final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString(); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[] { }; + + final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..2838b9548 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("rating") + private BigDecimal rating; + + @JsonProperty("score") + private BigDecimal score; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the rating of this {@link Soda} instance and return the same instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda rating( @Nullable final BigDecimal rating) { + this.rating = rating; + return this; + } + + /** + * Get rating + * minimum: 0 (exclusive) + * maximum: 5 (exclusive) + * @return rating The rating of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getRating() { + return rating; + } + + /** + * Set the rating of this {@link Soda} instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + */ + public void setRating( @Nullable final BigDecimal rating) { + this.rating = rating; + } + + /** + * Set the score of this {@link Soda} instance and return the same instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda score( @Nullable final BigDecimal score) { + this.score = score; + return this; + } + + /** + * Get score + * minimum: 0 + * maximum: 100 + * @return score The score of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getScore() { + return score; + } + + /** + * Set the score of this {@link Soda} instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + */ + public void setScore( @Nullable final BigDecimal score) { + this.score = score; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( rating != null ) declaredFields.put("rating", rating); + if( score != null ) declaredFields.put("score", score); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.rating, soda.rating) && + Objects.equals(this.score, soda.score); + } + + @Override + public int hashCode() { + return Objects.hash(name, rating, score, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rating: ").append(toIndentedString(rating)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml new file mode 100644 index 000000000..f3ac45b51 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml @@ -0,0 +1,47 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + Soda: + type: object + properties: + name: + type: string + rating: + # Gap 2: numeric exclusiveMinimum/exclusiveMaximum as direct values + type: number + exclusiveMinimum: 0 + exclusiveMaximum: 5 + score: + # OAS 3.1: non-exclusive minimum/maximum (plain numeric values) + type: number + minimum: 0 + maximum: 100 + temperature: + # OAS 3.1: mixed — inclusive minimum alongside exclusive maximum + type: number + minimum: 0 + exclusiveMaximum: 100 + combo: + # OAS 3.1: both minimum (inclusive) and exclusiveMinimum (exclusive numeric) present; + # exclusiveMinimum: 3 is stricter than minimum: 2, so effective constraint is > 3 + type: number + minimum: 2 + exclusiveMinimum: 3 + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..176600d2e --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; +import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import com.google.common.annotations.Beta; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + +/** + * OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum in version 1.0.0. + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends AbstractOpenApiService { + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + @Beta + public DefaultApi( @Nonnull final ApiClient apiClient ) + { + super(apiClient); + } + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + final Object localVarPostBody = null; + + final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString(); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[] { }; + + final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..e071d03ae --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,335 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("rating") + private BigDecimal rating; + + @JsonProperty("score") + private BigDecimal score; + + @JsonProperty("temperature") + private BigDecimal temperature; + + @JsonProperty("combo") + private BigDecimal combo; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the rating of this {@link Soda} instance and return the same instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda rating( @Nullable final BigDecimal rating) { + this.rating = rating; + return this; + } + + /** + * Get rating + * minimum: 0 (exclusive) + * maximum: 5 (exclusive) + * @return rating The rating of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getRating() { + return rating; + } + + /** + * Set the rating of this {@link Soda} instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + */ + public void setRating( @Nullable final BigDecimal rating) { + this.rating = rating; + } + + /** + * Set the score of this {@link Soda} instance and return the same instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda score( @Nullable final BigDecimal score) { + this.score = score; + return this; + } + + /** + * Get score + * minimum: 0 + * maximum: 100 + * @return score The score of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getScore() { + return score; + } + + /** + * Set the score of this {@link Soda} instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + */ + public void setScore( @Nullable final BigDecimal score) { + this.score = score; + } + + /** + * Set the temperature of this {@link Soda} instance and return the same instance. + * + * @param temperature The temperature of this {@link Soda} + * Minimum: 0 + * Maximum: 100 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda temperature( @Nullable final BigDecimal temperature) { + this.temperature = temperature; + return this; + } + + /** + * Get temperature + * minimum: 0 + * maximum: 100 (exclusive) + * @return temperature The temperature of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getTemperature() { + return temperature; + } + + /** + * Set the temperature of this {@link Soda} instance. + * + * @param temperature The temperature of this {@link Soda} + * Minimum: 0 + * Maximum: 100 (exclusive) + */ + public void setTemperature( @Nullable final BigDecimal temperature) { + this.temperature = temperature; + } + + /** + * Set the combo of this {@link Soda} instance and return the same instance. + * + * @param combo The combo of this {@link Soda} + * Minimum: 3 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda combo( @Nullable final BigDecimal combo) { + this.combo = combo; + return this; + } + + /** + * Get combo + * minimum: 3 (exclusive) + * @return combo The combo of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getCombo() { + return combo; + } + + /** + * Set the combo of this {@link Soda} instance. + * + * @param combo The combo of this {@link Soda} + * Minimum: 3 (exclusive) + */ + public void setCombo( @Nullable final BigDecimal combo) { + this.combo = combo; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( rating != null ) declaredFields.put("rating", rating); + if( score != null ) declaredFields.put("score", score); + if( temperature != null ) declaredFields.put("temperature", temperature); + if( combo != null ) declaredFields.put("combo", combo); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.rating, soda.rating) && + Objects.equals(this.score, soda.score) && + Objects.equals(this.temperature, soda.temperature) && + Objects.equals(this.combo, soda.combo); + } + + @Override + public int hashCode() { + return Objects.hash(name, rating, score, temperature, combo, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rating: ").append(toIndentedString(rating)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); + sb.append(" combo: ").append(toIndentedString(combo)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml new file mode 100644 index 000000000..8f1f557c6 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml @@ -0,0 +1,37 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Nullable $ref via anyOf + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + SodaCategory: + type: object + properties: + name: + type: string + + Soda: + type: object + properties: + name: + type: string + category: + # Gap 10: nullable $ref using anyOf with null type + anyOf: + - $ref: '#/components/schemas/SodaCategory' + - type: "null" + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..2eeec864d --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; +import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import com.google.common.annotations.Beta; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + +/** + * OAS 3.1 Nullable $ref via anyOf in version 1.0.0. + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends AbstractOpenApiService { + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable $ref via anyOf. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable $ref via anyOf based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + @Beta + public DefaultApi( @Nonnull final ApiClient apiClient ) + { + super(apiClient); + } + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + final Object localVarPostBody = null; + + final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString(); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[] { }; + + final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..7468af81f --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Nullable $ref via anyOf + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.sap.cloud.sdk.datamodel.rest.test.model.SodaCategory; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("category") + private SodaCategory category; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the category of this {@link Soda} instance and return the same instance. + * + * @param category The category of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda category( @Nullable final SodaCategory category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category The category of this {@link Soda} instance. + */ + @Nullable + public SodaCategory getCategory() { + return category; + } + + /** + * Set the category of this {@link Soda} instance. + * + * @param category The category of this {@link Soda} + */ + public void setCategory( @Nullable final SodaCategory category) { + this.category = category; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( category != null ) declaredFields.put("category", category); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.category, soda.category); + } + + @Override + public int hashCode() { + return Objects.hash(name, category, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java new file mode 100644 index 000000000..90e9cc595 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Nullable $ref via anyOf + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * SodaCategory + */ +// CHECKSTYLE:OFF +public class SodaCategory +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link SodaCategory} instance and return the same instance. + * + * @param name The name of this {@link SodaCategory} + * @return The same instance of this {@link SodaCategory} class + */ + @Nonnull public SodaCategory name( @Nullable final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link SodaCategory} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link SodaCategory} instance. + * + * @param name The name of this {@link SodaCategory} + */ + public void setName( @Nullable final String name) { + this.name = name; + } + + /** + * Get the names of the unrecognizable properties of the {@link SodaCategory}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link SodaCategory} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("SodaCategory has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link SodaCategory} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link SodaCategory} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final SodaCategory sodaCategory = (SodaCategory) o; + return Objects.equals(this.cloudSdkCustomFields, sodaCategory.cloudSdkCustomFields) && + Objects.equals(this.name, sodaCategory.name); + } + + @Override + public int hashCode() { + return Objects.hash(name, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class SodaCategory {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml new file mode 100644 index 000000000..389a32145 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml @@ -0,0 +1,31 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Nullable Type Array + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + Soda: + type: object + properties: + name: + type: string + brand: + # Gap 1: nullable via type array instead of nullable: true + type: + - string + - "null" + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..fbfe5d2c6 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; +import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import com.google.common.annotations.Beta; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + +/** + * OAS 3.1 Nullable Type Array in version 1.0.0. + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends AbstractOpenApiService { + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable Type Array. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable Type Array based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + @Beta + public DefaultApi( @Nonnull final ApiClient apiClient ) + { + super(apiClient); + } + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + final Object localVarPostBody = null; + + final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString(); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[] { }; + + final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..5b3605010 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Nullable Type Array + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("brand") + private String brand; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the brand of this {@link Soda} instance and return the same instance. + * + * @param brand The brand of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda brand( @Nullable final String brand) { + this.brand = brand; + return this; + } + + /** + * Get brand + * @return brand The brand of this {@link Soda} instance. + */ + @Nullable + public String getBrand() { + return brand; + } + + /** + * Set the brand of this {@link Soda} instance. + * + * @param brand The brand of this {@link Soda} + */ + public void setBrand( @Nullable final String brand) { + this.brand = brand; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( brand != null ) declaredFields.put("brand", brand); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.brand, soda.brand); + } + + @Override + public int hashCode() { + return Objects.hash(name, brand, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" brand: ").append(toIndentedString(brand)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml new file mode 100644 index 000000000..c163b577b --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml @@ -0,0 +1,33 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 $ref with Sibling Properties + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + SodaDescription: + type: string + + Soda: + type: object + properties: + name: + type: string + description: + # Gap 4: $ref with a sibling property — valid in OAS 3.1 + $ref: '#/components/schemas/SodaDescription' + description: Human-readable description override + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..cb676c93a --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; +import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import com.google.common.annotations.Beta; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + +/** + * OAS 3.1 $ref with Sibling Properties in version 1.0.0. + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends AbstractOpenApiService { + /** + * Instantiates this API class to invoke operations on the OAS 3.1 $ref with Sibling Properties. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 $ref with Sibling Properties based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + @Beta + public DefaultApi( @Nonnull final ApiClient apiClient ) + { + super(apiClient); + } + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + final Object localVarPostBody = null; + + final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString(); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[] { }; + + final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..d88df9c21 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 $ref with Sibling Properties + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the description of this {@link Soda} instance and return the same instance. + * + * @param description The description of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda description( @Nullable final String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description The description of this {@link Soda} instance. + */ + @Nonnull + public String getDescription() { + return description; + } + + /** + * Set the description of this {@link Soda} instance. + * + * @param description The description of this {@link Soda} + */ + public void setDescription( @Nullable final String description) { + this.description = description; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( description != null ) declaredFields.put("description", description); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.description, soda.description); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml deleted file mode 100644 index 802f339a4..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml +++ /dev/null @@ -1,40 +0,0 @@ -openapi: 3.1.0 -info: - title: Soda Store API (mutualTLS) - version: 1.0.0 - description: OAS 3.1 test fixture with mutualTLS security scheme (Gap 13) - -paths: - /sodas: - get: - summary: Get a list of all sodas - operationId: getSodas - security: - - mtlsAuth: [] - responses: - '200': - description: A list of sodas - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Soda' - -components: - securitySchemes: - mtlsAuth: - type: mutualTLS - description: Client certificate issued via the production dashboard. - - schemas: - Soda: - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - required: - - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml deleted file mode 100644 index c0264c898..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/sodastore-31.yaml +++ /dev/null @@ -1,148 +0,0 @@ -openapi: 3.1.0 -info: - title: Soda Store API - summary: A sample OAS 3.1 soda store API - version: 1.0.0 - description: API for managing sodas in a soda store (OAS 3.1 test fixture) - license: - name: Apache 2.0 - identifier: Apache-2.0 - -paths: - /sodas: - get: - summary: Get a list of all sodas - operationId: getSodas - x-sap-cloud-sdk-api-name: soda-shop - responses: - '200': - description: A list of sodas - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Soda' - - post: - summary: Add a new soda to the store - operationId: addSoda - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NewSoda' - responses: - '201': - description: The newly added soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - - /sodas/{sodaId}: - get: - summary: Get details of a specific soda - operationId: getSodaById - parameters: - - name: sodaId - in: path - description: ID of the soda to retrieve - required: true - schema: - type: integer - format: int64 - responses: - '200': - description: The requested soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - '404': - description: Soda not found - - delete: - summary: Delete a specific soda from the store - operationId: deleteSodaById - parameters: - - name: sodaId - in: path - description: ID of the soda to delete - required: true - schema: - type: integer - format: int64 - responses: - '204': - description: Soda successfully deleted - '404': - description: Soda not found - -components: - schemas: - Soda: - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - brand: - # Gap 1: OAS 3.1 nullable via type array instead of nullable: true - type: - - string - - "null" - flavor: - type: string - price: - type: number - format: float - # Gap 2: OAS 3.1 numeric exclusiveMinimum (direct value, not a boolean modifier) - rating: - type: number - exclusiveMinimum: 0 - exclusiveMaximum: 5 - description: - # Gap 4: $ref with sibling description — valid in OAS 3.1 - $ref: '#/components/schemas/SodaDescription' - description: Human-readable description override - # Gap 10 / canonical nullable-$ref: anyOf with null type for nullable reference - category: - anyOf: - - $ref: '#/components/schemas/SodaCategory' - - type: "null" - required: - - name - - flavor - - price - - SodaDescription: - type: string - - SodaCategory: - type: object - properties: - name: - type: string - - NewSoda: - type: object - properties: - name: - type: string - brand: - type: - - string - - "null" - flavor: - type: string - price: - type: number - format: float - required: - - name - - flavor - - price From 65b4d10d1b17795fbdd32cf383cbacbc9143e0b1 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 18:15:55 +0200 Subject: [PATCH 08/28] Add unit test for pathItems --- .../generator/DataModelGeneratorUnitTest.java | 35 +++++++++++++ .../oas31-components-path-items.yaml | 49 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java index 1517023d8..b8482bda2 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java @@ -389,4 +389,39 @@ void testConfigOptionsArePassedToGenerator() // assert output directory was created implicitly assertThat(outputDirectory.toFile().exists()).isTrue(); } + + /** + * Gap 6: OAS 3.1 adds {@code components/pathItems}. When {@code removeUnusedComponents} is enabled, schemas + * referenced only from {@code components/pathItems} (not from {@code paths}) must not be deleted. + */ + @Test + @SneakyThrows + void testGap6RemoveUnusedComponentsKeepsSchemasReferencedFromComponentsPathItems() + { + final GenerationConfiguration configuration = + GenerationConfiguration + .builder() + .inputSpec( + "src/test/resources/" + + DataModelGeneratorUnitTest.class.getSimpleName() + + "/oas31-components-path-items.yaml") + .modelPackage("model") + .apiPackage("api") + .outputDirectory(outputDirectory.toAbsolutePath().toString()) + .additionalProperty("removeUnusedComponents", "true") + .build(); + + final Try result = new DataModelGenerator().generateDataModel(configuration); + + assertThat(result.isSuccess()).isTrue(); + + final var generatedFileNames = result.get().getGeneratedFiles().stream().map(File::getName).toList(); + + // Soda is referenced from paths — must be kept + assertThat(generatedFileNames).anyMatch(name -> name.equals("Soda.java")); + // SodaDetail is only referenced from components/pathItems — must also be kept (Gap 6 fix) + assertThat(generatedFileNames).anyMatch(name -> name.equals("SodaDetail.java")); + // UnusedSchema is not referenced from anywhere — must be removed + assertThat(generatedFileNames).noneMatch(name -> name.equals("UnusedSchema.java")); + } } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml new file mode 100644 index 000000000..13d038077 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml @@ -0,0 +1,49 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Gap 6 - components/pathItems schema references + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + # Gap 6: OAS 3.1 adds components/pathItems — schemas referenced here must not be removed + pathItems: + sodaItem: + get: + operationId: getSodaDetail + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/SodaDetail' + + schemas: + Soda: + type: object + properties: + name: + type: string + # Only referenced from components/pathItems, not from paths + SodaDetail: + type: object + properties: + description: + type: string + # Not referenced anywhere — should be removed by removeUnusedComponents + UnusedSchema: + type: object + properties: + garbage: + type: string From f14cdfa3551d84de2ea6195e2764db6be1e79e73 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 18:19:55 +0200 Subject: [PATCH 09/28] Remove all Gap x in the code --- .../generator/CustomJavaClientCodegen.java | 6 +++--- .../generator/CustomOpenAPINormalizer.java | 16 ++++++++-------- .../ValidationKeywordsPreprocessor.java | 6 +++--- .../generator/DataModelGeneratorUnitTest.java | 8 ++++---- .../ValidationKeywordsPreprocessorTest.java | 2 +- .../oas31-exclusive-min-max/input/sodastore.yaml | 2 +- .../oas31-nullable-ref/input/sodastore.yaml | 2 +- .../input/sodastore.yaml | 2 +- .../oas31-ref-with-sibling/input/sodastore.yaml | 2 +- .../oas31-components-path-items.yaml | 4 ++-- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java index cdfda7c6c..7f7622590 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java @@ -55,7 +55,7 @@ public void preprocessOpenAPI( @Nonnull final OpenAPI openAPI ) } } - // Gap 5: OAS 3.1 documents may have no paths (webhooks-only or components-only). + // OAS 3.1 documents may have no paths (webhooks-only or components-only). if( USE_EXCLUDE_PATHS.isEnabled(config) ) { final String[] exclusions = USE_EXCLUDE_PATHS.getValue(config).trim().split("[,\\s]+"); if( openAPI.getPaths() != null ) { @@ -201,7 +201,7 @@ private void preprocessRemoveRedundancies( @Nonnull final OpenAPI openAPI ) final var refs = new LinkedHashSet(); final var pattern = Pattern.compile("\\$ref: #/components/schemas/(\\w+)"); - // Gap 5: OAS 3.1 documents may have no paths (webhooks-only or components-only). + // OAS 3.1 documents may have no paths (webhooks-only or components-only). if( openAPI.getPaths() == null || openAPI.getPaths().isEmpty() ) { return; } @@ -217,7 +217,7 @@ private void preprocessRemoveRedundancies( @Nonnull final OpenAPI openAPI ) } } - // Gap 6: OAS 3.1 adds components/pathItems — traverse them for schema references too + // OAS 3.1 adds components/pathItems — traverse them for schema references too final var pathItems = openAPI.getComponents() != null ? openAPI.getComponents().getPathItems() : null; if( pathItems != null ) { for( final var pathItem : pathItems.values() ) { diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java index 91cb8c0f5..054beaeae 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java @@ -52,7 +52,7 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) LOGGER.warn("Type(s) cleared (set to null) given $ref is set to {}.", schema.get$ref()); } - // Gap 1: warn when deprecated nullable: true is used in an OAS 3.1 spec + // warn when deprecated nullable: true is used in an OAS 3.1 spec if( isOas31 && schema.getNullable() != null ) { LOGGER .warn( @@ -68,10 +68,10 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) || schema.getDeprecated() != null || schema.getMaximum() != null || schema.getMinimum() != null - // Gap 2: OAS 3.0 boolean exclusiveMaximum/exclusiveMinimum + // OAS 3.0 boolean exclusiveMaximum/exclusiveMinimum || schema.getExclusiveMaximum() != null || schema.getExclusiveMinimum() != null - // Gap 2: OAS 3.1 numeric exclusiveMaximumValue/exclusiveMinimumValue + // OAS 3.1 numeric exclusiveMaximumValue/exclusiveMinimumValue || schema.getExclusiveMaximumValue() != null || schema.getExclusiveMinimumValue() != null || schema.getMaxItems() != null @@ -84,7 +84,7 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) || schema.getReadOnly() != null || schema.getExample() != null || (schema.getExamples() != null && !schema.getExamples().isEmpty()) - // Gap 4: OAS 3.1 const keyword as $ref sibling + // OAS 3.1 const keyword as $ref sibling || schema.getConst() != null || schema.getMultipleOf() != null || schema.getPattern() != null @@ -112,8 +112,8 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) /** * Normalizes any schema (not just $ref schemas). Adds OAS 3.1 specific mappings: *

    - *
  • Gap 7: warn on deprecated singular {@code example} keyword in OAS 3.1 schemas
  • - *
  • Gap 8: map {@code contentEncoding}/{@code contentMediaType} to {@code format} for binary file uploads
  • + *
  • warn on deprecated singular {@code example} keyword in OAS 3.1 schemas
  • + *
  • map {@code contentEncoding}/{@code contentMediaType} to {@code format} for binary file uploads
  • *
*/ @Override @@ -121,7 +121,7 @@ protected void normalizeReferenceSchema( final @Nonnull Schema schema ) @SuppressWarnings( { "rawtypes" } ) public Schema normalizeSchema( final @Nonnull Schema schema, final @Nonnull Set visitedSchemas ) { - // Gap 7: warn on deprecated singular `example` in OAS 3.1 Schema Objects + // warn on deprecated singular `example` in OAS 3.1 Schema Objects if( isOas31 && schema.getExample() != null ) { LOGGER .warn( @@ -129,7 +129,7 @@ public Schema normalizeSchema( final @Nonnull Schema schema, final @Nonnull Set< + "Use 'examples: [...]' (array form) instead."); } - // Gap 8: map OAS 3.1 contentEncoding/contentMediaType to legacy format keyword + // map OAS 3.1 contentEncoding/contentMediaType to legacy format keyword // so that downstream type-mapping (File -> byte[]) continues to work. if( schema.getFormat() == null ) { if( "base64".equalsIgnoreCase(schema.getContentEncoding()) ) { diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java index 167ed9d54..9e04dc7e9 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java @@ -23,7 +23,7 @@ public PreprocessingStepResult execute( @Nonnull final JsonNode input, @Nonnull { final JsonNode pathsNode = input.path(PATHS_NODE); - // Gap 5: OAS 3.1 documents may omit `paths` and use only `webhooks` or `components`. + // OAS 3.1 documents may omit `paths` and use only `webhooks` or `components`. // Webhook client generation is not yet supported; emit a clear error so the user knows why. if( pathsNode.isMissingNode() ) { final JsonNode webhooksNode = input.path(WEBHOOKS_NODE); @@ -48,7 +48,7 @@ public PreprocessingStepResult execute( @Nonnull final JsonNode input, @Nonnull private void checkForValidatorsInPaths( final JsonNode pathsNode ) { for( final String field : POTENTIALLY_UNSUPPORTED_VALIDATION_KEYWORDS ) { - // Gap 10: allow the OAS 3.1 canonical null-union pattern: + // allow the OAS 3.1 canonical null-union pattern: // anyOf/oneOf: [{$ref: "..."}, {type: "null"}] // Only block occurrences that are NOT null-union patterns. final boolean isUnsupported = @@ -68,7 +68,7 @@ private void checkForValidatorsInSchemas( final JsonNode schemasNode ) for( final String field : POTENTIALLY_UNSUPPORTED_VALIDATION_KEYWORDS ) { for( final JsonNode schema : schemasNode ) { for( final JsonNode schemaChild : schema ) { - // Gap 10: allow the OAS 3.1 canonical null-union pattern. + // allow the OAS 3.1 canonical null-union pattern. final boolean isUnsupported = schemaChild.findValues(field).stream().anyMatch(node -> !isNullUnionPattern(node)); if( isUnsupported ) { diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java index b8482bda2..8b4af673b 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java @@ -391,12 +391,12 @@ void testConfigOptionsArePassedToGenerator() } /** - * Gap 6: OAS 3.1 adds {@code components/pathItems}. When {@code removeUnusedComponents} is enabled, schemas - * referenced only from {@code components/pathItems} (not from {@code paths}) must not be deleted. + * OAS 3.1 adds {@code components/pathItems}. When {@code removeUnusedComponents} is enabled, schemas referenced + * only from {@code components/pathItems} (not from {@code paths}) must not be deleted. */ @Test @SneakyThrows - void testGap6RemoveUnusedComponentsKeepsSchemasReferencedFromComponentsPathItems() + void testRemoveUnusedComponentsKeepsSchemasReferencedFromComponentsPathItems() { final GenerationConfiguration configuration = GenerationConfiguration @@ -419,7 +419,7 @@ void testGap6RemoveUnusedComponentsKeepsSchemasReferencedFromComponentsPathItems // Soda is referenced from paths — must be kept assertThat(generatedFileNames).anyMatch(name -> name.equals("Soda.java")); - // SodaDetail is only referenced from components/pathItems — must also be kept (Gap 6 fix) + // SodaDetail is only referenced from components/pathItems — must also be kept assertThat(generatedFileNames).anyMatch(name -> name.equals("SodaDetail.java")); // UnusedSchema is not referenced from anywhere — must be removed assertThat(generatedFileNames).noneMatch(name -> name.equals("UnusedSchema.java")); diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java index 1d9fe1490..3f5266d05 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessorTest.java @@ -122,7 +122,7 @@ void testSodastoreApiWithAllOf() void testOas31NullUnionAnyOfInPaths_isAllowed() throws IOException { - // Gap 10: anyOf: [{$ref: "..."}, {type: "null"}] in a path request body is the OAS 3.1 + // anyOf: [{$ref: "..."}, {type: "null"}] in a path request body is the OAS 3.1 // canonical nullable-$ref pattern and must be allowed even when oneOf/anyOf generation // is otherwise disabled. final Path inputFilePath = diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml index f3ac45b51..913834b7c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml @@ -23,7 +23,7 @@ components: name: type: string rating: - # Gap 2: numeric exclusiveMinimum/exclusiveMaximum as direct values + # numeric exclusiveMinimum/exclusiveMaximum as direct values type: number exclusiveMinimum: 0 exclusiveMaximum: 5 diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml index 8f1f557c6..19686b15e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/input/sodastore.yaml @@ -29,7 +29,7 @@ components: name: type: string category: - # Gap 10: nullable $ref using anyOf with null type + # nullable $ref using anyOf with null type anyOf: - $ref: '#/components/schemas/SodaCategory' - type: "null" diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml index 389a32145..c31da5b70 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml @@ -23,7 +23,7 @@ components: name: type: string brand: - # Gap 1: nullable via type array instead of nullable: true + # nullable via type array instead of nullable: true type: - string - "null" diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml index c163b577b..4ee2eebbd 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml @@ -26,7 +26,7 @@ components: name: type: string description: - # Gap 4: $ref with a sibling property — valid in OAS 3.1 + # $ref with a sibling property — valid in OAS 3.1 $ref: '#/components/schemas/SodaDescription' description: Human-readable description override required: diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml index 13d038077..0ea8f9807 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml @@ -1,6 +1,6 @@ openapi: 3.1.0 info: - title: OAS 3.1 Gap 6 - components/pathItems schema references + title: OAS 3.1 components/pathItems schema references version: 1.0.0 paths: @@ -16,7 +16,7 @@ paths: $ref: '#/components/schemas/Soda' components: - # Gap 6: OAS 3.1 adds components/pathItems — schemas referenced here must not be removed + # OAS 3.1 adds components/pathItems — schemas referenced here must not be removed pathItems: sodaItem: get: From 0af7b8d820862c23944b6637b3b68372d5712d51 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 18:40:08 +0200 Subject: [PATCH 10/28] Add unit tests for normalizer and fix map logic for oas 3.0 --- .../generator/CustomOpenAPINormalizer.java | 2 +- .../CustomOpenAPINormalizerTest.java | 125 ++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizerTest.java diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java index 054beaeae..b4dd6a3a8 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java @@ -131,7 +131,7 @@ public Schema normalizeSchema( final @Nonnull Schema schema, final @Nonnull Set< // map OAS 3.1 contentEncoding/contentMediaType to legacy format keyword // so that downstream type-mapping (File -> byte[]) continues to work. - if( schema.getFormat() == null ) { + if( isOas31 && schema.getFormat() == null ) { if( "base64".equalsIgnoreCase(schema.getContentEncoding()) ) { schema.setFormat("byte"); } else if( schema.getContentEncoding() != null ) { diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizerTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizerTest.java new file mode 100644 index 000000000..192a9fd4b --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizerTest.java @@ -0,0 +1,125 @@ +package com.sap.cloud.sdk.datamodel.openapi.generator; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.HashSet; +import java.util.Map; + +import org.junit.jupiter.api.Test; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.Schema; + +class CustomOpenAPINormalizerTest +{ + private static OpenAPI oas30() + { + final OpenAPI openAPI = new OpenAPI(); + openAPI.setOpenapi("3.0.3"); + return openAPI; + } + + private static OpenAPI oas31() + { + final OpenAPI openAPI = new OpenAPI(); + openAPI.setOpenapi("3.1.0"); + return openAPI; + } + + private static CustomOpenAPINormalizer normalizer( final OpenAPI openAPI ) + { + return new CustomOpenAPINormalizer(openAPI, Map.of()); + } + + // --- contentEncoding / contentMediaType → format mapping --- + + @Test + void base64ContentEncodingMapsToByteFormat() + { + final Schema schema = new Schema<>(); + schema.setContentEncoding("base64"); + + normalizer(oas31()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isEqualTo("byte"); + } + + @Test + void base64ContentEncodingCaseInsensitive() + { + final Schema schema = new Schema<>(); + schema.setContentEncoding("BASE64"); + + normalizer(oas31()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isEqualTo("byte"); + } + + @Test + void binaryContentEncodingMapsToBinaryFormat() + { + final Schema schema = new Schema<>(); + schema.setContentEncoding("binary"); + + normalizer(oas31()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isEqualTo("binary"); + } + + @Test + void contentMediaTypeWithoutEncodingMapsToBinaryFormat() + { + final Schema schema = new Schema<>(); + schema.setContentMediaType("application/octet-stream"); + + normalizer(oas31()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isEqualTo("binary"); + } + + @Test + void existingFormatIsNotOverwritten() + { + final Schema schema = new Schema<>(); + schema.setFormat("uuid"); + schema.setContentEncoding("base64"); + + normalizer(oas31()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isEqualTo("uuid"); + } + + @Test + void noContentEncodingOrMediaTypeLeaveFormatNull() + { + final Schema schema = new Schema<>(); + + normalizer(oas31()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isNull(); + } + + // --- OAS 3.0: no format mapping applied --- + + @Test + void contentEncodingDoesNotMapFormatInOas30() + { + final Schema schema = new Schema<>(); + schema.setContentEncoding("base64"); + + normalizer(oas30()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isNull(); + } + + @Test + void contentMediaTypeDoesNotMapFormatInOas30() + { + final Schema schema = new Schema<>(); + schema.setContentMediaType("application/octet-stream"); + + normalizer(oas30()).normalizeSchema(schema, new HashSet<>()); + + assertThat(schema.getFormat()).isNull(); + } +} From 88e1d347135ee8183b490f68f6fdeeae1faa3456 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Wed, 22 Jul 2026 22:55:48 +0200 Subject: [PATCH 11/28] Add all integration test for apache --- .../input/sodastore.yaml | 38 ++ .../datamodel/rest/test/api/DefaultApi.java | 118 ++++++ .../sdk/datamodel/rest/test/model/Soda.java | 256 +++++++++++++ .../input/sodastore.yaml | 47 +++ .../datamodel/rest/test/api/DefaultApi.java | 118 ++++++ .../sdk/datamodel/rest/test/model/Soda.java | 335 ++++++++++++++++++ .../oas31-nullable-ref/input/sodastore.yaml | 37 ++ .../datamodel/rest/test/api/DefaultApi.java | 118 ++++++ .../sdk/datamodel/rest/test/model/Soda.java | 209 +++++++++++ .../rest/test/model/SodaCategory.java | 173 +++++++++ .../input/sodastore.yaml | 31 ++ .../datamodel/rest/test/api/DefaultApi.java | 118 ++++++ .../sdk/datamodel/rest/test/model/Soda.java | 208 +++++++++++ .../input/sodastore.yaml | 33 ++ .../datamodel/rest/test/api/DefaultApi.java | 118 ++++++ .../sdk/datamodel/rest/test/model/Soda.java | 208 +++++++++++ 16 files changed, 2165 insertions(+) create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml new file mode 100644 index 000000000..9ad45cbb3 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml @@ -0,0 +1,38 @@ +openapi: 3.0.3 +info: + title: OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + Soda: + type: object + properties: + name: + type: string + rating: + # OAS 3.0: boolean exclusiveMinimum/exclusiveMaximum as flags alongside minimum/maximum + type: number + minimum: 0 + exclusiveMinimum: true + maximum: 5 + exclusiveMaximum: true + score: + # OAS 3.0: non-exclusive minimum/maximum (no boolean flags) + type: number + minimum: 0 + maximum: 100 + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..bbd12b54a --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; + + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.StringJoiner; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + + +/** + * OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum in version 1.0.0. + *

+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends BaseApi { + + /** + * Instantiates this API class to invoke operations on the OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + public DefaultApi(@Nonnull final ApiClient apiClient) { + super(apiClient); + } + + /** + * Creates a new API instance with additional default headers. + * + * @param defaultHeaders Additional headers to include in all requests + * @return A new API instance with the combined headers + */ + public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { + final var api = new DefaultApi(apiClient); + api.defaultHeaders.putAll(this.defaultHeaders); + api.defaultHeaders.putAll(defaultHeaders); + return api; + } + + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + + // create path and map variables + final String localVarPath = "/sodas"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + + }; + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType + ); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..2838b9548 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("rating") + private BigDecimal rating; + + @JsonProperty("score") + private BigDecimal score; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the rating of this {@link Soda} instance and return the same instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda rating( @Nullable final BigDecimal rating) { + this.rating = rating; + return this; + } + + /** + * Get rating + * minimum: 0 (exclusive) + * maximum: 5 (exclusive) + * @return rating The rating of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getRating() { + return rating; + } + + /** + * Set the rating of this {@link Soda} instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + */ + public void setRating( @Nullable final BigDecimal rating) { + this.rating = rating; + } + + /** + * Set the score of this {@link Soda} instance and return the same instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda score( @Nullable final BigDecimal score) { + this.score = score; + return this; + } + + /** + * Get score + * minimum: 0 + * maximum: 100 + * @return score The score of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getScore() { + return score; + } + + /** + * Set the score of this {@link Soda} instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + */ + public void setScore( @Nullable final BigDecimal score) { + this.score = score; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( rating != null ) declaredFields.put("rating", rating); + if( score != null ) declaredFields.put("score", score); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.rating, soda.rating) && + Objects.equals(this.score, soda.score); + } + + @Override + public int hashCode() { + return Objects.hash(name, rating, score, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rating: ").append(toIndentedString(rating)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml new file mode 100644 index 000000000..913834b7c --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml @@ -0,0 +1,47 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + Soda: + type: object + properties: + name: + type: string + rating: + # numeric exclusiveMinimum/exclusiveMaximum as direct values + type: number + exclusiveMinimum: 0 + exclusiveMaximum: 5 + score: + # OAS 3.1: non-exclusive minimum/maximum (plain numeric values) + type: number + minimum: 0 + maximum: 100 + temperature: + # OAS 3.1: mixed — inclusive minimum alongside exclusive maximum + type: number + minimum: 0 + exclusiveMaximum: 100 + combo: + # OAS 3.1: both minimum (inclusive) and exclusiveMinimum (exclusive numeric) present; + # exclusiveMinimum: 3 is stricter than minimum: 2, so effective constraint is > 3 + type: number + minimum: 2 + exclusiveMinimum: 3 + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..a9aa17c3f --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; + + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.StringJoiner; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + + +/** + * OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum in version 1.0.0. + *

+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends BaseApi { + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + public DefaultApi(@Nonnull final ApiClient apiClient) { + super(apiClient); + } + + /** + * Creates a new API instance with additional default headers. + * + * @param defaultHeaders Additional headers to include in all requests + * @return A new API instance with the combined headers + */ + public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { + final var api = new DefaultApi(apiClient); + api.defaultHeaders.putAll(this.defaultHeaders); + api.defaultHeaders.putAll(defaultHeaders); + return api; + } + + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + + // create path and map variables + final String localVarPath = "/sodas"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + + }; + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType + ); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..e071d03ae --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,335 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("rating") + private BigDecimal rating; + + @JsonProperty("score") + private BigDecimal score; + + @JsonProperty("temperature") + private BigDecimal temperature; + + @JsonProperty("combo") + private BigDecimal combo; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the rating of this {@link Soda} instance and return the same instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda rating( @Nullable final BigDecimal rating) { + this.rating = rating; + return this; + } + + /** + * Get rating + * minimum: 0 (exclusive) + * maximum: 5 (exclusive) + * @return rating The rating of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getRating() { + return rating; + } + + /** + * Set the rating of this {@link Soda} instance. + * + * @param rating The rating of this {@link Soda} + * Minimum: 0 (exclusive) + * Maximum: 5 (exclusive) + */ + public void setRating( @Nullable final BigDecimal rating) { + this.rating = rating; + } + + /** + * Set the score of this {@link Soda} instance and return the same instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda score( @Nullable final BigDecimal score) { + this.score = score; + return this; + } + + /** + * Get score + * minimum: 0 + * maximum: 100 + * @return score The score of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getScore() { + return score; + } + + /** + * Set the score of this {@link Soda} instance. + * + * @param score The score of this {@link Soda} + * Minimum: 0 + * Maximum: 100 + */ + public void setScore( @Nullable final BigDecimal score) { + this.score = score; + } + + /** + * Set the temperature of this {@link Soda} instance and return the same instance. + * + * @param temperature The temperature of this {@link Soda} + * Minimum: 0 + * Maximum: 100 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda temperature( @Nullable final BigDecimal temperature) { + this.temperature = temperature; + return this; + } + + /** + * Get temperature + * minimum: 0 + * maximum: 100 (exclusive) + * @return temperature The temperature of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getTemperature() { + return temperature; + } + + /** + * Set the temperature of this {@link Soda} instance. + * + * @param temperature The temperature of this {@link Soda} + * Minimum: 0 + * Maximum: 100 (exclusive) + */ + public void setTemperature( @Nullable final BigDecimal temperature) { + this.temperature = temperature; + } + + /** + * Set the combo of this {@link Soda} instance and return the same instance. + * + * @param combo The combo of this {@link Soda} + * Minimum: 3 (exclusive) + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda combo( @Nullable final BigDecimal combo) { + this.combo = combo; + return this; + } + + /** + * Get combo + * minimum: 3 (exclusive) + * @return combo The combo of this {@link Soda} instance. + */ + @Nonnull + public BigDecimal getCombo() { + return combo; + } + + /** + * Set the combo of this {@link Soda} instance. + * + * @param combo The combo of this {@link Soda} + * Minimum: 3 (exclusive) + */ + public void setCombo( @Nullable final BigDecimal combo) { + this.combo = combo; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( rating != null ) declaredFields.put("rating", rating); + if( score != null ) declaredFields.put("score", score); + if( temperature != null ) declaredFields.put("temperature", temperature); + if( combo != null ) declaredFields.put("combo", combo); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.rating, soda.rating) && + Objects.equals(this.score, soda.score) && + Objects.equals(this.temperature, soda.temperature) && + Objects.equals(this.combo, soda.combo); + } + + @Override + public int hashCode() { + return Objects.hash(name, rating, score, temperature, combo, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rating: ").append(toIndentedString(rating)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); + sb.append(" combo: ").append(toIndentedString(combo)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml new file mode 100644 index 000000000..19686b15e --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml @@ -0,0 +1,37 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Nullable $ref via anyOf + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + SodaCategory: + type: object + properties: + name: + type: string + + Soda: + type: object + properties: + name: + type: string + category: + # nullable $ref using anyOf with null type + anyOf: + - $ref: '#/components/schemas/SodaCategory' + - type: "null" + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..030db3644 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; + + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.StringJoiner; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + + +/** + * OAS 3.1 Nullable $ref via anyOf in version 1.0.0. + *

+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends BaseApi { + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable $ref via anyOf. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable $ref via anyOf based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + public DefaultApi(@Nonnull final ApiClient apiClient) { + super(apiClient); + } + + /** + * Creates a new API instance with additional default headers. + * + * @param defaultHeaders Additional headers to include in all requests + * @return A new API instance with the combined headers + */ + public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { + final var api = new DefaultApi(apiClient); + api.defaultHeaders.putAll(this.defaultHeaders); + api.defaultHeaders.putAll(defaultHeaders); + return api; + } + + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + + // create path and map variables + final String localVarPath = "/sodas"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + + }; + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType + ); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..7468af81f --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Nullable $ref via anyOf + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.sap.cloud.sdk.datamodel.rest.test.model.SodaCategory; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("category") + private SodaCategory category; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the category of this {@link Soda} instance and return the same instance. + * + * @param category The category of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda category( @Nullable final SodaCategory category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category The category of this {@link Soda} instance. + */ + @Nullable + public SodaCategory getCategory() { + return category; + } + + /** + * Set the category of this {@link Soda} instance. + * + * @param category The category of this {@link Soda} + */ + public void setCategory( @Nullable final SodaCategory category) { + this.category = category; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( category != null ) declaredFields.put("category", category); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.category, soda.category); + } + + @Override + public int hashCode() { + return Objects.hash(name, category, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java new file mode 100644 index 000000000..90e9cc595 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Nullable $ref via anyOf + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * SodaCategory + */ +// CHECKSTYLE:OFF +public class SodaCategory +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link SodaCategory} instance and return the same instance. + * + * @param name The name of this {@link SodaCategory} + * @return The same instance of this {@link SodaCategory} class + */ + @Nonnull public SodaCategory name( @Nullable final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link SodaCategory} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link SodaCategory} instance. + * + * @param name The name of this {@link SodaCategory} + */ + public void setName( @Nullable final String name) { + this.name = name; + } + + /** + * Get the names of the unrecognizable properties of the {@link SodaCategory}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link SodaCategory} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("SodaCategory has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link SodaCategory} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link SodaCategory} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final SodaCategory sodaCategory = (SodaCategory) o; + return Objects.equals(this.cloudSdkCustomFields, sodaCategory.cloudSdkCustomFields) && + Objects.equals(this.name, sodaCategory.name); + } + + @Override + public int hashCode() { + return Objects.hash(name, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class SodaCategory {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml new file mode 100644 index 000000000..c31da5b70 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml @@ -0,0 +1,31 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 Nullable Type Array + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + Soda: + type: object + properties: + name: + type: string + brand: + # nullable via type array instead of nullable: true + type: + - string + - "null" + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..7c74b39ef --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; + + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.StringJoiner; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + + +/** + * OAS 3.1 Nullable Type Array in version 1.0.0. + *

+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends BaseApi { + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable Type Array. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 Nullable Type Array based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + public DefaultApi(@Nonnull final ApiClient apiClient) { + super(apiClient); + } + + /** + * Creates a new API instance with additional default headers. + * + * @param defaultHeaders Additional headers to include in all requests + * @return A new API instance with the combined headers + */ + public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { + final var api = new DefaultApi(apiClient); + api.defaultHeaders.putAll(this.defaultHeaders); + api.defaultHeaders.putAll(defaultHeaders); + return api; + } + + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + + // create path and map variables + final String localVarPath = "/sodas"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + + }; + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType + ); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..5b3605010 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 Nullable Type Array + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("brand") + private String brand; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the brand of this {@link Soda} instance and return the same instance. + * + * @param brand The brand of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda brand( @Nullable final String brand) { + this.brand = brand; + return this; + } + + /** + * Get brand + * @return brand The brand of this {@link Soda} instance. + */ + @Nullable + public String getBrand() { + return brand; + } + + /** + * Set the brand of this {@link Soda} instance. + * + * @param brand The brand of this {@link Soda} + */ + public void setBrand( @Nullable final String brand) { + this.brand = brand; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( brand != null ) declaredFields.put("brand", brand); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.brand, soda.brand); + } + + @Override + public int hashCode() { + return Objects.hash(name, brand, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" brand: ").append(toIndentedString(brand)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml new file mode 100644 index 000000000..4ee2eebbd --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml @@ -0,0 +1,33 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 $ref with Sibling Properties + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + schemas: + SodaDescription: + type: string + + Soda: + type: object + properties: + name: + type: string + description: + # $ref with a sibling property — valid in OAS 3.1 + $ref: '#/components/schemas/SodaDescription' + description: Human-readable description override + required: + - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..fdf9fb865 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; + + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.StringJoiner; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + + +/** + * OAS 3.1 $ref with Sibling Properties in version 1.0.0. + *

+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends BaseApi { + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 $ref with Sibling Properties. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 $ref with Sibling Properties based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + public DefaultApi(@Nonnull final ApiClient apiClient) { + super(apiClient); + } + + /** + * Creates a new API instance with additional default headers. + * + * @param defaultHeaders Additional headers to include in all requests + * @return A new API instance with the combined headers + */ + public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { + final var api = new DefaultApi(apiClient); + api.defaultHeaders.putAll(this.defaultHeaders); + api.defaultHeaders.putAll(defaultHeaders); + return api; + } + + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + + // create path and map variables + final String localVarPath = "/sodas"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + + }; + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType + ); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..d88df9c21 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 $ref with Sibling Properties + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nonnull final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nonnull + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nonnull final String name) { + this.name = name; + } + + /** + * Set the description of this {@link Soda} instance and return the same instance. + * + * @param description The description of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda description( @Nullable final String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description The description of this {@link Soda} instance. + */ + @Nonnull + public String getDescription() { + return description; + } + + /** + * Set the description of this {@link Soda} instance. + * + * @param description The description of this {@link Soda} + */ + public void setDescription( @Nullable final String description) { + this.description = description; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + if( description != null ) declaredFields.put("description", description); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name) && + Objects.equals(this.description, soda.description); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + From 97d5048ae62d1740967c3b1c4a9ec9c7afa6f3c1 Mon Sep 17 00:00:00 2001 From: I538344 Date: Thu, 23 Jul 2026 11:02:35 +0200 Subject: [PATCH 12/28] Remove warnings CustomJavaClientCodegen --- .../datamodel/openapi/generator/CustomJavaClientCodegen.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java index 7f7622590..1e3ed0a72 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java @@ -148,7 +148,7 @@ protected void updateModelForComposedSchema( * @param propertyName * The name of the property to remove. */ - @SuppressWarnings( { "rawtypes", "unchecked", "ReplaceInefficientStreamCount" } ) + @SuppressWarnings( { "rawtypes", "unchecked" } ) private void preprocessRemoveProperty( @Nonnull final OpenAPI openAPI, @Nonnull final String schemaName, @@ -162,7 +162,7 @@ private void preprocessRemoveProperty( boolean removed = false; final Predicate remove = - s -> s != null && s.getProperties() != null && s.getProperties().remove(propertyName) != null; + s -> s.getProperties() != null && s.getProperties().remove(propertyName) != null; final var schemasQueued = new LinkedList(); final var schemasDone = new HashSet(); schemasQueued.add(schema); From 776c994c945ef983aa121edd8200cea1bf7075fe Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 23 Jul 2026 11:43:26 +0200 Subject: [PATCH 13/28] fix: nullable getter for non-required field --- .../mustache-templates/pojo.mustache | 2 +- .../cloud/sdk/services/builder/model/NewSoda.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 12 ++++++------ .../apiclassvendorextension/model/NewSoda.java | 4 ++-- .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 12 ++++++------ .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 8 ++++---- .../sdk/services/inlineobject/model/NotFound.java | 2 +- .../model/ServiceUnavailableApplicationJson.java | 2 +- .../model/ServiceUnavailableApplicationXml.java | 2 +- .../cloud/sdk/services/inlineobject/model/Soda.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 4 ++-- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 8 ++++---- .../sdk/datamodel/rest/test/model/SodaCategory.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 2 +- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../sdk/services/builder/model/SodaWithFoo.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 10 +++++----- .../sap/cloud/sdk/services/builder/model/Order.java | 2 +- .../services/builder/model/OrderWithTimestamp.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 2 +- .../cloud/sdk/services/builder/model/SodaWithId.java | 4 ++-- 24 files changed, 52 insertions(+), 52 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache b/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache index 167cfbecb..cd374c9fa 100644 --- a/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache +++ b/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache @@ -207,7 +207,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Nullable {{/isNullable}} {{^isNullable}} - @Nonnull + {{#required}}@Nonnull{{/required}}{{^required}}@Nullable{{/required}} {{/isNullable}} {{#jsonb}} @JsonbProperty("{{baseName}}") diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java index 20ce285d8..9ca1d90b0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java index b0cab12da..9b0c56956 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -147,7 +147,7 @@ public enum DietEnum { * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } @@ -234,7 +234,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nonnull + @Nullable public Boolean isAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 85f725e6a..ee31eee5c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java index 6bbd8468d..3741a0299 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index b0159f9aa..3a972cbd9 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index 65139c68c..71fed98e8 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index b0159f9aa..3a972cbd9 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index 84b275fbb..af5a3bb90 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -72,7 +72,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -101,7 +101,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -130,7 +130,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -159,7 +159,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java index d0893c9d6..e0f7e8920 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java @@ -63,7 +63,7 @@ public class NotFound * Get message * @return message The message of this {@link NotFound} instance. */ - @Nonnull + @Nullable public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java index 2945b681e..ebef35a00 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationJson * Get message * @return message The message of this {@link ServiceUnavailableApplicationJson} instance. */ - @Nonnull + @Nullable public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java index 7afdf67a4..668d65cef 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationXml * Get message * @return message The message of this {@link ServiceUnavailableApplicationXml} instance. */ - @Nonnull + @Nullable public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java index 542eb09b3..b02b6d497 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 2838b9548..f264eee8a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -103,7 +103,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getRating() { return rating; } @@ -138,7 +138,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getScore() { return score; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index e071d03ae..4b6196d63 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -109,7 +109,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getRating() { return rating; } @@ -144,7 +144,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getScore() { return score; } @@ -179,7 +179,7 @@ public void setScore( @Nullable final BigDecimal score) { * maximum: 100 (exclusive) * @return temperature The temperature of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getTemperature() { return temperature; } @@ -212,7 +212,7 @@ public void setTemperature( @Nullable final BigDecimal temperature) { * minimum: 3 (exclusive) * @return combo The combo of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getCombo() { return combo; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java index 90e9cc595..632cf7a9d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java @@ -63,7 +63,7 @@ public class SodaCategory * Get name * @return name The name of this {@link SodaCategory} instance. */ - @Nonnull + @Nullable public String getName() { return name; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index d88df9c21..b5e2405a0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -95,7 +95,7 @@ public void setName( @Nonnull final String name) { * Get description * @return description The description of this {@link Soda} instance. */ - @Nonnull + @Nullable public String getDescription() { return description; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 45a204a0f..8e84b6fe2 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nonnull + @Nullable public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java index edccab010..22a7aeff5 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java @@ -75,7 +75,7 @@ public class SodaWithFoo * Get id * @return id The id of this {@link SodaWithFoo} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link SodaWithFoo} instance. */ - @Nonnull + @Nullable public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 40d04555d..564bcc1d7 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -76,7 +76,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -105,7 +105,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -134,7 +134,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } @@ -163,7 +163,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -192,7 +192,7 @@ public void setBrand( @Nullable final String brand) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java index 30c807a7b..44788e1d0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java @@ -133,7 +133,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link Order} instance. */ - @Nonnull + @Nullable public Float getTotalPrice() { return totalPrice; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java index b81a924cb..0ebaa8792 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java @@ -137,7 +137,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link OrderWithTimestamp} instance. */ - @Nonnull + @Nullable public Float getTotalPrice() { return totalPrice; } @@ -224,7 +224,7 @@ public void setNullableProperty( @Nullable final String nullableProperty) { * Get timestamp * @return timestamp The timestamp of this {@link OrderWithTimestamp} instance. */ - @Nonnull + @Nullable public OffsetDateTime getTimestamp() { return timestamp; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 862a33733..fecd099ea 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -221,7 +221,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link Soda} instance. */ - @Nonnull + @Nullable public PackagingEnum getPackaging() { return packaging; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java index 70553d4ca..e04f94e4c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java @@ -224,7 +224,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link SodaWithId} instance. */ - @Nonnull + @Nullable public PackagingEnum getPackaging() { return packaging; } @@ -282,7 +282,7 @@ public void setPrice( @Nonnull final Float price) { * Get id * @return id The id of this {@link SodaWithId} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } From 208a5882c74e6407498c1844f1faf178fe0ee69a Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 23 Jul 2026 12:18:54 +0200 Subject: [PATCH 14/28] Fix the sibling description --- .../generator/CustomJavaClientCodegen.java | 54 +++++++++++++++++++ .../input/sodastore.yaml | 3 +- .../sdk/datamodel/rest/test/model/Soda.java | 6 +-- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java index 7f7622590..6257710fd 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java @@ -24,6 +24,7 @@ import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.languages.JavaClientCodegen; import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.model.OperationsMap; import com.sap.cloud.sdk.datamodel.openapi.generator.model.GenerationConfiguration; @@ -38,6 +39,8 @@ class CustomJavaClientCodegen extends JavaClientCodegen { private final GenerationConfiguration config; private static final Predicate DOUBLE_IS_PATTERN = Pattern.compile("^isIs[A-Z]").asPredicate(); + // schemaName -> (propertyName -> sibling description) captured before normalization strips $ref context + private final Map> siblingDescriptions = new java.util.HashMap<>(); public CustomJavaClientCodegen( @Nonnull final GenerationConfiguration config ) { @@ -47,6 +50,9 @@ public CustomJavaClientCodegen( @Nonnull final GenerationConfiguration config ) @Override public void preprocessOpenAPI( @Nonnull final OpenAPI openAPI ) { + // Capture sibling descriptions on $ref property schemas before normalization resolves them away. + captureSiblingDescriptions(openAPI); + if( USE_EXCLUDE_PROPERTIES.isEnabled(config) ) { final String[] exclusions = USE_EXCLUDE_PROPERTIES.getValue(config).trim().split("[,\\s]+"); for( final String exclusion : exclusions ) { @@ -138,6 +144,54 @@ protected void updateModelForComposedSchema( } } + @SuppressWarnings( { "rawtypes", "RedundantSuppression" } ) + @Override + @Nonnull + public Map postProcessAllModels( @Nonnull final Map objs ) + { + final Map result = super.postProcessAllModels(objs); + + // Restore sibling descriptions lost during $ref resolution for primitive-typed properties. + for( final var schemaEntry : siblingDescriptions.entrySet() ) { + final ModelsMap modelsMap = result.get(schemaEntry.getKey()); + if( modelsMap == null ) { + continue; + } + for( final ModelMap modelMap : modelsMap.getModels() ) { + for( final CodegenProperty prop : modelMap.getModel().vars ) { + final String siblingDesc = schemaEntry.getValue().get(prop.baseName); + if( siblingDesc != null ) { + prop.description = escapeText(siblingDesc); + prop.unescapedDescription = siblingDesc; + } + } + } + } + return result; + } + + @SuppressWarnings( { "rawtypes", "unchecked" } ) + private void captureSiblingDescriptions( @Nonnull final OpenAPI openAPI ) + { + if( openAPI.getComponents() == null || openAPI.getComponents().getSchemas() == null ) { + return; + } + for( final var schemaEntry : openAPI.getComponents().getSchemas().entrySet() ) { + final Schema modelSchema = schemaEntry.getValue(); + if( modelSchema.getProperties() == null ) { + continue; + } + for( final var propEntry : ((Map) modelSchema.getProperties()).entrySet() ) { + final Schema propSchema = propEntry.getValue(); + if( propSchema.get$ref() != null && propSchema.getDescription() != null ) { + siblingDescriptions + .computeIfAbsent(schemaEntry.getKey(), k -> new java.util.HashMap<>()) + .put(propEntry.getKey(), propSchema.getDescription()); + } + } + } + } + /** * Remove property from specification. * diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml index 4ee2eebbd..081c00662 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml @@ -19,6 +19,7 @@ components: schemas: SodaDescription: type: string + description: Soda description Soda: type: object @@ -28,6 +29,6 @@ components: description: # $ref with a sibling property — valid in OAS 3.1 $ref: '#/components/schemas/SodaDescription' - description: Human-readable description override + description: Soda description as part of the Soda object required: - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index b5e2405a0..439c9072a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -83,7 +83,7 @@ public void setName( @Nonnull final String name) { /** * Set the description of this {@link Soda} instance and return the same instance. * - * @param description The description of this {@link Soda} + * @param description Soda description as part of the Soda object * @return The same instance of this {@link Soda} class */ @Nonnull public Soda description( @Nullable final String description) { @@ -92,7 +92,7 @@ public void setName( @Nonnull final String name) { } /** - * Get description + * Soda description as part of the Soda object * @return description The description of this {@link Soda} instance. */ @Nullable @@ -103,7 +103,7 @@ public String getDescription() { /** * Set the description of this {@link Soda} instance. * - * @param description The description of this {@link Soda} + * @param description Soda description as part of the Soda object */ public void setDescription( @Nullable final String description) { this.description = description; From 39f1a95dbc4876287d3a6f6e03a8719c2a48e398 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 23 Jul 2026 12:27:51 +0200 Subject: [PATCH 15/28] Fix tests --- .../cloud/sdk/services/builder/model/NewSoda.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 12 ++++++------ .../apiclassvendorextension/model/NewSoda.java | 4 ++-- .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 12 ++++++------ .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 8 ++++---- .../generate-apis/output/test/AllOf.java | 2 +- .../generate-apis/output/test/AnyOf.java | 2 +- .../generate-apis/output/test/Cola.java | 2 +- .../generate-apis/output/test/Fanta.java | 2 +- .../generate-apis/output/test/OneOf.java | 2 +- .../output/test/OneOfWithDiscriminator.java | 2 +- .../test/OneOfWithDiscriminatorAndMapping.java | 2 +- .../sdk/services/inlineobject/model/NotFound.java | 2 +- .../model/ServiceUnavailableApplicationJson.java | 2 +- .../model/ServiceUnavailableApplicationXml.java | 2 +- .../cloud/sdk/services/inlineobject/model/Soda.java | 2 +- .../sap/cloud/sdk/services/builder/model/Soda.java | 2 +- .../cloud/sdk/services/builder/model/UpdateSoda.java | 8 ++++---- .../services/uppercasefileextension/model/Soda.java | 2 +- .../uppercasefileextension/model/UpdateSoda.java | 8 ++++---- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 4 ++-- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 8 ++++---- .../sdk/datamodel/rest/test/model/SodaCategory.java | 2 +- .../oas31-ref-with-sibling/input/sodastore.yaml | 3 ++- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 8 ++++---- .../oneof-interfaces-disabled/output/test/AllOf.java | 2 +- .../oneof-interfaces-disabled/output/test/AnyOf.java | 2 +- .../oneof-interfaces-disabled/output/test/Cola.java | 2 +- .../oneof-interfaces-disabled/output/test/Fanta.java | 2 +- .../oneof-interfaces-disabled/output/test/OneOf.java | 2 +- .../output/test/OneOfWithDiscriminator.java | 2 +- .../test/OneOfWithDiscriminatorAndMapping.java | 2 +- .../oneof-interfaces-enabled/output/test/AllOf.java | 6 +++--- .../oneof-interfaces-enabled/output/test/AnyOf.java | 6 +++--- .../oneof-interfaces-enabled/output/test/Cola.java | 4 ++-- .../oneof-interfaces-enabled/output/test/Fanta.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../sdk/services/builder/model/SodaWithFoo.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 10 +++++----- .../sap/cloud/sdk/services/builder/model/Order.java | 2 +- .../services/builder/model/OrderWithTimestamp.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 2 +- .../cloud/sdk/services/builder/model/SodaWithId.java | 4 ++-- 46 files changed, 90 insertions(+), 89 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java index 20ce285d8..9ca1d90b0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java index b0cab12da..9b0c56956 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -147,7 +147,7 @@ public enum DietEnum { * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } @@ -234,7 +234,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nonnull + @Nullable public Boolean isAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 85f725e6a..ee31eee5c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java index 6bbd8468d..3741a0299 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index b0159f9aa..3a972cbd9 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index 65139c68c..71fed98e8 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index b0159f9aa..3a972cbd9 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index 84b275fbb..af5a3bb90 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -72,7 +72,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -101,7 +101,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -130,7 +130,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -159,7 +159,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java index 9dfaf3ea3..acb1c546e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java @@ -63,7 +63,7 @@ public class AllOf * Get sodaType * @return sodaType The sodaType of this {@link AllOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java index 59f1e77c0..caa2a6634 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java @@ -65,7 +65,7 @@ public class AnyOf * Get sodaType * @return sodaType The sodaType of this {@link AnyOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java index 523e3146a..9bb0649a9 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java @@ -63,7 +63,7 @@ public class Cola * Get sodaType * @return sodaType The sodaType of this {@link Cola} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java index 349aeaae2..d017ff606 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java @@ -63,7 +63,7 @@ public class Fanta * Get sodaType * @return sodaType The sodaType of this {@link Fanta} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java index e41a7b792..2d7585849 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java @@ -65,7 +65,7 @@ public class OneOf * Get sodaType * @return sodaType The sodaType of this {@link OneOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java index 5e2f1fc1c..38866718d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminator * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminator} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java index 0fab43fec..0003a2868 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminatorAndMapping * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminatorAndMapping} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java index d0893c9d6..e0f7e8920 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java @@ -63,7 +63,7 @@ public class NotFound * Get message * @return message The message of this {@link NotFound} instance. */ - @Nonnull + @Nullable public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java index 2945b681e..ebef35a00 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationJson * Get message * @return message The message of this {@link ServiceUnavailableApplicationJson} instance. */ - @Nonnull + @Nullable public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java index 7afdf67a4..668d65cef 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationXml * Get message * @return message The message of this {@link ServiceUnavailableApplicationXml} instance. */ - @Nonnull + @Nullable public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java index 542eb09b3..b02b6d497 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java index c9f6976f5..70d371319 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -82,7 +82,7 @@ private Soda() { } * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 2dcad088e..8bc477f58 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -76,7 +76,7 @@ private UpdateSoda() { } * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -105,7 +105,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -134,7 +134,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -163,7 +163,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java index 2dd435030..2ce9f75f0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java index f3a793b66..0083a0c34 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java @@ -72,7 +72,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -101,7 +101,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -130,7 +130,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getFlavor() { return flavor; } @@ -159,7 +159,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 2838b9548..f264eee8a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -103,7 +103,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getRating() { return rating; } @@ -138,7 +138,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getScore() { return score; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index e071d03ae..4b6196d63 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -109,7 +109,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getRating() { return rating; } @@ -144,7 +144,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getScore() { return score; } @@ -179,7 +179,7 @@ public void setScore( @Nullable final BigDecimal score) { * maximum: 100 (exclusive) * @return temperature The temperature of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getTemperature() { return temperature; } @@ -212,7 +212,7 @@ public void setTemperature( @Nullable final BigDecimal temperature) { * minimum: 3 (exclusive) * @return combo The combo of this {@link Soda} instance. */ - @Nonnull + @Nullable public BigDecimal getCombo() { return combo; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java index 90e9cc595..632cf7a9d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java @@ -63,7 +63,7 @@ public class SodaCategory * Get name * @return name The name of this {@link SodaCategory} instance. */ - @Nonnull + @Nullable public String getName() { return name; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml index 4ee2eebbd..081c00662 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml @@ -19,6 +19,7 @@ components: schemas: SodaDescription: type: string + description: Soda description Soda: type: object @@ -28,6 +29,6 @@ components: description: # $ref with a sibling property — valid in OAS 3.1 $ref: '#/components/schemas/SodaDescription' - description: Human-readable description override + description: Soda description as part of the Soda object required: - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index d88df9c21..439c9072a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -83,7 +83,7 @@ public void setName( @Nonnull final String name) { /** * Set the description of this {@link Soda} instance and return the same instance. * - * @param description The description of this {@link Soda} + * @param description Soda description as part of the Soda object * @return The same instance of this {@link Soda} class */ @Nonnull public Soda description( @Nullable final String description) { @@ -92,10 +92,10 @@ public void setName( @Nonnull final String name) { } /** - * Get description + * Soda description as part of the Soda object * @return description The description of this {@link Soda} instance. */ - @Nonnull + @Nullable public String getDescription() { return description; } @@ -103,7 +103,7 @@ public String getDescription() { /** * Set the description of this {@link Soda} instance. * - * @param description The description of this {@link Soda} + * @param description Soda description as part of the Soda object */ public void setDescription( @Nullable final String description) { this.description = description; diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java index 9dfaf3ea3..acb1c546e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java @@ -63,7 +63,7 @@ public class AllOf * Get sodaType * @return sodaType The sodaType of this {@link AllOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java index 59f1e77c0..caa2a6634 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java @@ -65,7 +65,7 @@ public class AnyOf * Get sodaType * @return sodaType The sodaType of this {@link AnyOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java index 523e3146a..9bb0649a9 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java @@ -63,7 +63,7 @@ public class Cola * Get sodaType * @return sodaType The sodaType of this {@link Cola} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java index 349aeaae2..d017ff606 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java @@ -63,7 +63,7 @@ public class Fanta * Get sodaType * @return sodaType The sodaType of this {@link Fanta} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java index e41a7b792..2d7585849 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java @@ -65,7 +65,7 @@ public class OneOf * Get sodaType * @return sodaType The sodaType of this {@link OneOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java index 5e2f1fc1c..38866718d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminator * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminator} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java index 0fab43fec..0003a2868 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminatorAndMapping * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminatorAndMapping} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java index 67c23e578..b98dc1c9f 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java @@ -72,7 +72,7 @@ public class AllOf * Get sodaType * @return sodaType The sodaType of this {@link AllOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } @@ -101,7 +101,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get barCode * @return barCode The barCode of this {@link AllOf} instance. */ - @Nonnull + @Nullable public ColaBarCode getBarCode() { return barCode; } @@ -130,7 +130,7 @@ public void setBarCode( @Nullable final ColaBarCode barCode) { * Get flavor * @return flavor The flavor of this {@link AllOf} instance. */ - @Nonnull + @Nullable public FantaFlavor getFlavor() { return flavor; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java index 367a2551d..f168f1fe8 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java @@ -74,7 +74,7 @@ public class AnyOf * Get sodaType * @return sodaType The sodaType of this {@link AnyOf} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } @@ -103,7 +103,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get barCode * @return barCode The barCode of this {@link AnyOf} instance. */ - @Nonnull + @Nullable public ColaBarCode getBarCode() { return barCode; } @@ -132,7 +132,7 @@ public void setBarCode( @Nullable final ColaBarCode barCode) { * Get flavor * @return flavor The flavor of this {@link AnyOf} instance. */ - @Nonnull + @Nullable public FantaFlavor getFlavor() { return flavor; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java index 5a8354f0c..b0597db43 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java @@ -71,7 +71,7 @@ public class Cola implements OneOf, OneOfWithDiscriminator, OneOfWithDiscriminat * Get sodaType * @return sodaType The sodaType of this {@link Cola} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } @@ -100,7 +100,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get barCode * @return barCode The barCode of this {@link Cola} instance. */ - @Nonnull + @Nullable public ColaBarCode getBarCode() { return barCode; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java index 877eb424e..5ef1720d8 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java @@ -71,7 +71,7 @@ public class Fanta implements OneOf, OneOfWithDiscriminator, OneOfWithDiscrimina * Get sodaType * @return sodaType The sodaType of this {@link Fanta} instance. */ - @Nonnull + @Nullable public String getSodaType() { return sodaType; } @@ -100,7 +100,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get flavor * @return flavor The flavor of this {@link Fanta} instance. */ - @Nonnull + @Nullable public FantaFlavor getFlavor() { return flavor; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 45a204a0f..8e84b6fe2 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nonnull + @Nullable public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java index edccab010..22a7aeff5 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java @@ -75,7 +75,7 @@ public class SodaWithFoo * Get id * @return id The id of this {@link SodaWithFoo} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link SodaWithFoo} instance. */ - @Nonnull + @Nullable public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 40d04555d..564bcc1d7 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -76,7 +76,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getName() { return name; } @@ -105,7 +105,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Boolean isZero() { return zero; } @@ -134,7 +134,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public LocalDate getSince() { return since; } @@ -163,7 +163,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public String getBrand() { return brand; } @@ -192,7 +192,7 @@ public void setBrand( @Nullable final String brand) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nonnull + @Nullable public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java index 30c807a7b..44788e1d0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java @@ -133,7 +133,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link Order} instance. */ - @Nonnull + @Nullable public Float getTotalPrice() { return totalPrice; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java index b81a924cb..0ebaa8792 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java @@ -137,7 +137,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link OrderWithTimestamp} instance. */ - @Nonnull + @Nullable public Float getTotalPrice() { return totalPrice; } @@ -224,7 +224,7 @@ public void setNullableProperty( @Nullable final String nullableProperty) { * Get timestamp * @return timestamp The timestamp of this {@link OrderWithTimestamp} instance. */ - @Nonnull + @Nullable public OffsetDateTime getTimestamp() { return timestamp; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 862a33733..fecd099ea 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -221,7 +221,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link Soda} instance. */ - @Nonnull + @Nullable public PackagingEnum getPackaging() { return packaging; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java index 70553d4ca..e04f94e4c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java @@ -224,7 +224,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link SodaWithId} instance. */ - @Nonnull + @Nullable public PackagingEnum getPackaging() { return packaging; } @@ -282,7 +282,7 @@ public void setPrice( @Nonnull final Float price) { * Get id * @return id The id of this {@link SodaWithId} instance. */ - @Nonnull + @Nullable public Long getId() { return id; } From b9cb23a17657736352e92756bec4e035ca577315 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 23 Jul 2026 15:41:32 +0200 Subject: [PATCH 16/28] Moved components path items to integration test --- .../DataModelGeneratorIntegrationTest.java | 11 ++ .../generator/DataModelGeneratorUnitTest.java | 34 ---- .../input/sodastore.yaml} | 0 .../datamodel/rest/test/api/DefaultApi.java | 118 ++++++++++++ .../sdk/datamodel/rest/test/model/Soda.java | 173 ++++++++++++++++++ .../datamodel/rest/test/model/SodaDetail.java | 173 ++++++++++++++++++ .../input/sodastore.yaml | 49 +++++ .../datamodel/rest/test/api/DefaultApi.java | 91 +++++++++ .../sdk/datamodel/rest/test/model/Soda.java | 173 ++++++++++++++++++ .../datamodel/rest/test/model/SodaDetail.java | 173 ++++++++++++++++++ 10 files changed, 961 insertions(+), 34 deletions(-) rename datamodel/openapi/openapi-generator/src/test/resources/{DataModelGeneratorUnitTest/oas31-components-path-items.yaml => DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml} (100%) create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/input/sodastore.yaml create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java create mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java index 8d017f943..0a3d68b90 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java @@ -221,6 +221,17 @@ enum TestCase 2, Map.of(), Map.of()), + OAS31_COMPONENTS_PATH_ITEMS( + "oas31-components-path-items", + "sodastore.yaml", + "com.sap.cloud.sdk.datamodel.rest.test.api", + "com.sap.cloud.sdk.datamodel.rest.test.model", + ApiMaturity.RELEASED, + false, + true, + 3, + Map.of("removeUnusedComponents", "true"), + Map.of()), FILE_HANDLING( "file-handling", "file-handling.yaml", diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java index 8b4af673b..c841ff643 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorUnitTest.java @@ -390,38 +390,4 @@ void testConfigOptionsArePassedToGenerator() assertThat(outputDirectory.toFile().exists()).isTrue(); } - /** - * OAS 3.1 adds {@code components/pathItems}. When {@code removeUnusedComponents} is enabled, schemas referenced - * only from {@code components/pathItems} (not from {@code paths}) must not be deleted. - */ - @Test - @SneakyThrows - void testRemoveUnusedComponentsKeepsSchemasReferencedFromComponentsPathItems() - { - final GenerationConfiguration configuration = - GenerationConfiguration - .builder() - .inputSpec( - "src/test/resources/" - + DataModelGeneratorUnitTest.class.getSimpleName() - + "/oas31-components-path-items.yaml") - .modelPackage("model") - .apiPackage("api") - .outputDirectory(outputDirectory.toAbsolutePath().toString()) - .additionalProperty("removeUnusedComponents", "true") - .build(); - - final Try result = new DataModelGenerator().generateDataModel(configuration); - - assertThat(result.isSuccess()).isTrue(); - - final var generatedFileNames = result.get().getGeneratedFiles().stream().map(File::getName).toList(); - - // Soda is referenced from paths — must be kept - assertThat(generatedFileNames).anyMatch(name -> name.equals("Soda.java")); - // SodaDetail is only referenced from components/pathItems — must also be kept - assertThat(generatedFileNames).anyMatch(name -> name.equals("SodaDetail.java")); - // UnusedSchema is not referenced from anywhere — must be removed - assertThat(generatedFileNames).noneMatch(name -> name.equals("UnusedSchema.java")); - } } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml similarity index 100% rename from datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorUnitTest/oas31-components-path-items.yaml rename to datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..427527506 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; +import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; + + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.StringJoiner; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + + +/** + * OAS 3.1 components/pathItems schema references in version 1.0.0. + *

+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends BaseApi { + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 components/pathItems schema references. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 components/pathItems schema references based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + public DefaultApi(@Nonnull final ApiClient apiClient) { + super(apiClient); + } + + /** + * Creates a new API instance with additional default headers. + * + * @param defaultHeaders Additional headers to include in all requests + * @return A new API instance with the combined headers + */ + public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { + final var api = new DefaultApi(apiClient); + api.defaultHeaders.putAll(this.defaultHeaders); + api.defaultHeaders.putAll(defaultHeaders); + return api; + } + + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + + // create path and map variables + final String localVarPath = "/sodas"; + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + + }; + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType + ); + } + } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..211258b8b --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 components/pathItems schema references + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nullable final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nullable + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nullable final String name) { + this.name = name; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name); + } + + @Override + public int hashCode() { + return Objects.hash(name, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java new file mode 100644 index 000000000..3e2fb390f --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 components/pathItems schema references + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * SodaDetail + */ +// CHECKSTYLE:OFF +public class SodaDetail +// CHECKSTYLE:ON +{ + @JsonProperty("description") + private String description; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the description of this {@link SodaDetail} instance and return the same instance. + * + * @param description The description of this {@link SodaDetail} + * @return The same instance of this {@link SodaDetail} class + */ + @Nonnull public SodaDetail description( @Nullable final String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description The description of this {@link SodaDetail} instance. + */ + @Nullable + public String getDescription() { + return description; + } + + /** + * Set the description of this {@link SodaDetail} instance. + * + * @param description The description of this {@link SodaDetail} + */ + public void setDescription( @Nullable final String description) { + this.description = description; + } + + /** + * Get the names of the unrecognizable properties of the {@link SodaDetail}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link SodaDetail} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("SodaDetail has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link SodaDetail} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( description != null ) declaredFields.put("description", description); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link SodaDetail} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final SodaDetail sodaDetail = (SodaDetail) o; + return Objects.equals(this.cloudSdkCustomFields, sodaDetail.cloudSdkCustomFields) && + Objects.equals(this.description, sodaDetail.description); + } + + @Override + public int hashCode() { + return Objects.hash(description, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class SodaDetail {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/input/sodastore.yaml new file mode 100644 index 000000000..0ea8f9807 --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/input/sodastore.yaml @@ -0,0 +1,49 @@ +openapi: 3.1.0 +info: + title: OAS 3.1 components/pathItems schema references + version: 1.0.0 + +paths: + /sodas: + get: + operationId: getSodas + responses: + '200': + description: A soda + content: + application/json: + schema: + $ref: '#/components/schemas/Soda' + +components: + # OAS 3.1 adds components/pathItems — schemas referenced here must not be removed + pathItems: + sodaItem: + get: + operationId: getSodaDetail + responses: + '200': + description: success + content: + application/json: + schema: + $ref: '#/components/schemas/SodaDetail' + + schemas: + Soda: + type: object + properties: + name: + type: string + # Only referenced from components/pathItems, not from paths + SodaDetail: + type: object + properties: + description: + type: string + # Not referenced anywhere — should be removed by removeUnusedComponents + UnusedSchema: + type: object + properties: + garbage: + type: string diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java new file mode 100644 index 000000000..ea68a69fa --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.api; + +import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException; +import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse; +import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; +import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; + +import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import com.google.common.annotations.Beta; + +import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; + +/** + * OAS 3.1 components/pathItems schema references in version 1.0.0. + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + */ +public class DefaultApi extends AbstractOpenApiService { + /** + * Instantiates this API class to invoke operations on the OAS 3.1 components/pathItems schema references. + * + * @param httpDestination The destination that API should be used with + */ + public DefaultApi( @Nonnull final Destination httpDestination ) + { + super(httpDestination); + } + + /** + * Instantiates this API class to invoke operations on the OAS 3.1 components/pathItems schema references based on a given {@link ApiClient}. + * + * @param apiClient + * ApiClient to invoke the API on + */ + @Beta + public DefaultApi( @Nonnull final ApiClient apiClient ) + { + super(apiClient); + } + + /** + *

+ *

+ *

200 - A soda + * @return Soda + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public Soda getSodas() throws OpenApiRequestException { + final Object localVarPostBody = null; + + final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString(); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + final String[] localVarAuthNames = new String[] { }; + + final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java new file mode 100644 index 000000000..211258b8b --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 components/pathItems schema references + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Soda + */ +// CHECKSTYLE:OFF +public class Soda +// CHECKSTYLE:ON +{ + @JsonProperty("name") + private String name; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the name of this {@link Soda} instance and return the same instance. + * + * @param name The name of this {@link Soda} + * @return The same instance of this {@link Soda} class + */ + @Nonnull public Soda name( @Nullable final String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name The name of this {@link Soda} instance. + */ + @Nullable + public String getName() { + return name; + } + + /** + * Set the name of this {@link Soda} instance. + * + * @param name The name of this {@link Soda} + */ + public void setName( @Nullable final String name) { + this.name = name; + } + + /** + * Get the names of the unrecognizable properties of the {@link Soda}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link Soda} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("Soda has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link Soda} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( name != null ) declaredFields.put("name", name); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final Soda soda = (Soda) o; + return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && + Objects.equals(this.name, soda.name); + } + + @Override + public int hashCode() { + return Objects.hash(name, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Soda {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java new file mode 100644 index 000000000..3e2fb390f --- /dev/null +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. + */ + +/* + * OAS 3.1 components/pathItems schema references + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.cloud.sdk.datamodel.rest.test.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * SodaDetail + */ +// CHECKSTYLE:OFF +public class SodaDetail +// CHECKSTYLE:ON +{ + @JsonProperty("description") + private String description; + + @JsonAnySetter + @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** + * Set the description of this {@link SodaDetail} instance and return the same instance. + * + * @param description The description of this {@link SodaDetail} + * @return The same instance of this {@link SodaDetail} class + */ + @Nonnull public SodaDetail description( @Nullable final String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description The description of this {@link SodaDetail} instance. + */ + @Nullable + public String getDescription() { + return description; + } + + /** + * Set the description of this {@link SodaDetail} instance. + * + * @param description The description of this {@link SodaDetail} + */ + public void setDescription( @Nullable final String description) { + this.description = description; + } + + /** + * Get the names of the unrecognizable properties of the {@link SodaDetail}. + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link SodaDetail} instance. + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { + if( !cloudSdkCustomFields.containsKey(name) ) { + throw new NoSuchElementException("SodaDetail has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link SodaDetail} instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() + { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if( description != null ) declaredFields.put("description", description); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link SodaDetail} instance. If the map previously contained a mapping + * for the key, the old value is replaced by the specified value. + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) + { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final SodaDetail sodaDetail = (SodaDetail) o; + return Objects.equals(this.cloudSdkCustomFields, sodaDetail.cloudSdkCustomFields) && + Objects.equals(this.description, sodaDetail.description); + } + + @Override + public int hashCode() { + return Objects.hash(description, cloudSdkCustomFields); + } + + @Override + @Nonnull public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class SodaDetail {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + From 986ced006a171bffdbb7c99d51369689d7aed01d Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Fri, 24 Jul 2026 10:20:47 +0200 Subject: [PATCH 17/28] chore: revert the nonnull change back for non-required field --- .../mustache-templates/pojo.mustache | 2 +- .../cloud/sdk/services/builder/model/NewSoda.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 12 ++++++------ .../apiclassvendorextension/model/NewSoda.java | 4 ++-- .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 12 ++++++------ .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 8 ++++---- .../sdk/services/inlineobject/model/NotFound.java | 2 +- .../model/ServiceUnavailableApplicationJson.java | 2 +- .../model/ServiceUnavailableApplicationXml.java | 2 +- .../cloud/sdk/services/inlineobject/model/Soda.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 4 ++-- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 8 ++++---- .../sdk/datamodel/rest/test/model/SodaCategory.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 8 ++++---- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../sdk/services/builder/model/SodaWithFoo.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 10 +++++----- .../sap/cloud/sdk/services/builder/model/Order.java | 2 +- .../services/builder/model/OrderWithTimestamp.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 2 +- .../cloud/sdk/services/builder/model/SodaWithId.java | 4 ++-- 24 files changed, 55 insertions(+), 55 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache b/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache index cd374c9fa..167cfbecb 100644 --- a/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache +++ b/datamodel/openapi/openapi-generator/src/main/resources/openapi-generator/mustache-templates/pojo.mustache @@ -207,7 +207,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Nullable {{/isNullable}} {{^isNullable}} - {{#required}}@Nonnull{{/required}}{{^required}}@Nullable{{/required}} + @Nonnull {{/isNullable}} {{#jsonb}} @JsonbProperty("{{baseName}}") diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java index 9ca1d90b0..20ce285d8 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 9b0c56956..b0cab12da 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -147,7 +147,7 @@ public enum DietEnum { * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } @@ -234,7 +234,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nullable + @Nonnull public Boolean isAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index ee31eee5c..85f725e6a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java index 3741a0299..6bbd8468d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index 3a972cbd9..b0159f9aa 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index 71fed98e8..65139c68c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index 3a972cbd9..b0159f9aa 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index af5a3bb90..84b275fbb 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -72,7 +72,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -101,7 +101,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -130,7 +130,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -159,7 +159,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java index e0f7e8920..d0893c9d6 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java @@ -63,7 +63,7 @@ public class NotFound * Get message * @return message The message of this {@link NotFound} instance. */ - @Nullable + @Nonnull public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java index ebef35a00..2945b681e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationJson * Get message * @return message The message of this {@link ServiceUnavailableApplicationJson} instance. */ - @Nullable + @Nonnull public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java index 668d65cef..7afdf67a4 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationXml * Get message * @return message The message of this {@link ServiceUnavailableApplicationXml} instance. */ - @Nullable + @Nonnull public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java index b02b6d497..542eb09b3 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index f264eee8a..2838b9548 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -103,7 +103,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getRating() { return rating; } @@ -138,7 +138,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getScore() { return score; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 4b6196d63..e071d03ae 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -109,7 +109,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getRating() { return rating; } @@ -144,7 +144,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getScore() { return score; } @@ -179,7 +179,7 @@ public void setScore( @Nullable final BigDecimal score) { * maximum: 100 (exclusive) * @return temperature The temperature of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getTemperature() { return temperature; } @@ -212,7 +212,7 @@ public void setTemperature( @Nullable final BigDecimal temperature) { * minimum: 3 (exclusive) * @return combo The combo of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getCombo() { return combo; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java index 632cf7a9d..90e9cc595 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java @@ -63,7 +63,7 @@ public class SodaCategory * Get name * @return name The name of this {@link SodaCategory} instance. */ - @Nullable + @Nonnull public String getName() { return name; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 439c9072a..d88df9c21 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -83,7 +83,7 @@ public void setName( @Nonnull final String name) { /** * Set the description of this {@link Soda} instance and return the same instance. * - * @param description Soda description as part of the Soda object + * @param description The description of this {@link Soda} * @return The same instance of this {@link Soda} class */ @Nonnull public Soda description( @Nullable final String description) { @@ -92,10 +92,10 @@ public void setName( @Nonnull final String name) { } /** - * Soda description as part of the Soda object + * Get description * @return description The description of this {@link Soda} instance. */ - @Nullable + @Nonnull public String getDescription() { return description; } @@ -103,7 +103,7 @@ public String getDescription() { /** * Set the description of this {@link Soda} instance. * - * @param description Soda description as part of the Soda object + * @param description The description of this {@link Soda} */ public void setDescription( @Nullable final String description) { this.description = description; diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 8e84b6fe2..45a204a0f 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nullable + @Nonnull public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java index 22a7aeff5..edccab010 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java @@ -75,7 +75,7 @@ public class SodaWithFoo * Get id * @return id The id of this {@link SodaWithFoo} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link SodaWithFoo} instance. */ - @Nullable + @Nonnull public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 564bcc1d7..40d04555d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -76,7 +76,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -105,7 +105,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -134,7 +134,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } @@ -163,7 +163,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -192,7 +192,7 @@ public void setBrand( @Nullable final String brand) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java index 44788e1d0..30c807a7b 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java @@ -133,7 +133,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link Order} instance. */ - @Nullable + @Nonnull public Float getTotalPrice() { return totalPrice; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java index 0ebaa8792..b81a924cb 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java @@ -137,7 +137,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link OrderWithTimestamp} instance. */ - @Nullable + @Nonnull public Float getTotalPrice() { return totalPrice; } @@ -224,7 +224,7 @@ public void setNullableProperty( @Nullable final String nullableProperty) { * Get timestamp * @return timestamp The timestamp of this {@link OrderWithTimestamp} instance. */ - @Nullable + @Nonnull public OffsetDateTime getTimestamp() { return timestamp; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java index fecd099ea..862a33733 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -221,7 +221,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link Soda} instance. */ - @Nullable + @Nonnull public PackagingEnum getPackaging() { return packaging; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java index e04f94e4c..70553d4ca 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java @@ -224,7 +224,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link SodaWithId} instance. */ - @Nullable + @Nonnull public PackagingEnum getPackaging() { return packaging; } @@ -282,7 +282,7 @@ public void setPrice( @Nonnull final Float price) { * Get id * @return id The id of this {@link SodaWithId} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } From cb41ee48e7edbcc3b12779b1ae73cae596c1c9a9 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Mon, 27 Jul 2026 12:23:11 +0200 Subject: [PATCH 18/28] Update test resources --- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 2 +- .../sdk/datamodel/rest/test/model/SodaDetail.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 6 +++--- .../cloud/sdk/services/builder/model/NewSoda.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 12 ++++++------ .../apiclassvendorextension/model/NewSoda.java | 4 ++-- .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 12 ++++++------ .../services/apiclassvendorextension/model/Soda.java | 2 +- .../apiclassvendorextension/model/UpdateSoda.java | 8 ++++---- .../generate-apis/output/test/AllOf.java | 2 +- .../generate-apis/output/test/AnyOf.java | 2 +- .../generate-apis/output/test/Cola.java | 2 +- .../generate-apis/output/test/Fanta.java | 2 +- .../generate-apis/output/test/OneOf.java | 2 +- .../output/test/OneOfWithDiscriminator.java | 2 +- .../test/OneOfWithDiscriminatorAndMapping.java | 2 +- .../sdk/services/inlineobject/model/NotFound.java | 2 +- .../model/ServiceUnavailableApplicationJson.java | 2 +- .../model/ServiceUnavailableApplicationXml.java | 2 +- .../cloud/sdk/services/inlineobject/model/Soda.java | 2 +- .../sap/cloud/sdk/services/builder/model/Soda.java | 2 +- .../cloud/sdk/services/builder/model/UpdateSoda.java | 8 ++++---- .../services/uppercasefileextension/model/Soda.java | 2 +- .../uppercasefileextension/model/UpdateSoda.java | 8 ++++---- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 4 ++-- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 2 +- .../sdk/datamodel/rest/test/model/SodaDetail.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 8 ++++---- .../sdk/datamodel/rest/test/model/SodaCategory.java | 2 +- .../cloud/sdk/datamodel/rest/test/model/Soda.java | 2 +- .../oneof-interfaces-disabled/output/test/AllOf.java | 2 +- .../oneof-interfaces-disabled/output/test/AnyOf.java | 2 +- .../oneof-interfaces-disabled/output/test/Cola.java | 2 +- .../oneof-interfaces-disabled/output/test/Fanta.java | 2 +- .../oneof-interfaces-disabled/output/test/OneOf.java | 2 +- .../output/test/OneOfWithDiscriminator.java | 2 +- .../test/OneOfWithDiscriminatorAndMapping.java | 2 +- .../oneof-interfaces-enabled/output/test/AllOf.java | 6 +++--- .../oneof-interfaces-enabled/output/test/AnyOf.java | 6 +++--- .../oneof-interfaces-enabled/output/test/Cola.java | 4 ++-- .../oneof-interfaces-enabled/output/test/Fanta.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 4 ++-- .../sdk/services/builder/model/SodaWithFoo.java | 4 ++-- .../cloud/sdk/services/builder/model/UpdateSoda.java | 10 +++++----- .../sap/cloud/sdk/services/builder/model/Order.java | 2 +- .../services/builder/model/OrderWithTimestamp.java | 4 ++-- .../sap/cloud/sdk/services/builder/model/Soda.java | 2 +- .../cloud/sdk/services/builder/model/SodaWithId.java | 4 ++-- 50 files changed, 92 insertions(+), 92 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 211258b8b..3b19ef960 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -63,7 +63,7 @@ public class Soda * Get name * @return name The name of this {@link Soda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java index 3e2fb390f..7d6f56797 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java @@ -63,7 +63,7 @@ public class SodaDetail * Get description * @return description The description of this {@link SodaDetail} instance. */ - @Nullable + @Nonnull public String getDescription() { return description; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index d88df9c21..03a3867db 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -83,7 +83,7 @@ public void setName( @Nonnull final String name) { /** * Set the description of this {@link Soda} instance and return the same instance. * - * @param description The description of this {@link Soda} + * @param description Soda description as part of the Soda object * @return The same instance of this {@link Soda} class */ @Nonnull public Soda description( @Nullable final String description) { @@ -92,7 +92,7 @@ public void setName( @Nonnull final String name) { } /** - * Get description + * Soda description as part of the Soda object * @return description The description of this {@link Soda} instance. */ @Nonnull @@ -103,7 +103,7 @@ public String getDescription() { /** * Set the description of this {@link Soda} instance. * - * @param description The description of this {@link Soda} + * @param description Soda description as part of the Soda object */ public void setDescription( @Nullable final String description) { this.description = description; diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java index 9ca1d90b0..20ce285d8 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 9b0c56956..b0cab12da 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -147,7 +147,7 @@ public enum DietEnum { * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } @@ -234,7 +234,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nullable + @Nonnull public Boolean isAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index ee31eee5c..85f725e6a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-for-ai-sdk/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java index 3741a0299..6bbd8468d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java @@ -137,7 +137,7 @@ public void setBrand( @Nonnull final String brand) { * Get zero * @return zero The zero of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -166,7 +166,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link NewSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index 3a972cbd9..b0159f9aa 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index 71fed98e8..65139c68c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -79,7 +79,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -108,7 +108,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -137,7 +137,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } @@ -166,7 +166,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -195,7 +195,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -224,7 +224,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java index 3a972cbd9..b0159f9aa 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java index af5a3bb90..84b275fbb 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java @@ -72,7 +72,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -101,7 +101,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -130,7 +130,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -159,7 +159,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java index acb1c546e..9dfaf3ea3 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AllOf.java @@ -63,7 +63,7 @@ public class AllOf * Get sodaType * @return sodaType The sodaType of this {@link AllOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java index caa2a6634..59f1e77c0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/AnyOf.java @@ -65,7 +65,7 @@ public class AnyOf * Get sodaType * @return sodaType The sodaType of this {@link AnyOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java index 9bb0649a9..523e3146a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Cola.java @@ -63,7 +63,7 @@ public class Cola * Get sodaType * @return sodaType The sodaType of this {@link Cola} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java index d017ff606..349aeaae2 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/Fanta.java @@ -63,7 +63,7 @@ public class Fanta * Get sodaType * @return sodaType The sodaType of this {@link Fanta} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java index 2d7585849..e41a7b792 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOf.java @@ -65,7 +65,7 @@ public class OneOf * Get sodaType * @return sodaType The sodaType of this {@link OneOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java index 38866718d..5e2f1fc1c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminator.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminator * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminator} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java index 0003a2868..0fab43fec 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/generate-apis/output/test/OneOfWithDiscriminatorAndMapping.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminatorAndMapping * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminatorAndMapping} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java index e0f7e8920..d0893c9d6 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/NotFound.java @@ -63,7 +63,7 @@ public class NotFound * Get message * @return message The message of this {@link NotFound} instance. */ - @Nullable + @Nonnull public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java index ebef35a00..2945b681e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationJson.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationJson * Get message * @return message The message of this {@link ServiceUnavailableApplicationJson} instance. */ - @Nullable + @Nonnull public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java index 668d65cef..7afdf67a4 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/ServiceUnavailableApplicationXml.java @@ -63,7 +63,7 @@ public class ServiceUnavailableApplicationXml * Get message * @return message The message of this {@link ServiceUnavailableApplicationXml} instance. */ - @Nullable + @Nonnull public String getMessage() { return message; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java index b02b6d497..542eb09b3 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/inlineobject-schemas-enabled/output/com/sap/cloud/sdk/services/inlineobject/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 70d371319..c9f6976f5 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -82,7 +82,7 @@ private Soda() { } * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 8bc477f58..2dcad088e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -76,7 +76,7 @@ private UpdateSoda() { } * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -105,7 +105,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -134,7 +134,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -163,7 +163,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java index 2ce9f75f0..2dd435030 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java index 0083a0c34..f3a793b66 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java @@ -72,7 +72,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -101,7 +101,7 @@ public void setName( @Nullable final String name) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -130,7 +130,7 @@ public void setBrand( @Nullable final String brand) { * Get flavor * @return flavor The flavor of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getFlavor() { return flavor; } @@ -159,7 +159,7 @@ public void setFlavor( @Nullable final String flavor) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index f264eee8a..2838b9548 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -103,7 +103,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getRating() { return rating; } @@ -138,7 +138,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getScore() { return score; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 211258b8b..3b19ef960 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -63,7 +63,7 @@ public class Soda * Get name * @return name The name of this {@link Soda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java index 3e2fb390f..7d6f56797 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java @@ -63,7 +63,7 @@ public class SodaDetail * Get description * @return description The description of this {@link SodaDetail} instance. */ - @Nullable + @Nonnull public String getDescription() { return description; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 4b6196d63..e071d03ae 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -109,7 +109,7 @@ public void setName( @Nonnull final String name) { * maximum: 5 (exclusive) * @return rating The rating of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getRating() { return rating; } @@ -144,7 +144,7 @@ public void setRating( @Nullable final BigDecimal rating) { * maximum: 100 * @return score The score of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getScore() { return score; } @@ -179,7 +179,7 @@ public void setScore( @Nullable final BigDecimal score) { * maximum: 100 (exclusive) * @return temperature The temperature of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getTemperature() { return temperature; } @@ -212,7 +212,7 @@ public void setTemperature( @Nullable final BigDecimal temperature) { * minimum: 3 (exclusive) * @return combo The combo of this {@link Soda} instance. */ - @Nullable + @Nonnull public BigDecimal getCombo() { return combo; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java index 632cf7a9d..90e9cc595 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java @@ -63,7 +63,7 @@ public class SodaCategory * Get name * @return name The name of this {@link SodaCategory} instance. */ - @Nullable + @Nonnull public String getName() { return name; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java index 439c9072a..03a3867db 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java @@ -95,7 +95,7 @@ public void setName( @Nonnull final String name) { * Soda description as part of the Soda object * @return description The description of this {@link Soda} instance. */ - @Nullable + @Nonnull public String getDescription() { return description; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java index acb1c546e..9dfaf3ea3 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AllOf.java @@ -63,7 +63,7 @@ public class AllOf * Get sodaType * @return sodaType The sodaType of this {@link AllOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java index caa2a6634..59f1e77c0 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/AnyOf.java @@ -65,7 +65,7 @@ public class AnyOf * Get sodaType * @return sodaType The sodaType of this {@link AnyOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java index 9bb0649a9..523e3146a 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Cola.java @@ -63,7 +63,7 @@ public class Cola * Get sodaType * @return sodaType The sodaType of this {@link Cola} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java index d017ff606..349aeaae2 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/Fanta.java @@ -63,7 +63,7 @@ public class Fanta * Get sodaType * @return sodaType The sodaType of this {@link Fanta} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java index 2d7585849..e41a7b792 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOf.java @@ -65,7 +65,7 @@ public class OneOf * Get sodaType * @return sodaType The sodaType of this {@link OneOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java index 38866718d..5e2f1fc1c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminator.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminator * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminator} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java index 0003a2868..0fab43fec 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-disabled/output/test/OneOfWithDiscriminatorAndMapping.java @@ -73,7 +73,7 @@ public class OneOfWithDiscriminatorAndMapping * Get sodaType * @return sodaType The sodaType of this {@link OneOfWithDiscriminatorAndMapping} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java index b98dc1c9f..67c23e578 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AllOf.java @@ -72,7 +72,7 @@ public class AllOf * Get sodaType * @return sodaType The sodaType of this {@link AllOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } @@ -101,7 +101,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get barCode * @return barCode The barCode of this {@link AllOf} instance. */ - @Nullable + @Nonnull public ColaBarCode getBarCode() { return barCode; } @@ -130,7 +130,7 @@ public void setBarCode( @Nullable final ColaBarCode barCode) { * Get flavor * @return flavor The flavor of this {@link AllOf} instance. */ - @Nullable + @Nonnull public FantaFlavor getFlavor() { return flavor; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java index f168f1fe8..367a2551d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/AnyOf.java @@ -74,7 +74,7 @@ public class AnyOf * Get sodaType * @return sodaType The sodaType of this {@link AnyOf} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } @@ -103,7 +103,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get barCode * @return barCode The barCode of this {@link AnyOf} instance. */ - @Nullable + @Nonnull public ColaBarCode getBarCode() { return barCode; } @@ -132,7 +132,7 @@ public void setBarCode( @Nullable final ColaBarCode barCode) { * Get flavor * @return flavor The flavor of this {@link AnyOf} instance. */ - @Nullable + @Nonnull public FantaFlavor getFlavor() { return flavor; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java index b0597db43..5a8354f0c 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Cola.java @@ -71,7 +71,7 @@ public class Cola implements OneOf, OneOfWithDiscriminator, OneOfWithDiscriminat * Get sodaType * @return sodaType The sodaType of this {@link Cola} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } @@ -100,7 +100,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get barCode * @return barCode The barCode of this {@link Cola} instance. */ - @Nullable + @Nonnull public ColaBarCode getBarCode() { return barCode; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java index 5ef1720d8..877eb424e 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/oneof-interfaces-enabled/output/test/Fanta.java @@ -71,7 +71,7 @@ public class Fanta implements OneOf, OneOfWithDiscriminator, OneOfWithDiscrimina * Get sodaType * @return sodaType The sodaType of this {@link Fanta} instance. */ - @Nullable + @Nonnull public String getSodaType() { return sodaType; } @@ -100,7 +100,7 @@ public void setSodaType( @Nullable final String sodaType) { * Get flavor * @return flavor The flavor of this {@link Fanta} instance. */ - @Nullable + @Nonnull public FantaFlavor getFlavor() { return flavor; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java index 8e84b6fe2..45a204a0f 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -75,7 +75,7 @@ public class Soda * Get id * @return id The id of this {@link Soda} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link Soda} instance. */ - @Nullable + @Nonnull public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java index 22a7aeff5..edccab010 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/SodaWithFoo.java @@ -75,7 +75,7 @@ public class SodaWithFoo * Get id * @return id The id of this {@link SodaWithFoo} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } @@ -162,7 +162,7 @@ public void setBrand( @Nonnull final String brand) { * Get isAvailable * @return isAvailable The isAvailable of this {@link SodaWithFoo} instance. */ - @Nullable + @Nonnull public Boolean isIsAvailable() { return isAvailable; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java index 564bcc1d7..40d04555d 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/partial-generation/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java @@ -76,7 +76,7 @@ public class UpdateSoda * Get name * @return name The name of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getName() { return name; } @@ -105,7 +105,7 @@ public void setName( @Nullable final String name) { * Get zero * @return zero The zero of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Boolean isZero() { return zero; } @@ -134,7 +134,7 @@ public void setZero( @Nullable final Boolean zero) { * Get since * @return since The since of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public LocalDate getSince() { return since; } @@ -163,7 +163,7 @@ public void setSince( @Nullable final LocalDate since) { * Get brand * @return brand The brand of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public String getBrand() { return brand; } @@ -192,7 +192,7 @@ public void setBrand( @Nullable final String brand) { * Get price * @return price The price of this {@link UpdateSoda} instance. */ - @Nullable + @Nonnull public Float getPrice() { return price; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java index 44788e1d0..30c807a7b 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Order.java @@ -133,7 +133,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link Order} instance. */ - @Nullable + @Nonnull public Float getTotalPrice() { return totalPrice; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java index 0ebaa8792..b81a924cb 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/OrderWithTimestamp.java @@ -137,7 +137,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get totalPrice * @return totalPrice The totalPrice of this {@link OrderWithTimestamp} instance. */ - @Nullable + @Nonnull public Float getTotalPrice() { return totalPrice; } @@ -224,7 +224,7 @@ public void setNullableProperty( @Nullable final String nullableProperty) { * Get timestamp * @return timestamp The timestamp of this {@link OrderWithTimestamp} instance. */ - @Nullable + @Nonnull public OffsetDateTime getTimestamp() { return timestamp; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java index fecd099ea..862a33733 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/Soda.java @@ -221,7 +221,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link Soda} instance. */ - @Nullable + @Nonnull public PackagingEnum getPackaging() { return packaging; } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java index e04f94e4c..70553d4ca 100644 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java +++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/remove-operation-id-prefix/output/com/sap/cloud/sdk/services/builder/model/SodaWithId.java @@ -224,7 +224,7 @@ public void setQuantity( @Nonnull final Integer quantity) { * Get packaging * @return packaging The packaging of this {@link SodaWithId} instance. */ - @Nullable + @Nonnull public PackagingEnum getPackaging() { return packaging; } @@ -282,7 +282,7 @@ public void setPrice( @Nonnull final Float price) { * Get id * @return id The id of this {@link SodaWithId} instance. */ - @Nullable + @Nonnull public Long getId() { return id; } From 3ab66c7fb850a73ae792cdfa943eb50712e1c169 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 30 Jul 2026 15:16:34 +0200 Subject: [PATCH 19/28] Remove all duplicated oas tests in apache integration test --- .../namespaces/sdkgrocerystore/Address.java | 305 +++--- .../namespaces/sdkgrocerystore/Customer.java | 336 +++---- .../namespaces/sdkgrocerystore/DateRange.java | 101 +- .../namespaces/sdkgrocerystore/FloorPlan.java | 109 +-- .../sdkgrocerystore/OpeningHours.java | 204 ++-- .../namespaces/sdkgrocerystore/Product.java | 385 ++++---- .../sdkgrocerystore/ProductCategory.java | 39 +- .../sdkgrocerystore/ProductCount.java | 105 +-- .../sdkgrocerystore/PurchaseHistoryItem.java | 116 +-- .../namespaces/sdkgrocerystore/Receipt.java | 311 +++---- .../namespaces/sdkgrocerystore/Shelf.java | 305 +++--- .../namespaces/sdkgrocerystore/Vendor.java | 208 ++--- .../DefaultSdkGroceryStoreService.java | 229 +++-- .../services/SdkGroceryStoreService.java | 869 +++++++----------- .../namespaces/sdkgrocerystore/Address.java | 382 ++++---- .../AddressByKeyFluentHelper.java | 39 +- .../AddressCreateFluentHelper.java | 42 +- .../AddressDeleteFluentHelper.java | 43 +- .../sdkgrocerystore/AddressFluentHelper.java | 28 +- .../AddressUpdateFluentHelper.java | 41 +- .../namespaces/sdkgrocerystore/Customer.java | 377 ++++---- .../CustomerByKeyFluentHelper.java | 42 +- .../CustomerCreateFluentHelper.java | 42 +- .../sdkgrocerystore/CustomerFluentHelper.java | 28 +- .../namespaces/sdkgrocerystore/FloorPlan.java | 166 ++-- .../FloorPlanByKeyFluentHelper.java | 39 +- .../FloorPlanFluentHelper.java | 28 +- .../GetProductQuantitiesFluentHelper.java | 69 +- .../IsStoreOpenFluentHelper.java | 61 +- .../sdkgrocerystore/OpeningHours.java | 254 +++-- .../OpeningHoursByKeyFluentHelper.java | 40 +- .../OpeningHoursFluentHelper.java | 28 +- .../OpeningHoursUpdateFluentHelper.java | 41 +- .../OrderProductFluentHelper.java | 77 +- .../PrintReceiptFluentHelper.java | 61 +- .../namespaces/sdkgrocerystore/Product.java | 566 +++++------- .../ProductByKeyFluentHelper.java | 39 +- .../sdkgrocerystore/ProductCount.java | 97 +- .../ProductCreateFluentHelper.java | 42 +- .../sdkgrocerystore/ProductFluentHelper.java | 28 +- .../ProductUpdateFluentHelper.java | 41 +- .../namespaces/sdkgrocerystore/Receipt.java | 734 +++++++-------- .../ReceiptByKeyFluentHelper.java | 39 +- .../ReceiptCreateFluentHelper.java | 42 +- .../sdkgrocerystore/ReceiptFluentHelper.java | 28 +- .../RevokeReceiptFluentHelper.java | 61 +- .../namespaces/sdkgrocerystore/Shelf.java | 421 ++++----- .../ShelfByKeyFluentHelper.java | 39 +- .../ShelfCreateFluentHelper.java | 42 +- .../ShelfDeleteFluentHelper.java | 42 +- .../sdkgrocerystore/ShelfFluentHelper.java | 28 +- .../ShelfUpdateFluentHelper.java | 40 +- .../namespaces/sdkgrocerystore/Vendor.java | 314 +++---- .../VendorByKeyFluentHelper.java | 39 +- .../sdkgrocerystore/VendorFluentHelper.java | 28 +- .../DefaultSdkGroceryStoreServiceBatch.java | 44 +- ...tSdkGroceryStoreServiceBatchChangeSet.java | 79 +- .../batch/SdkGroceryStoreServiceBatch.java | 10 +- .../SdkGroceryStoreServiceBatchChangeSet.java | 188 ++-- .../sdkgrocerystore/field/AddressField.java | 45 +- .../sdkgrocerystore/field/CustomerField.java | 45 +- .../sdkgrocerystore/field/FloorPlanField.java | 45 +- .../field/OpeningHoursField.java | 45 +- .../sdkgrocerystore/field/ProductField.java | 45 +- .../sdkgrocerystore/field/ReceiptField.java | 45 +- .../sdkgrocerystore/field/ShelfField.java | 45 +- .../sdkgrocerystore/field/VendorField.java | 45 +- .../sdkgrocerystore/link/AddressLink.java | 39 +- .../link/AddressOneToOneLink.java | 46 +- .../sdkgrocerystore/link/CustomerLink.java | 39 +- .../link/CustomerOneToOneLink.java | 46 +- .../sdkgrocerystore/link/FloorPlanLink.java | 40 +- .../link/FloorPlanOneToOneLink.java | 46 +- .../link/OpeningHoursLink.java | 42 +- .../link/OpeningHoursOneToOneLink.java | 45 +- .../sdkgrocerystore/link/ProductLink.java | 39 +- .../link/ProductOneToOneLink.java | 46 +- .../sdkgrocerystore/link/ReceiptLink.java | 39 +- .../link/ReceiptOneToOneLink.java | 46 +- .../sdkgrocerystore/link/ShelfLink.java | 39 +- .../link/ShelfOneToOneLink.java | 46 +- .../sdkgrocerystore/link/VendorLink.java | 39 +- .../link/VendorOneToOneLink.java | 46 +- .../selectable/AddressSelectable.java | 17 +- .../selectable/CustomerSelectable.java | 17 +- .../selectable/FloorPlanSelectable.java | 18 +- .../selectable/OpeningHoursSelectable.java | 24 +- .../selectable/ProductSelectable.java | 17 +- .../selectable/ReceiptSelectable.java | 20 +- .../selectable/ShelfSelectable.java | 23 +- .../selectable/VendorSelectable.java | 17 +- .../DefaultSdkGroceryStoreService.java | 173 ++-- .../services/SdkGroceryStoreService.java | 659 +++++-------- ...taModelGeneratorApacheIntegrationTest.java | 16 +- .../input/sodastore.yaml | 38 - .../datamodel/rest/test/api/DefaultApi.java | 118 --- .../sdk/datamodel/rest/test/model/Soda.java | 256 ------ .../input/sodastore.yaml | 49 - .../datamodel/rest/test/api/DefaultApi.java | 118 --- .../sdk/datamodel/rest/test/model/Soda.java | 173 ---- .../datamodel/rest/test/model/SodaDetail.java | 173 ---- .../input/sodastore.yaml | 47 - .../datamodel/rest/test/api/DefaultApi.java | 118 --- .../sdk/datamodel/rest/test/model/Soda.java | 335 ------- .../oas31-nullable-ref/input/sodastore.yaml | 37 - .../datamodel/rest/test/api/DefaultApi.java | 118 --- .../sdk/datamodel/rest/test/model/Soda.java | 209 ----- .../rest/test/model/SodaCategory.java | 173 ---- .../input/sodastore.yaml | 31 - .../datamodel/rest/test/api/DefaultApi.java | 118 --- .../sdk/datamodel/rest/test/model/Soda.java | 208 ----- .../input/sodastore.yaml | 34 - .../datamodel/rest/test/api/DefaultApi.java | 118 --- .../sdk/datamodel/rest/test/model/Soda.java | 208 ----- 114 files changed, 4583 insertions(+), 8721 deletions(-) delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java delete mode 100644 datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java index a62b0b30d..083f397af 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -19,7 +17,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,272 +25,231 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Address - *

- * + *

Original entity name from the Odata EDM: Address

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class Address extends VdmEntity
implements VdmEntitySet +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class Address + extends VdmEntity
+ implements VdmEntitySet { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Address"; /** * Selector for all available fields of Address. - * + * */ public final static SimpleProperty
ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return ID of the address. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * ID of the address. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger
ID = - new SimpleProperty.NumericInteger
(Address.class, "Id"); + public final static SimpleProperty.NumericInteger
ID = new SimpleProperty.NumericInteger
(Address.class, "Id"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Street - *

- * - * @return Street of the address. + * Constraints: Nullable

Original property name from the Odata EDM: Street

+ * + * @return + * Street of the address. */ @Nullable - @ElementName( "Street" ) + @ElementName("Street") private java.lang.String street; - public final static SimpleProperty.String
STREET = - new SimpleProperty.String
(Address.class, "Street"); + public final static SimpleProperty.String
STREET = new SimpleProperty.String
(Address.class, "Street"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: City - *

- * - * @return City of the address. + * Constraints: Nullable

Original property name from the Odata EDM: City

+ * + * @return + * City of the address. */ @Nullable - @ElementName( "City" ) + @ElementName("City") private java.lang.String city; public final static SimpleProperty.String
CITY = new SimpleProperty.String
(Address.class, "City"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: State - *

- * - * @return State of the address. + * Constraints: Nullable

Original property name from the Odata EDM: State

+ * + * @return + * State of the address. */ @Nullable - @ElementName( "State" ) + @ElementName("State") private java.lang.String state; - public final static SimpleProperty.String
STATE = - new SimpleProperty.String
(Address.class, "State"); + public final static SimpleProperty.String
STATE = new SimpleProperty.String
(Address.class, "State"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Country - *

- * - * @return The country contained in this {@link VdmEntity}. + * Constraints: Nullable

Original property name from the Odata EDM: Country

+ * + * @return + * The country contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Country" ) + @ElementName("Country") private java.lang.String country; - public final static SimpleProperty.String
COUNTRY = - new SimpleProperty.String
(Address.class, "Country"); + public final static SimpleProperty.String
COUNTRY = new SimpleProperty.String
(Address.class, "Country"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: PostalCode - *

- * - * @return The postalCode contained in this {@link VdmEntity}. + * Constraints: Nullable

Original property name from the Odata EDM: PostalCode

+ * + * @return + * The postalCode contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "PostalCode" ) + @ElementName("PostalCode") private java.lang.String postalCode; - public final static SimpleProperty.String
POSTAL_CODE = - new SimpleProperty.String
(Address.class, "PostalCode"); + public final static SimpleProperty.String
POSTAL_CODE = new SimpleProperty.String
(Address.class, "PostalCode"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Latitude - *

- * - * @return The latitude contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

+ * + * @return + * The latitude contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Latitude" ) + @ElementName("Latitude") private Double latitude; - public final static SimpleProperty.NumericDecimal
LATITUDE = - new SimpleProperty.NumericDecimal
(Address.class, "Latitude"); + public final static SimpleProperty.NumericDecimal
LATITUDE = new SimpleProperty.NumericDecimal
(Address.class, "Latitude"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Longitude - *

- * - * @return The longitude contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

+ * + * @return + * The longitude contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Longitude" ) + @ElementName("Longitude") private Double longitude; - public final static SimpleProperty.NumericDecimal
LONGITUDE = - new SimpleProperty.NumericDecimal
(Address.class, "Longitude"); + public final static SimpleProperty.NumericDecimal
LONGITUDE = new SimpleProperty.NumericDecimal
(Address.class, "Longitude"); @Nonnull @Override - public Class
getType() - { + public Class
getType() { return Address.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * ID of the address. + * ID of the address. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Street - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: Street

+ * * @param street - * Street of the address. + * Street of the address. */ - public void setStreet( @Nullable final java.lang.String street ) - { + public void setStreet( + @Nullable + final java.lang.String street) { rememberChangedField("Street", this.street); this.street = street; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: City - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: City

+ * * @param city - * City of the address. + * City of the address. */ - public void setCity( @Nullable final java.lang.String city ) - { + public void setCity( + @Nullable + final java.lang.String city) { rememberChangedField("City", this.city); this.city = city; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: State - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: State

+ * * @param state - * State of the address. + * State of the address. */ - public void setState( @Nullable final java.lang.String state ) - { + public void setState( + @Nullable + final java.lang.String state) { rememberChangedField("State", this.state); this.state = state; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Country - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: Country

+ * * @param country - * The country to set. + * The country to set. */ - public void setCountry( @Nullable final java.lang.String country ) - { + public void setCountry( + @Nullable + final java.lang.String country) { rememberChangedField("Country", this.country); this.country = country; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: PostalCode - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: PostalCode

+ * * @param postalCode - * The postalCode to set. + * The postalCode to set. */ - public void setPostalCode( @Nullable final java.lang.String postalCode ) - { + public void setPostalCode( + @Nullable + final java.lang.String postalCode) { rememberChangedField("PostalCode", this.postalCode); this.postalCode = postalCode; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Latitude - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

+ * * @param latitude - * The latitude to set. + * The latitude to set. */ - public void setLatitude( @Nullable final Double latitude ) - { + public void setLatitude( + @Nullable + final Double latitude) { rememberChangedField("Latitude", this.latitude); this.latitude = latitude; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Longitude - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

+ * * @param longitude - * The longitude to set. + * The longitude to set. */ - public void setLongitude( @Nullable final Double longitude ) - { + public void setLongitude( + @Nullable + final Double longitude) { rememberChangedField("Longitude", this.longitude); this.longitude = longitude; } @Override - protected java.lang.String getEntityCollection() - { + protected java.lang.String getEntityCollection() { return "Addresses"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -301,8 +257,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Street", getStreet()); @@ -316,56 +271,55 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Street") ) { + if (cloudSdkValues.containsKey("Street")) { final Object cloudSdkValue = cloudSdkValues.remove("Street"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getStreet())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getStreet()))) { setStreet(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("City") ) { + if (cloudSdkValues.containsKey("City")) { final Object cloudSdkValue = cloudSdkValues.remove("City"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCity())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCity()))) { setCity(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("State") ) { + if (cloudSdkValues.containsKey("State")) { final Object cloudSdkValue = cloudSdkValues.remove("State"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getState())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getState()))) { setState(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Country") ) { + if (cloudSdkValues.containsKey("Country")) { final Object cloudSdkValue = cloudSdkValues.remove("Country"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCountry())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCountry()))) { setCountry(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("PostalCode") ) { + if (cloudSdkValues.containsKey("PostalCode")) { final Object cloudSdkValue = cloudSdkValues.remove("PostalCode"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getPostalCode())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getPostalCode()))) { setPostalCode(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Latitude") ) { + if (cloudSdkValues.containsKey("Latitude")) { final Object cloudSdkValue = cloudSdkValues.remove("Latitude"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getLatitude())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getLatitude()))) { setLatitude(((Double) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Longitude") ) { + if (cloudSdkValues.containsKey("Longitude")) { final Object cloudSdkValue = cloudSdkValues.remove("Longitude"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getLongitude())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getLongitude()))) { setLongitude(((Double) cloudSdkValue)); } } @@ -380,8 +334,7 @@ protected void fromMap( final Map inputValues ) } @Override - protected java.lang.String getDefaultServicePath() - { + protected java.lang.String getDefaultServicePath() { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java index 9811f9033..51b14ece7 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java @@ -7,10 +7,8 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -21,7 +19,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -33,179 +30,153 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Customer - *

- * + *

Original entity name from the Odata EDM: Customer

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class Customer extends VdmEntity implements VdmEntitySet +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class Customer + extends VdmEntity + implements VdmEntitySet { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Customer"; /** * Selector for all available fields of Customer. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return ID of the customer. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * ID of the customer. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(Customer.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Customer.class, "Id"); /** - * Constraints: Not nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- * - * @return Name of the customer. + * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

+ * + * @return + * Name of the customer. */ @Nullable - @ElementName( "Name" ) + @ElementName("Name") private java.lang.String name; - public final static SimpleProperty.String NAME = - new SimpleProperty.String(Customer.class, "Name"); + public final static SimpleProperty.String NAME = new SimpleProperty.String(Customer.class, "Name"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Email - *

- * - * @return Email address of the customer. + * Constraints: Nullable

Original property name from the Odata EDM: Email

+ * + * @return + * Email address of the customer. */ @Nullable - @ElementName( "Email" ) + @ElementName("Email") private java.lang.String email; - public final static SimpleProperty.String EMAIL = - new SimpleProperty.String(Customer.class, "Email"); + public final static SimpleProperty.String EMAIL = new SimpleProperty.String(Customer.class, "Email"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: AddressId - *

- * - * @return ID of the customer's address. + * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

+ * + * @return + * ID of the customer's address. */ @Nullable - @ElementName( "AddressId" ) + @ElementName("AddressId") private Integer addressId; - public final static SimpleProperty.NumericInteger ADDRESS_ID = - new SimpleProperty.NumericInteger(Customer.class, "AddressId"); + public final static SimpleProperty.NumericInteger ADDRESS_ID = new SimpleProperty.NumericInteger(Customer.class, "AddressId"); /** * Navigation property Address for Customer to single Address. - * + * */ - @ElementName( "Address" ) + @ElementName("Address") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Address toAddress; /** * Use with available request builders to apply the Address navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( - Customer.class, - "Address", - Address.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Customer.class, "Address", Address.class); @Nonnull @Override - public Class getType() - { + public Class getType() { return Customer.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * ID of the customer. + * ID of the customer. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- * + * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

+ * * @param name - * Name of the customer. + * Name of the customer. */ - public void setName( @Nullable final java.lang.String name ) - { + public void setName( + @Nullable + final java.lang.String name) { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Email - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: Email

+ * * @param email - * Email address of the customer. + * Email address of the customer. */ - public void setEmail( @Nullable final java.lang.String email ) - { + public void setEmail( + @Nullable + final java.lang.String email) { rememberChangedField("Email", this.email); this.email = email; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: AddressId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

+ * * @param addressId - * ID of the customer's address. + * ID of the customer's address. */ - public void setAddressId( @Nullable final Integer addressId ) - { + public void setAddressId( + @Nullable + final Integer addressId) { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected java.lang.String getEntityCollection() - { + protected java.lang.String getEntityCollection() { return "Customers"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -213,8 +184,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -224,32 +194,31 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Name") ) { + if (cloudSdkValues.containsKey("Name")) { final Object cloudSdkValue = cloudSdkValues.remove("Name"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getName())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getName()))) { setName(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Email") ) { + if (cloudSdkValues.containsKey("Email")) { final Object cloudSdkValue = cloudSdkValues.remove("Email"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getEmail())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getEmail()))) { setEmail(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("AddressId") ) { + if (cloudSdkValues.containsKey("AddressId")) { final Object cloudSdkValue = cloudSdkValues.remove("AddressId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getAddressId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getAddressId()))) { setAddressId(((Integer) cloudSdkValue)); } } @@ -259,14 +228,14 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("Address") ) { + if ((cloudSdkValues).containsKey("Address")) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if( cloudSdkValue instanceof Map ) { - if( toAddress == null ) { + if (cloudSdkValue instanceof Map) { + if (toAddress == null) { toAddress = new Address(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -275,156 +244,121 @@ protected void fromMap( final Map inputValues ) } @Override - protected java.lang.String getDefaultServicePath() - { + protected java.lang.String getDefaultServicePath() { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toAddress != null ) { + if (toAddress!= null) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property - * Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. *

- * If the navigation property for an entity Customer has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Address is already loaded, the result will contain the - * Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Customer has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() - { + public Option
getAddressIfPresent() { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress( final Address cloudSdkValue ) - { + public void setAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; } /** - * Action that can be applied to any entity object of this class. - *

- * + * Action that can be applied to any entity object of this class.

+ * * @param quantity - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: Quantity - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: Quantity

* @param productId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ProductId - *

- * @return Action object prepared with the given parameters to be applied to any entity object of this class. - *

- * To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. + * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

+ * @return + * Action object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. */ @Nonnull - public static - com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle - orderProduct( @Nonnull final Integer productId, @Nonnull final Integer quantity ) - { + public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle orderProduct( + @Nonnull + final Integer productId, + @Nonnull + final Integer quantity) { final Map parameters = new HashMap(); parameters.put("ProductId", productId); parameters.put("Quantity", quantity); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle( - Customer.class, - Void.class, - "com.sap.cloud.sdk.store.grocery.OrderProduct", - parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle(Customer.class, Void.class, "com.sap.cloud.sdk.store.grocery.OrderProduct", parameters); } /** - * Action that can be applied to any entity object of this class. - *

- * + * Action that can be applied to any entity object of this class.

+ * * @param receipts - * Constraints: Nullable - *

- * Original parameter name from the Odata EDM: Receipts - *

+ * Constraints: Nullable

Original parameter name from the Odata EDM: Receipts

* @param productCategories - * Constraints: Nullable - *

- * Original parameter name from the Odata EDM: ProductCategories - *

+ * Constraints: Nullable

Original parameter name from the Odata EDM: ProductCategories

* @param dateRange - * Constraints: Nullable - *

- * Original parameter name from the Odata EDM: DateRange - *

+ * Constraints: Nullable

Original parameter name from the Odata EDM: DateRange

* @param productNames - * Constraints: Nullable - *

- * Original parameter name from the Odata EDM: ProductNames - *

- * @return Action object prepared with the given parameters to be applied to any entity object of this class. - *

- * To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. + * Constraints: Nullable

Original parameter name from the Odata EDM: ProductNames

+ * @return + * Action object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. */ @Nonnull - public static - com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection - filterPurchaseHistory( - @Nullable final Collection receipts, - @Nullable final Collection productNames, - @Nullable final Collection productCategories, - @Nullable final DateRange dateRange ) - { + public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection filterPurchaseHistory( + @Nullable + final Collection receipts, + @Nullable + final Collection productNames, + @Nullable + final Collection productCategories, + @Nullable + final DateRange dateRange) { final Map parameters = new HashMap(); parameters.put("Receipts", receipts); parameters.put("ProductNames", productNames); parameters.put("ProductCategories", productCategories); parameters.put("DateRange", dateRange); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection( - Customer.class, - PurchaseHistoryItem.class, - "com.sap.cloud.sdk.store.grocery.FilterPurchaseHistory", - parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection(Customer.class, PurchaseHistoryItem.class, "com.sap.cloud.sdk.store.grocery.FilterPurchaseHistory", parameters); } + /** * Helper class to allow for fluent creation of Customer instances. - * + * */ - public final static class CustomerBuilder - { + public final static class CustomerBuilder { private Address toAddress; - private Customer.CustomerBuilder toAddress( final Address cloudSdkValue ) - { + private Customer.CustomerBuilder toAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Customer to single Address. - * + * * @param cloudSdkValue - * The Address to build this Customer with. - * @return This Builder to allow for a fluent interface. + * The Address to build this Customer with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Customer.CustomerBuilder address( final Address cloudSdkValue ) - { + public Customer.CustomerBuilder address(final Address cloudSdkValue) { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java index 22dcc966c..bd2392112 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java @@ -6,10 +6,8 @@ import java.time.OffsetDateTime; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -17,7 +15,6 @@ import com.sap.cloud.sdk.datamodel.odata.client.request.ODataEntityKey; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmComplex; import com.sap.cloud.sdk.result.ElementName; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,64 +23,56 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original complex type name from the Odata EDM: DateRange - *

- * + *

Original complex type name from the Odata EDM: DateRange

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class DateRange extends VdmComplex +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class DateRange + extends VdmComplex { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.DateRange"; /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Start - *

- * - * @return The start contained in this {@link VdmComplex}. + * Constraints: Not nullable

Original property name from the Odata EDM: Start

+ * + * @return + * The start contained in this {@link VdmComplex}. */ @Nullable - @ElementName( "Start" ) + @ElementName("Start") private OffsetDateTime start; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime START = - new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "Start"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime START = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "Start"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: End - *

- * - * @return The end contained in this {@link VdmComplex}. + * Constraints: Not nullable

Original property name from the Odata EDM: End

+ * + * @return + * The end contained in this {@link VdmComplex}. */ @Nullable - @ElementName( "End" ) + @ElementName("End") private OffsetDateTime end; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime END = - new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "End"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime END = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "End"); @Nonnull @Override - public Class getType() - { + public Class getType() { return DateRange.class; } @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Start", getStart()); cloudSdkValues.put("End", getEnd()); @@ -91,20 +80,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Start") ) { + if (cloudSdkValues.containsKey("Start")) { final Object cloudSdkValue = cloudSdkValues.remove("Start"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getStart())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getStart()))) { setStart(((OffsetDateTime) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("End") ) { + if (cloudSdkValues.containsKey("End")) { final Object cloudSdkValue = cloudSdkValues.remove("End"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getEnd())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getEnd()))) { setEnd(((OffsetDateTime) cloudSdkValue)); } } @@ -120,38 +108,33 @@ protected void fromMap( final Map inputValues ) @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); return entityKey; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Start - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Start

+ * * @param start - * The start to set. + * The start to set. */ - public void setStart( @Nullable final OffsetDateTime start ) - { + public void setStart( + @Nullable + final OffsetDateTime start) { rememberChangedField("Start", this.start); this.start = start; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: End - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: End

+ * * @param end - * The end to set. + * The end to set. */ - public void setEnd( @Nullable final OffsetDateTime end ) - { + public void setEnd( + @Nullable + final OffsetDateTime end) { rememberChangedField("End", this.end); this.end = end; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java index 83462ab21..6f1e02def 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -17,7 +15,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntity; import com.sap.cloud.sdk.result.ElementName; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -26,105 +23,92 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: FloorPlan - *

- * + *

Original entity name from the Odata EDM: FloorPlan

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class FloorPlan extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class FloorPlan + extends VdmEntity { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.FloorPlan"; /** * Selector for all available fields of FloorPlan. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(FloorPlan.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(FloorPlan.class, "Id"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ImageUri - *

- * - * @return The imageUri contained in this {@link VdmEntity}. + * Constraints: Nullable

Original property name from the Odata EDM: ImageUri

+ * + * @return + * The imageUri contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "ImageUri" ) + @ElementName("ImageUri") private java.lang.String imageUri; - public final static SimpleProperty.String IMAGE_URI = - new SimpleProperty.String(FloorPlan.class, "ImageUri"); + public final static SimpleProperty.String IMAGE_URI = new SimpleProperty.String(FloorPlan.class, "ImageUri"); @Nonnull @Override - public Class getType() - { + public Class getType() { return FloorPlan.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ImageUri - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ImageUri

+ * * @param imageUri - * The imageUri to set. + * The imageUri to set. */ - public void setImageUri( @Nullable final java.lang.String imageUri ) - { + public void setImageUri( + @Nullable + final java.lang.String imageUri) { rememberChangedField("ImageUri", this.imageUri); this.imageUri = imageUri; } @Override - protected java.lang.String getEntityCollection() - { + protected java.lang.String getEntityCollection() { return "FloorPlan"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -132,8 +116,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("ImageUri", getImageUri()); @@ -141,20 +124,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("ImageUri") ) { + if (cloudSdkValues.containsKey("ImageUri")) { final Object cloudSdkValue = cloudSdkValues.remove("ImageUri"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getImageUri())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getImageUri()))) { setImageUri(((java.lang.String) cloudSdkValue)); } } @@ -170,8 +152,7 @@ protected void fromMap( final Map inputValues ) @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); return cloudSdkValues; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java index dd6fd2c42..c31bb69d6 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java @@ -8,10 +8,8 @@ import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -22,7 +20,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -31,161 +28,139 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: OpeningHours - *

- * + *

Original entity name from the Odata EDM: OpeningHours

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class OpeningHours extends VdmEntity implements VdmEntitySet +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class OpeningHours + extends VdmEntity + implements VdmEntitySet { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.OpeningHours"; /** * Selector for all available fields of OpeningHours. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(OpeningHours.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(OpeningHours.class, "Id"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: DayOfWeek - *

- * - * @return The dayOfWeek contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

+ * + * @return + * The dayOfWeek contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "DayOfWeek" ) + @ElementName("DayOfWeek") private Integer dayOfWeek; - public final static SimpleProperty.NumericInteger DAY_OF_WEEK = - new SimpleProperty.NumericInteger(OpeningHours.class, "DayOfWeek"); + public final static SimpleProperty.NumericInteger DAY_OF_WEEK = new SimpleProperty.NumericInteger(OpeningHours.class, "DayOfWeek"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: OpenTime - *

- * - * @return The openTime contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

+ * + * @return + * The openTime contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "OpenTime" ) + @ElementName("OpenTime") private LocalTime openTime; - public final static SimpleProperty.Time OPEN_TIME = - new SimpleProperty.Time(OpeningHours.class, "OpenTime"); + public final static SimpleProperty.Time OPEN_TIME = new SimpleProperty.Time(OpeningHours.class, "OpenTime"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CloseTime - *

- * - * @return The closeTime contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

+ * + * @return + * The closeTime contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "CloseTime" ) + @ElementName("CloseTime") private LocalTime closeTime; - public final static SimpleProperty.Time CLOSE_TIME = - new SimpleProperty.Time(OpeningHours.class, "CloseTime"); + public final static SimpleProperty.Time CLOSE_TIME = new SimpleProperty.Time(OpeningHours.class, "CloseTime"); @Nonnull @Override - public Class getType() - { + public Class getType() { return OpeningHours.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: DayOfWeek - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

+ * * @param dayOfWeek - * The dayOfWeek to set. + * The dayOfWeek to set. */ - public void setDayOfWeek( @Nullable final Integer dayOfWeek ) - { + public void setDayOfWeek( + @Nullable + final Integer dayOfWeek) { rememberChangedField("DayOfWeek", this.dayOfWeek); this.dayOfWeek = dayOfWeek; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: OpenTime - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

+ * * @param openTime - * The openTime to set. + * The openTime to set. */ - public void setOpenTime( @Nullable final LocalTime openTime ) - { + public void setOpenTime( + @Nullable + final LocalTime openTime) { rememberChangedField("OpenTime", this.openTime); this.openTime = openTime; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CloseTime - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

+ * * @param closeTime - * The closeTime to set. + * The closeTime to set. */ - public void setCloseTime( @Nullable final LocalTime closeTime ) - { + public void setCloseTime( + @Nullable + final LocalTime closeTime) { rememberChangedField("CloseTime", this.closeTime); this.closeTime = closeTime; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "OpeningHours"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -193,8 +168,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("DayOfWeek", getDayOfWeek()); @@ -204,32 +178,31 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("DayOfWeek") ) { + if (cloudSdkValues.containsKey("DayOfWeek")) { final Object cloudSdkValue = cloudSdkValues.remove("DayOfWeek"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getDayOfWeek())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getDayOfWeek()))) { setDayOfWeek(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("OpenTime") ) { + if (cloudSdkValues.containsKey("OpenTime")) { final Object cloudSdkValue = cloudSdkValues.remove("OpenTime"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getOpenTime())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getOpenTime()))) { setOpenTime(((LocalTime) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("CloseTime") ) { + if (cloudSdkValues.containsKey("CloseTime")) { final Object cloudSdkValue = cloudSdkValues.remove("CloseTime"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCloseTime())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCloseTime()))) { setCloseTime(((LocalTime) cloudSdkValue)); } } @@ -244,36 +217,25 @@ protected void fromMap( final Map inputValues ) } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } /** - * Function that can be applied to any entity object of this class. - *

- * + * Function that can be applied to any entity object of this class.

+ * * @param dateTime - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: DateTime - *

- * @return Function object prepared with the given parameters to be applied to any entity object of this class. - *

- * To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. + * Constraints: Not nullable

Original parameter name from the Odata EDM: DateTime

+ * @return + * Function object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. */ @Nonnull - public static - com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle - isStoreOpen( @Nonnull final OffsetDateTime dateTime ) - { + public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle isStoreOpen( + @Nonnull + final OffsetDateTime dateTime) { final Map parameters = new HashMap(); parameters.put("DateTime", dateTime); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle( - OpeningHours.class, - Boolean.class, - "com.sap.cloud.sdk.store.grocery.IsStoreOpen", - parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle(OpeningHours.class, Boolean.class, "com.sap.cloud.sdk.store.grocery.IsStoreOpen", parameters); } } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java index 0ca452578..0ff2a903b 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java @@ -8,10 +8,8 @@ import java.util.LinkedList; import java.util.Map; import java.util.Objects; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -23,7 +21,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEnum; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -35,252 +32,213 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Product - *

- * + *

Original entity name from the Odata EDM: Product

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class Product extends VdmEntity implements VdmEntitySet +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class Product + extends VdmEntity + implements VdmEntitySet { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Product"; /** * Selector for all available fields of Product. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return ID of the product. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * ID of the product. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(Product.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Product.class, "Id"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Name - *

- * - * @return Name of the product. + * Constraints: Nullable

Original property name from the Odata EDM: Name

+ * + * @return + * Name of the product. */ @Nullable - @ElementName( "Name" ) + @ElementName("Name") private java.lang.String name; public final static SimpleProperty.String NAME = new SimpleProperty.String(Product.class, "Name"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ShelfId - *

- * - * @return The shelfId contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

+ * + * @return + * The shelfId contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "ShelfId" ) + @ElementName("ShelfId") private Integer shelfId; - public final static SimpleProperty.NumericInteger SHELF_ID = - new SimpleProperty.NumericInteger(Product.class, "ShelfId"); + public final static SimpleProperty.NumericInteger SHELF_ID = new SimpleProperty.NumericInteger(Product.class, "ShelfId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: VendorId - *

- * - * @return ID of the vendor. + * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

+ * + * @return + * ID of the vendor. */ @Nullable - @ElementName( "VendorId" ) + @ElementName("VendorId") private Integer vendorId; - public final static SimpleProperty.NumericInteger VENDOR_ID = - new SimpleProperty.NumericInteger(Product.class, "VendorId"); + public final static SimpleProperty.NumericInteger VENDOR_ID = new SimpleProperty.NumericInteger(Product.class, "VendorId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Price - *

- * - * @return Price of the product. + * Constraints: Not nullable

Original property name from the Odata EDM: Price

+ * + * @return + * Price of the product. */ @Nullable - @ElementName( "Price" ) + @ElementName("Price") private BigDecimal price; - public final static SimpleProperty.NumericDecimal PRICE = - new SimpleProperty.NumericDecimal(Product.class, "Price"); + public final static SimpleProperty.NumericDecimal PRICE = new SimpleProperty.NumericDecimal(Product.class, "Price"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Categories - *

- * - * @return The categories contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: Categories

+ * + * @return + * The categories contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Categories" ) + @ElementName("Categories") private java.util.Collection categories; - public final static SimpleProperty.Collection CATEGORIES = - new SimpleProperty.Collection(Product.class, "Categories", ProductCategory.class); + public final static SimpleProperty.Collection CATEGORIES = new SimpleProperty.Collection(Product.class, "Categories", ProductCategory.class); /** * Navigation property Vendor for Product to single Vendor. - * + * */ - @ElementName( "Vendor" ) + @ElementName("Vendor") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Vendor toVendor; /** * Navigation property Shelf for Product to single Shelf. - * + * */ - @ElementName( "Shelf" ) + @ElementName("Shelf") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Shelf toShelf; /** * Use with available request builders to apply the Vendor navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_VENDOR = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( - Product.class, - "Vendor", - Vendor.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_VENDOR = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Product.class, "Vendor", Vendor.class); /** * Use with available request builders to apply the Shelf navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_SHELF = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( - Product.class, - "Shelf", - Shelf.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_SHELF = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Product.class, "Shelf", Shelf.class); @Nonnull @Override - public Class getType() - { + public Class getType() { return Product.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * ID of the product. + * ID of the product. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: Name - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: Name

+ * * @param name - * Name of the product. + * Name of the product. */ - public void setName( @Nullable final java.lang.String name ) - { + public void setName( + @Nullable + final java.lang.String name) { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ShelfId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

+ * * @param shelfId - * The shelfId to set. + * The shelfId to set. */ - public void setShelfId( @Nullable final Integer shelfId ) - { + public void setShelfId( + @Nullable + final Integer shelfId) { rememberChangedField("ShelfId", this.shelfId); this.shelfId = shelfId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: VendorId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

+ * * @param vendorId - * ID of the vendor. + * ID of the vendor. */ - public void setVendorId( @Nullable final Integer vendorId ) - { + public void setVendorId( + @Nullable + final Integer vendorId) { rememberChangedField("VendorId", this.vendorId); this.vendorId = vendorId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Price - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Price

+ * * @param price - * Price of the product. + * Price of the product. */ - public void setPrice( @Nullable final BigDecimal price ) - { + public void setPrice( + @Nullable + final BigDecimal price) { rememberChangedField("Price", this.price); this.price = price; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Categories - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Categories

+ * * @param categories - * The categories to set. + * The categories to set. */ - public void setCategories( @Nullable final java.util.Collection categories ) - { + public void setCategories( + @Nullable + final java.util.Collection categories) { rememberChangedField("Categories", this.categories); this.categories = categories; } @Override - protected java.lang.String getEntityCollection() - { + protected java.lang.String getEntityCollection() { return "Products"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -288,8 +246,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -301,56 +258,54 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Name") ) { + if (cloudSdkValues.containsKey("Name")) { final Object cloudSdkValue = cloudSdkValues.remove("Name"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getName())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getName()))) { setName(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("ShelfId") ) { + if (cloudSdkValues.containsKey("ShelfId")) { final Object cloudSdkValue = cloudSdkValues.remove("ShelfId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getShelfId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getShelfId()))) { setShelfId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("VendorId") ) { + if (cloudSdkValues.containsKey("VendorId")) { final Object cloudSdkValue = cloudSdkValues.remove("VendorId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getVendorId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getVendorId()))) { setVendorId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Price") ) { + if (cloudSdkValues.containsKey("Price")) { final Object cloudSdkValue = cloudSdkValues.remove("Price"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getPrice())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getPrice()))) { setPrice(((BigDecimal) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Categories") ) { + if (cloudSdkValues.containsKey("Categories")) { final Object cloudSdkValue = cloudSdkValues.remove("Categories"); - if( (cloudSdkValue == null) && (getCategories() != null) ) { + if ((cloudSdkValue == null)&&(getCategories()!= null)) { setCategories(null); } - if( cloudSdkValue instanceof Iterable ) { + if (cloudSdkValue instanceof Iterable) { final LinkedList categories = new LinkedList(); - for( Object cloudSdkItem : ((Iterable) cloudSdkValue) ) { - if( cloudSdkItem instanceof java.lang.String ) { - final ProductCategory enumConstant = - VdmEnum.getConstant(ProductCategory.class, ((java.lang.String) cloudSdkItem)); + for (Object cloudSdkItem: ((Iterable ) cloudSdkValue)) { + if (cloudSdkItem instanceof java.lang.String) { + final ProductCategory enumConstant = VdmEnum.getConstant(ProductCategory.class, ((java.lang.String) cloudSdkItem)); categories.add(enumConstant); } } - if( !Objects.equals(categories, getCategories()) ) { + if (!Objects.equals(categories, getCategories())) { setCategories(categories); } } @@ -361,25 +316,25 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("Vendor") ) { + if ((cloudSdkValues).containsKey("Vendor")) { final Object cloudSdkValue = (cloudSdkValues).remove("Vendor"); - if( cloudSdkValue instanceof Map ) { - if( toVendor == null ) { + if (cloudSdkValue instanceof Map) { + if (toVendor == null) { toVendor = new Vendor(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toVendor.fromMap(inputMap); } } - if( (cloudSdkValues).containsKey("Shelf") ) { + if ((cloudSdkValues).containsKey("Shelf")) { final Object cloudSdkValue = (cloudSdkValues).remove("Shelf"); - if( cloudSdkValue instanceof Map ) { - if( toShelf == null ) { + if (cloudSdkValue instanceof Map) { + if (toShelf == null) { toShelf = new Shelf(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toShelf.fromMap(inputMap); } } @@ -388,124 +343,112 @@ protected void fromMap( final Map inputValues ) } @Override - protected java.lang.String getDefaultServicePath() - { + protected java.lang.String getDefaultServicePath() { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toVendor != null ) { + if (toVendor!= null) { (cloudSdkValues).put("Vendor", toVendor); } - if( toShelf != null ) { + if (toShelf!= null) { (cloudSdkValues).put("Shelf", toShelf); } return cloudSdkValues; } /** - * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property - * Vendor. + * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property Vendor. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Vendor is already loaded, the result will contain the - * Vendor entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Vendor is already loaded, the result will contain the Vendor entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getVendorIfPresent() - { + public Option getVendorIfPresent() { return Option.of(toVendor); } /** * Overwrites the associated Vendor entity for the loaded navigation property Vendor. - * + * * @param cloudSdkValue - * New Vendor entity. + * New Vendor entity. */ - public void setVendor( final Vendor cloudSdkValue ) - { + public void setVendor(final Vendor cloudSdkValue) { toVendor = cloudSdkValue; } /** - * Retrieval of associated Shelf entity (one to one). This corresponds to the OData navigation property - * Shelf. + * Retrieval of associated Shelf entity (one to one). This corresponds to the OData navigation property Shelf. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Shelf is already loaded, the result will contain the - * Shelf entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Shelf is already loaded, the result will contain the Shelf entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getShelfIfPresent() - { + public Option getShelfIfPresent() { return Option.of(toShelf); } /** * Overwrites the associated Shelf entity for the loaded navigation property Shelf. - * + * * @param cloudSdkValue - * New Shelf entity. + * New Shelf entity. */ - public void setShelf( final Shelf cloudSdkValue ) - { + public void setShelf(final Shelf cloudSdkValue) { toShelf = cloudSdkValue; } + /** * Helper class to allow for fluent creation of Product instances. - * + * */ - public final static class ProductBuilder - { + public final static class ProductBuilder { private Vendor toVendor; private Shelf toShelf; - private Product.ProductBuilder toVendor( final Vendor cloudSdkValue ) - { + private Product.ProductBuilder toVendor(final Vendor cloudSdkValue) { toVendor = cloudSdkValue; return this; } /** * Navigation property Vendor for Product to single Vendor. - * + * * @param cloudSdkValue - * The Vendor to build this Product with. - * @return This Builder to allow for a fluent interface. + * The Vendor to build this Product with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder vendor( final Vendor cloudSdkValue ) - { + public Product.ProductBuilder vendor(final Vendor cloudSdkValue) { return toVendor(cloudSdkValue); } - private Product.ProductBuilder toShelf( final Shelf cloudSdkValue ) - { + private Product.ProductBuilder toShelf(final Shelf cloudSdkValue) { toShelf = cloudSdkValue; return this; } /** * Navigation property Shelf for Product to single Shelf. - * + * * @param cloudSdkValue - * The Shelf to build this Product with. - * @return This Builder to allow for a fluent interface. + * The Shelf to build this Product with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder shelf( final Shelf cloudSdkValue ) - { + public Product.ProductBuilder shelf(final Shelf cloudSdkValue) { return toShelf(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java index e02d5b370..c49af28dd 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java @@ -12,72 +12,69 @@ import com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmEnumSerializer; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEnum; + /** - *

- * Original enum type name from the Odata EDM: ProductCategory - *

- * + *

Original enum type name from the Odata EDM: ProductCategory

+ * */ -@JsonAdapter( GsonVdmAdapterFactory.class ) -@JsonSerialize( using = JacksonVdmEnumSerializer.class ) -@JsonDeserialize( using = JacksonVdmEnumDeserializer.class ) -public enum ProductCategory implements VdmEnum +@JsonAdapter(GsonVdmAdapterFactory.class) +@JsonSerialize(using = JacksonVdmEnumSerializer.class) +@JsonDeserialize(using = JacksonVdmEnumDeserializer.class) +public enum ProductCategory + implements VdmEnum { + /** * Vegetables - * + * */ VEGETABLES("Vegetables", 1L), /** * Fruits - * + * */ FRUITS("Fruits", 2L), /** * Meat - * + * */ MEAT("Meat", 3L), /** * Fish - * + * */ FISH("Fish", 4L), /** * Dairy - * + * */ DAIRY("Dairy", 5L), /** * Beverages - * + * */ BEVERAGES("Beverages", 6L); - private final String name; private final Long value; - private ProductCategory( final String enumName, final Long enumValue ) - { + private ProductCategory(final String enumName, final Long enumValue) { name = enumName; value = enumValue; } @Override - public String getName() - { + public String getName() { return name; } @Override - public Long getValue() - { + public Long getValue() { return value; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java index 426342589..68dfe2adc 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -16,7 +14,6 @@ import com.sap.cloud.sdk.datamodel.odata.client.request.ODataEntityKey; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmComplex; import com.sap.cloud.sdk.result.ElementName; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,68 +22,56 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original complex type name from the Odata EDM: ProductCount - *

- * + *

Original complex type name from the Odata EDM: ProductCount

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class ProductCount extends VdmComplex +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class ProductCount + extends VdmComplex { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.ProductCount"; /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductId - *

- * - * @return The productId contained in this {@link VdmComplex}. + * Constraints: Not nullable

Original property name from the Odata EDM: ProductId

+ * + * @return + * The productId contained in this {@link VdmComplex}. */ @Nullable - @ElementName( "ProductId" ) + @ElementName("ProductId") private Integer productId; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger PRODUCT_ID = - new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger( - ProductCount.class, - "ProductId"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger PRODUCT_ID = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger(ProductCount.class, "ProductId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Quantity - *

- * - * @return The quantity contained in this {@link VdmComplex}. + * Constraints: Not nullable

Original property name from the Odata EDM: Quantity

+ * + * @return + * The quantity contained in this {@link VdmComplex}. */ @Nullable - @ElementName( "Quantity" ) + @ElementName("Quantity") private Integer quantity; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger QUANTITY = - new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger( - ProductCount.class, - "Quantity"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger QUANTITY = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger(ProductCount.class, "Quantity"); @Nonnull @Override - public Class getType() - { + public Class getType() { return ProductCount.class; } @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("ProductId", getProductId()); cloudSdkValues.put("Quantity", getQuantity()); @@ -94,20 +79,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("ProductId") ) { + if (cloudSdkValues.containsKey("ProductId")) { final Object cloudSdkValue = cloudSdkValues.remove("ProductId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getProductId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getProductId()))) { setProductId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Quantity") ) { + if (cloudSdkValues.containsKey("Quantity")) { final Object cloudSdkValue = cloudSdkValues.remove("Quantity"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getQuantity())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getQuantity()))) { setQuantity(((Integer) cloudSdkValue)); } } @@ -123,38 +107,33 @@ protected void fromMap( final Map inputValues ) @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); return entityKey; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ProductId

+ * * @param productId - * The productId to set. + * The productId to set. */ - public void setProductId( @Nullable final Integer productId ) - { + public void setProductId( + @Nullable + final Integer productId) { rememberChangedField("ProductId", this.productId); this.productId = productId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Quantity - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Quantity

+ * * @param quantity - * The quantity to set. + * The quantity to set. */ - public void setQuantity( @Nullable final Integer quantity ) - { + public void setQuantity( + @Nullable + final Integer quantity) { rememberChangedField("Quantity", this.quantity); this.quantity = quantity; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java index 40442d901..ee96a9eae 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -16,7 +14,6 @@ import com.sap.cloud.sdk.datamodel.odata.client.request.ODataEntityKey; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmComplex; import com.sap.cloud.sdk.result.ElementName; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,73 +22,60 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original complex type name from the Odata EDM: PurchaseHistoryItem - *

- * + *

Original complex type name from the Odata EDM: PurchaseHistoryItem

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class PurchaseHistoryItem extends VdmComplex +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class PurchaseHistoryItem + extends VdmComplex { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.PurchaseHistoryItem"; /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ReceiptId - *

- * - * @return The receiptId contained in this {@link VdmComplex}. + * Constraints: Not nullable

Original property name from the Odata EDM: ReceiptId

+ * + * @return + * The receiptId contained in this {@link VdmComplex}. */ @Nullable - @ElementName( "ReceiptId" ) + @ElementName("ReceiptId") private Integer receiptId; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger RECEIPT_ID = - new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger( - PurchaseHistoryItem.class, - "ReceiptId"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger RECEIPT_ID = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger(PurchaseHistoryItem.class, "ReceiptId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductCount - *

- * - * @return The productCount contained in this {@link VdmComplex}. + * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount

+ * + * @return + * The productCount contained in this {@link VdmComplex}. */ @Nullable - @ElementName( "ProductCount" ) + @ElementName("ProductCount") private ProductCount productCount; /** * Use with available request builders to apply the ProductCount complex property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single PRODUCT_COUNT = - new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single( - PurchaseHistoryItem.class, - "ProductCount", - ProductCount.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single PRODUCT_COUNT = new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single(PurchaseHistoryItem.class, "ProductCount", ProductCount.class); @Nonnull @Override - public Class getType() - { + public Class getType() { return PurchaseHistoryItem.class; } @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("ReceiptId", getReceiptId()); cloudSdkValues.put("ProductCount", getProductCount()); @@ -99,31 +83,30 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("ReceiptId") ) { + if (cloudSdkValues.containsKey("ReceiptId")) { final Object cloudSdkValue = cloudSdkValues.remove("ReceiptId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getReceiptId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getReceiptId()))) { setReceiptId(((Integer) cloudSdkValue)); } } } // structured properties { - if( cloudSdkValues.containsKey("ProductCount") ) { + if (cloudSdkValues.containsKey("ProductCount")) { final Object cloudSdkValue = cloudSdkValues.remove("ProductCount"); - if( cloudSdkValue instanceof Map ) { - if( getProductCount() == null ) { + if (cloudSdkValue instanceof Map) { + if (getProductCount() == null) { setProductCount(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); getProductCount().fromMap(inputMap); } - if( (cloudSdkValue == null) && (getProductCount() != null) ) { + if ((cloudSdkValue == null)&&(getProductCount()!= null)) { setProductCount(null); } } @@ -136,38 +119,33 @@ protected void fromMap( final Map inputValues ) @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); return entityKey; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ReceiptId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ReceiptId

+ * * @param receiptId - * The receiptId to set. + * The receiptId to set. */ - public void setReceiptId( @Nullable final Integer receiptId ) - { + public void setReceiptId( + @Nullable + final Integer receiptId) { rememberChangedField("ReceiptId", this.receiptId); this.receiptId = receiptId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductCount - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount

+ * * @param productCount - * The productCount to set. + * The productCount to set. */ - public void setProductCount( @Nullable final ProductCount productCount ) - { + public void setProductCount( + @Nullable + final ProductCount productCount) { rememberChangedField("ProductCount", this.productCount); this.productCount = productCount; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java index 4f3566d6d..b10b79009 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java @@ -7,10 +7,8 @@ import java.math.BigDecimal; import java.util.LinkedList; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -21,7 +19,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -33,221 +30,184 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Receipt - *

- * + *

Original entity name from the Odata EDM: Receipt

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class Receipt extends VdmEntity implements VdmEntitySet +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class Receipt + extends VdmEntity + implements VdmEntitySet { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.Receipt"; /** * Selector for all available fields of Receipt. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return ID of the receipt. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * ID of the receipt. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(Receipt.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Receipt.class, "Id"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CustomerId - *

- * - * @return ID of the customer. + * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

+ * + * @return + * ID of the customer. */ @Nullable - @ElementName( "CustomerId" ) + @ElementName("CustomerId") private Integer customerId; - public final static SimpleProperty.NumericInteger CUSTOMER_ID = - new SimpleProperty.NumericInteger(Receipt.class, "CustomerId"); + public final static SimpleProperty.NumericInteger CUSTOMER_ID = new SimpleProperty.NumericInteger(Receipt.class, "CustomerId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: TotalAmount - *

- * - * @return Total amount of the receipt. + * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

+ * + * @return + * Total amount of the receipt. */ @Nullable - @ElementName( "TotalAmount" ) + @ElementName("TotalAmount") private BigDecimal totalAmount; - public final static SimpleProperty.NumericDecimal TOTAL_AMOUNT = - new SimpleProperty.NumericDecimal(Receipt.class, "TotalAmount"); + public final static SimpleProperty.NumericDecimal TOTAL_AMOUNT = new SimpleProperty.NumericDecimal(Receipt.class, "TotalAmount"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductCounts - *

- * - * @return List of products and quantities associated with the receipt. + * Constraints: Not nullable

Original property name from the Odata EDM: ProductCounts

+ * + * @return + * List of products and quantities associated with the receipt. */ @Nullable - @ElementName( "ProductCounts" ) + @ElementName("ProductCounts") private java.util.Collection productCounts; /** * Use with available request builders to apply the ProductCounts complex property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PRODUCT_COUNTS = - new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection( - Receipt.class, - "ProductCounts", - ProductCount.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PRODUCT_COUNTS = new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection(Receipt.class, "ProductCounts", ProductCount.class); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: properties - *

- * - * @return The properties contained in this {@link VdmEntity}. + * Constraints: Nullable

Original property name from the Odata EDM: properties

+ * + * @return + * The properties contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "properties" ) + @ElementName("properties") private java.util.Collection properties; /** * Use with available request builders to apply the properties complex property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PROPERTIES = - new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection( - Receipt.class, - "properties", - ProductCount.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PROPERTIES = new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection(Receipt.class, "properties", ProductCount.class); /** * Navigation property Customer for Receipt to single Customer. - * + * */ - @ElementName( "Customer" ) + @ElementName("Customer") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Customer toCustomer; /** * Use with available request builders to apply the Customer navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_CUSTOMER = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( - Receipt.class, - "Customer", - Customer.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_CUSTOMER = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Receipt.class, "Customer", Customer.class); @Nonnull @Override - public Class getType() - { + public Class getType() { return Receipt.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * ID of the receipt. + * ID of the receipt. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CustomerId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

+ * * @param customerId - * ID of the customer. + * ID of the customer. */ - public void setCustomerId( @Nullable final Integer customerId ) - { + public void setCustomerId( + @Nullable + final Integer customerId) { rememberChangedField("CustomerId", this.customerId); this.customerId = customerId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: TotalAmount - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

+ * * @param totalAmount - * Total amount of the receipt. + * Total amount of the receipt. */ - public void setTotalAmount( @Nullable final BigDecimal totalAmount ) - { + public void setTotalAmount( + @Nullable + final BigDecimal totalAmount) { rememberChangedField("TotalAmount", this.totalAmount); this.totalAmount = totalAmount; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductCounts - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ProductCounts

+ * * @param productCounts - * List of products and quantities associated with the receipt. + * List of products and quantities associated with the receipt. */ - public void setProductCounts( @Nullable final java.util.Collection productCounts ) - { + public void setProductCounts( + @Nullable + final java.util.Collection productCounts) { rememberChangedField("ProductCounts", this.productCounts); this.productCounts = productCounts; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: properties - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: properties

+ * * @param properties - * The properties to set. + * The properties to set. */ - public void setProperties( @Nullable final java.util.Collection properties ) - { + public void setProperties( + @Nullable + final java.util.Collection properties) { rememberChangedField("properties", this.properties); this.properties = properties; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Receipts"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -255,8 +215,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("CustomerId", getCustomerId()); @@ -267,81 +226,80 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("CustomerId") ) { + if (cloudSdkValues.containsKey("CustomerId")) { final Object cloudSdkValue = cloudSdkValues.remove("CustomerId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCustomerId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCustomerId()))) { setCustomerId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("TotalAmount") ) { + if (cloudSdkValues.containsKey("TotalAmount")) { final Object cloudSdkValue = cloudSdkValues.remove("TotalAmount"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getTotalAmount())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getTotalAmount()))) { setTotalAmount(((BigDecimal) cloudSdkValue)); } } } // structured properties { - if( cloudSdkValues.containsKey("ProductCounts") ) { + if (cloudSdkValues.containsKey("ProductCounts")) { final Object cloudSdkValue = cloudSdkValues.remove("ProductCounts"); - if( cloudSdkValue instanceof Iterable ) { + if (cloudSdkValue instanceof Iterable) { final LinkedList productCounts = new LinkedList(); - for( Object cloudSdkProperties : ((Iterable) cloudSdkValue) ) { - if( cloudSdkProperties instanceof Map ) { + for (Object cloudSdkProperties: ((Iterable ) cloudSdkValue)) { + if (cloudSdkProperties instanceof Map) { final ProductCount cloudSdkItem = new ProductCount(); - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); cloudSdkItem.fromMap(inputMap); productCounts.add(cloudSdkItem); } } setProductCounts(productCounts); } - if( (cloudSdkValue == null) && (getProductCounts() != null) ) { + if ((cloudSdkValue == null)&&(getProductCounts()!= null)) { setProductCounts(null); } } - if( cloudSdkValues.containsKey("properties") ) { + if (cloudSdkValues.containsKey("properties")) { final Object cloudSdkValue = cloudSdkValues.remove("properties"); - if( cloudSdkValue instanceof Iterable ) { + if (cloudSdkValue instanceof Iterable) { final LinkedList properties = new LinkedList(); - for( Object cloudSdkProperties : ((Iterable) cloudSdkValue) ) { - if( cloudSdkProperties instanceof Map ) { + for (Object cloudSdkProperties: ((Iterable ) cloudSdkValue)) { + if (cloudSdkProperties instanceof Map) { final ProductCount cloudSdkItem = new ProductCount(); - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); cloudSdkItem.fromMap(inputMap); properties.add(cloudSdkItem); } } setProperties(properties); } - if( (cloudSdkValue == null) && (getProperties() != null) ) { + if ((cloudSdkValue == null)&&(getProperties()!= null)) { setProperties(null); } } } // navigation properties { - if( (cloudSdkValues).containsKey("Customer") ) { + if ((cloudSdkValues).containsKey("Customer")) { final Object cloudSdkValue = (cloudSdkValues).remove("Customer"); - if( cloudSdkValue instanceof Map ) { - if( toCustomer == null ) { + if (cloudSdkValue instanceof Map) { + if (toCustomer == null) { toCustomer = new Customer(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toCustomer.fromMap(inputMap); } } @@ -350,74 +308,67 @@ protected void fromMap( final Map inputValues ) } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toCustomer != null ) { + if (toCustomer!= null) { (cloudSdkValues).put("Customer", toCustomer); } return cloudSdkValues; } /** - * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property - * Customer. + * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property Customer. *

- * If the navigation property for an entity Receipt has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Customer is already loaded, the result will contain the - * Customer entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Receipt has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Customer is already loaded, the result will contain the Customer entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getCustomerIfPresent() - { + public Option getCustomerIfPresent() { return Option.of(toCustomer); } /** * Overwrites the associated Customer entity for the loaded navigation property Customer. - * + * * @param cloudSdkValue - * New Customer entity. + * New Customer entity. */ - public void setCustomer( final Customer cloudSdkValue ) - { + public void setCustomer(final Customer cloudSdkValue) { toCustomer = cloudSdkValue; } + /** * Helper class to allow for fluent creation of Receipt instances. - * + * */ - public final static class ReceiptBuilder - { + public final static class ReceiptBuilder { private Customer toCustomer; - private Receipt.ReceiptBuilder toCustomer( final Customer cloudSdkValue ) - { + private Receipt.ReceiptBuilder toCustomer(final Customer cloudSdkValue) { toCustomer = cloudSdkValue; return this; } /** * Navigation property Customer for Receipt to single Customer. - * + * * @param cloudSdkValue - * The Customer to build this Receipt with. - * @return This Builder to allow for a fluent interface. + * The Customer to build this Receipt with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Receipt.ReceiptBuilder customer( final Customer cloudSdkValue ) - { + public Receipt.ReceiptBuilder customer(final Customer cloudSdkValue) { return toCustomer(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java index 50371621a..3eb3529b8 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java @@ -7,10 +7,8 @@ import java.util.Collections; import java.util.List; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Lists; @@ -22,7 +20,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -34,140 +31,120 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Shelf - *

- * + *

Original entity name from the Odata EDM: Shelf

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class Shelf extends VdmEntity implements VdmEntitySet +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class Shelf + extends VdmEntity + implements VdmEntitySet { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.Shelf"; /** * Selector for all available fields of Shelf. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(Shelf.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Shelf.class, "Id"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: FloorPlanId - *

- * - * @return The floorPlanId contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

+ * + * @return + * The floorPlanId contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "FloorPlanId" ) + @ElementName("FloorPlanId") private Integer floorPlanId; - public final static SimpleProperty.NumericInteger FLOOR_PLAN_ID = - new SimpleProperty.NumericInteger(Shelf.class, "FloorPlanId"); + public final static SimpleProperty.NumericInteger FLOOR_PLAN_ID = new SimpleProperty.NumericInteger(Shelf.class, "FloorPlanId"); /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * */ - @ElementName( "FloorPlan" ) + @ElementName("FloorPlan") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private FloorPlan toFloorPlan; /** * Navigation property Products for Shelf to multiple Product. - * + * */ - @ElementName( "Products" ) - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @ElementName("Products") + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private List toProducts; /** * Use with available request builders to apply the FloorPlan navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_FLOOR_PLAN = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( - Shelf.class, - "FloorPlan", - FloorPlan.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_FLOOR_PLAN = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Shelf.class, "FloorPlan", FloorPlan.class); /** * Use with available request builders to apply the Products navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection TO_PRODUCTS = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection( - Shelf.class, - "Products", - Product.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection TO_PRODUCTS = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection(Shelf.class, "Products", Product.class); @Nonnull @Override - public Class getType() - { + public Class getType() { return Shelf.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: FloorPlanId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

+ * * @param floorPlanId - * The floorPlanId to set. + * The floorPlanId to set. */ - public void setFloorPlanId( @Nullable final Integer floorPlanId ) - { + public void setFloorPlanId( + @Nullable + final Integer floorPlanId) { rememberChangedField("FloorPlanId", this.floorPlanId); this.floorPlanId = floorPlanId; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Shelves"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -175,8 +152,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("FloorPlanId", getFloorPlanId()); @@ -184,20 +160,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("FloorPlanId") ) { + if (cloudSdkValues.containsKey("FloorPlanId")) { final Object cloudSdkValue = cloudSdkValues.remove("FloorPlanId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getFloorPlanId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getFloorPlanId()))) { setFloorPlanId(((Integer) cloudSdkValue)); } } @@ -207,40 +182,40 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("FloorPlan") ) { + if ((cloudSdkValues).containsKey("FloorPlan")) { final Object cloudSdkValue = (cloudSdkValues).remove("FloorPlan"); - if( cloudSdkValue instanceof Map ) { - if( toFloorPlan == null ) { + if (cloudSdkValue instanceof Map) { + if (toFloorPlan == null) { toFloorPlan = new FloorPlan(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toFloorPlan.fromMap(inputMap); } } - if( (cloudSdkValues).containsKey("Products") ) { + if ((cloudSdkValues).containsKey("Products")) { final Object cloudSdkValue = (cloudSdkValues).remove("Products"); - if( cloudSdkValue instanceof Iterable ) { - if( toProducts == null ) { + if (cloudSdkValue instanceof Iterable) { + if (toProducts == null) { toProducts = Lists.newArrayList(); } else { toProducts = Lists.newArrayList(toProducts); } int i = 0; - for( Object item : ((Iterable) cloudSdkValue) ) { - if( !(item instanceof Map) ) { + for (Object item: ((Iterable ) cloudSdkValue)) { + if (!(item instanceof Map)) { continue; } Product entity; - if( toProducts.size() > i ) { + if (toProducts.size()>i) { entity = toProducts.get(i); } else { entity = new Product(); toProducts.add(entity); } i = (i + 1); - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) item); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) item); entity.fromMap(inputMap); } } @@ -250,86 +225,73 @@ protected void fromMap( final Map inputValues ) } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toFloorPlan != null ) { + if (toFloorPlan!= null) { (cloudSdkValues).put("FloorPlan", toFloorPlan); } - if( toProducts != null ) { + if (toProducts!= null) { (cloudSdkValues).put("Products", toProducts); } return cloudSdkValues; } /** - * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property - * FloorPlan. + * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property FloorPlan. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property FloorPlan is already loaded, the result will contain - * the FloorPlan entity. If not, an Option with result state empty is - * returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property FloorPlan is already loaded, the result will contain the FloorPlan entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getFloorPlanIfPresent() - { + public Option getFloorPlanIfPresent() { return Option.of(toFloorPlan); } /** * Overwrites the associated FloorPlan entity for the loaded navigation property FloorPlan. - * + * * @param cloudSdkValue - * New FloorPlan entity. + * New FloorPlan entity. */ - public void setFloorPlan( final FloorPlan cloudSdkValue ) - { + public void setFloorPlan(final FloorPlan cloudSdkValue) { toFloorPlan = cloudSdkValue; } /** - * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property - * Products. + * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property Products. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Products is already loaded, the result will contain the - * Product entities. If not, an Option with result state empty is returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Products is already loaded, the result will contain the Product entities. If not, an Option with result state empty is returned. */ @Nonnull - public Option> getProductsIfPresent() - { + public Option> getProductsIfPresent() { return Option.of(toProducts); } /** * Overwrites the list of associated Product entities for the loaded navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * * @param cloudSdkValue - * List of Product entities. + * List of Product entities. */ - public void setProducts( @Nonnull final List cloudSdkValue ) - { - if( toProducts == null ) { + public void setProducts( + @Nonnull + final List cloudSdkValue) { + if (toProducts == null) { toProducts = Lists.newArrayList(); } toProducts.clear(); @@ -337,94 +299,77 @@ public void setProducts( @Nonnull final List cloudSdkValue ) } /** - * Adds elements to the list of associated Product entities. This corresponds to the OData navigation - * property Products. + * Adds elements to the list of associated Product entities. This corresponds to the OData navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * * @param entity - * Array of Product entities. + * Array of Product entities. */ - public void addProducts( Product... entity ) - { - if( toProducts == null ) { + public void addProducts(Product... entity) { + if (toProducts == null) { toProducts = Lists.newArrayList(); } toProducts.addAll(Lists.newArrayList(entity)); } /** - * Function that can be applied to any entity object of this class. - *

- * - * @return Function object prepared with the given parameters to be applied to any entity object of this class. - *

- * To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. + * Function that can be applied to any entity object of this class.

+ * + * @return + * Function object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. */ @Nonnull - public static - com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection - getProductQuantities() - { + public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection getProductQuantities() { final Map parameters = Collections.emptyMap(); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection( - Shelf.class, - ProductCount.class, - "com.sap.cloud.sdk.store.grocery.GetProductQuantities", - parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection(Shelf.class, ProductCount.class, "com.sap.cloud.sdk.store.grocery.GetProductQuantities", parameters); } + /** * Helper class to allow for fluent creation of Shelf instances. - * + * */ - public final static class ShelfBuilder - { + public final static class ShelfBuilder { private FloorPlan toFloorPlan; private List toProducts = Lists.newArrayList(); - private Shelf.ShelfBuilder toFloorPlan( final FloorPlan cloudSdkValue ) - { + private Shelf.ShelfBuilder toFloorPlan(final FloorPlan cloudSdkValue) { toFloorPlan = cloudSdkValue; return this; } /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * * @param cloudSdkValue - * The FloorPlan to build this Shelf with. - * @return This Builder to allow for a fluent interface. + * The FloorPlan to build this Shelf with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder floorPlan( final FloorPlan cloudSdkValue ) - { + public Shelf.ShelfBuilder floorPlan(final FloorPlan cloudSdkValue) { return toFloorPlan(cloudSdkValue); } - private Shelf.ShelfBuilder toProducts( final List cloudSdkValue ) - { + private Shelf.ShelfBuilder toProducts(final List cloudSdkValue) { toProducts.addAll(cloudSdkValue); return this; } /** * Navigation property Products for Shelf to multiple Product. - * + * * @param cloudSdkValue - * The Products to build this Shelf with. - * @return This Builder to allow for a fluent interface. + * The Products to build this Shelf with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder products( Product... cloudSdkValue ) - { + public Shelf.ShelfBuilder products(Product... cloudSdkValue) { return toProducts(Lists.newArrayList(cloudSdkValue)); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java index 824e55787..0ef0878d2 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -17,7 +15,6 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntity; import com.sap.cloud.sdk.result.ElementName; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -29,150 +26,129 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Vendor - *

- * + *

Original entity name from the Odata EDM: Vendor

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) -@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) -@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) -public class Vendor extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) +@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) +@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) +public class Vendor + extends VdmEntity { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Vendor"; /** * Selector for all available fields of Vendor. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Id" ) + @ElementName("Id") private Integer id; - public final static SimpleProperty.NumericInteger ID = - new SimpleProperty.NumericInteger(Vendor.class, "Id"); + public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Vendor.class, "Id"); /** - * Constraints: Nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- * - * @return The name contained in this {@link VdmEntity}. + * Constraints: Nullable, Maximum length: 100

Original property name from the Odata EDM: Name

+ * + * @return + * The name contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "Name" ) + @ElementName("Name") private java.lang.String name; public final static SimpleProperty.String NAME = new SimpleProperty.String(Vendor.class, "Name"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: AddressId - *

- * - * @return The addressId contained in this {@link VdmEntity}. + * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

+ * + * @return + * The addressId contained in this {@link VdmEntity}. */ @Nullable - @ElementName( "AddressId" ) + @ElementName("AddressId") private Integer addressId; - public final static SimpleProperty.NumericInteger ADDRESS_ID = - new SimpleProperty.NumericInteger(Vendor.class, "AddressId"); + public final static SimpleProperty.NumericInteger ADDRESS_ID = new SimpleProperty.NumericInteger(Vendor.class, "AddressId"); /** * Navigation property Address for Vendor to single Address. - * + * */ - @ElementName( "Address" ) + @ElementName("Address") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Address toAddress; /** * Use with available request builders to apply the Address navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = - new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( - Vendor.class, - "Address", - Address.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Vendor.class, "Address", Address.class); @Nonnull @Override - public Class getType() - { + public Class getType() { return Vendor.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- * + * Constraints: Nullable, Maximum length: 100

Original property name from the Odata EDM: Name

+ * * @param name - * The name to set. + * The name to set. */ - public void setName( @Nullable final java.lang.String name ) - { + public void setName( + @Nullable + final java.lang.String name) { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: AddressId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

+ * * @param addressId - * The addressId to set. + * The addressId to set. */ - public void setAddressId( @Nullable final Integer addressId ) - { + public void setAddressId( + @Nullable + final Integer addressId) { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected java.lang.String getEntityCollection() - { + protected java.lang.String getEntityCollection() { return "Vendor"; } @Nonnull @Override - protected ODataEntityKey getKey() - { + protected ODataEntityKey getKey() { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -180,8 +156,7 @@ protected ODataEntityKey getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -190,26 +165,25 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { setId(((Integer) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("Name") ) { + if (cloudSdkValues.containsKey("Name")) { final Object cloudSdkValue = cloudSdkValues.remove("Name"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getName())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getName()))) { setName(((java.lang.String) cloudSdkValue)); } } - if( cloudSdkValues.containsKey("AddressId") ) { + if (cloudSdkValues.containsKey("AddressId")) { final Object cloudSdkValue = cloudSdkValues.remove("AddressId"); - if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getAddressId())) ) { + if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getAddressId()))) { setAddressId(((Integer) cloudSdkValue)); } } @@ -219,14 +193,14 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("Address") ) { + if ((cloudSdkValues).containsKey("Address")) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if( cloudSdkValue instanceof Map ) { - if( toAddress == null ) { + if (cloudSdkValue instanceof Map) { + if (toAddress == null) { toAddress = new Address(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -236,67 +210,61 @@ protected void fromMap( final Map inputValues ) @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toAddress != null ) { + if (toAddress!= null) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property - * Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. *

- * If the navigation property for an entity Vendor has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Address is already loaded, the result will contain the - * Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Vendor has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() - { + public Option
getAddressIfPresent() { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress( final Address cloudSdkValue ) - { + public void setAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; } + /** * Helper class to allow for fluent creation of Vendor instances. - * + * */ - public final static class VendorBuilder - { + public final static class VendorBuilder { private Address toAddress; - private Vendor.VendorBuilder toAddress( final Address cloudSdkValue ) - { + private Vendor.VendorBuilder toAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Vendor to single Address. - * + * * @param cloudSdkValue - * The Address to build this Vendor with. - * @return This Builder to allow for a fluent interface. + * The Address to build this Vendor with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Vendor.VendorBuilder address( final Address cloudSdkValue ) - { + public Vendor.VendorBuilder address(final Address cloudSdkValue) { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java index caee3d90b..4dc96381f 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java @@ -6,9 +6,7 @@ import java.util.HashMap; import java.util.Map; - import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder; @@ -23,20 +21,15 @@ import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product; import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf; - import lombok.Getter; + /** - *

Details:

- * - * - * - * - * - *
OData Service:SDK_Grocery_Store
- * + *

Details:

OData Service:SDK_Grocery_Store
+ * */ -public class DefaultSdkGroceryStoreService implements ServiceWithNavigableEntities, SdkGroceryStoreService +public class DefaultSdkGroceryStoreService + implements ServiceWithNavigableEntities, SdkGroceryStoreService { @Nonnull @@ -45,10 +38,9 @@ public class DefaultSdkGroceryStoreService implements ServiceWithNavigableEntiti /** * Creates a service using {@link SdkGroceryStoreService#DEFAULT_SERVICE_PATH} to send the requests. - * + * */ - public DefaultSdkGroceryStoreService() - { + public DefaultSdkGroceryStoreService() { servicePath = SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @@ -56,45 +48,43 @@ public DefaultSdkGroceryStoreService() * Creates a service using the provided service path to send the requests. *

* Used by the fluent {@link #withServicePath(String)} method. - * + * */ - private DefaultSdkGroceryStoreService( @Nonnull final String servicePath ) - { + private DefaultSdkGroceryStoreService( + @Nonnull + final String servicePath) { this.servicePath = servicePath; } @Override @Nonnull - public DefaultSdkGroceryStoreService withServicePath( @Nonnull final String servicePath ) - { + public DefaultSdkGroceryStoreService withServicePath( + @Nonnull + final String servicePath) { return new DefaultSdkGroceryStoreService(servicePath); } @Override @Nonnull - public BatchRequestBuilder batch() - { + public BatchRequestBuilder batch() { return new BatchRequestBuilder(servicePath); } @Override @Nonnull - public GetAllRequestBuilder getAllCustomers() - { + public GetAllRequestBuilder getAllCustomers() { return new GetAllRequestBuilder(servicePath, Customer.class, "Customers"); } @Override @Nonnull - public CountRequestBuilder countCustomers() - { + public CountRequestBuilder countCustomers() { return new CountRequestBuilder(servicePath, Customer.class, "Customers"); } @Override @Nonnull - public GetByKeyRequestBuilder getCustomersByKey( final Integer id ) - { + public GetByKeyRequestBuilder getCustomersByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Customer.class, key, "Customers"); @@ -102,43 +92,43 @@ public GetByKeyRequestBuilder getCustomersByKey( final Integer id ) @Override @Nonnull - public CreateRequestBuilder createCustomers( @Nonnull final Customer customer ) - { + public CreateRequestBuilder createCustomers( + @Nonnull + final Customer customer) { return new CreateRequestBuilder(servicePath, customer, "Customers"); } @Override @Nonnull - public UpdateRequestBuilder updateCustomers( @Nonnull final Customer customer ) - { + public UpdateRequestBuilder updateCustomers( + @Nonnull + final Customer customer) { return new UpdateRequestBuilder(servicePath, customer, "Customers"); } @Override @Nonnull - public DeleteRequestBuilder deleteCustomers( @Nonnull final Customer customer ) - { + public DeleteRequestBuilder deleteCustomers( + @Nonnull + final Customer customer) { return new DeleteRequestBuilder(servicePath, customer, "Customers"); } @Override @Nonnull - public GetAllRequestBuilder getAllProducts() - { + public GetAllRequestBuilder getAllProducts() { return new GetAllRequestBuilder(servicePath, Product.class, "Products"); } @Override @Nonnull - public CountRequestBuilder countProducts() - { + public CountRequestBuilder countProducts() { return new CountRequestBuilder(servicePath, Product.class, "Products"); } @Override @Nonnull - public GetByKeyRequestBuilder getProductsByKey( final Integer id ) - { + public GetByKeyRequestBuilder getProductsByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Product.class, key, "Products"); @@ -146,43 +136,43 @@ public GetByKeyRequestBuilder getProductsByKey( final Integer id ) @Override @Nonnull - public CreateRequestBuilder createProducts( @Nonnull final Product product ) - { + public CreateRequestBuilder createProducts( + @Nonnull + final Product product) { return new CreateRequestBuilder(servicePath, product, "Products"); } @Override @Nonnull - public UpdateRequestBuilder updateProducts( @Nonnull final Product product ) - { + public UpdateRequestBuilder updateProducts( + @Nonnull + final Product product) { return new UpdateRequestBuilder(servicePath, product, "Products"); } @Override @Nonnull - public DeleteRequestBuilder deleteProducts( @Nonnull final Product product ) - { + public DeleteRequestBuilder deleteProducts( + @Nonnull + final Product product) { return new DeleteRequestBuilder(servicePath, product, "Products"); } @Override @Nonnull - public GetAllRequestBuilder getAllReceipts() - { + public GetAllRequestBuilder getAllReceipts() { return new GetAllRequestBuilder(servicePath, Receipt.class, "Receipts"); } @Override @Nonnull - public CountRequestBuilder countReceipts() - { + public CountRequestBuilder countReceipts() { return new CountRequestBuilder(servicePath, Receipt.class, "Receipts"); } @Override @Nonnull - public GetByKeyRequestBuilder getReceiptsByKey( final Integer id ) - { + public GetByKeyRequestBuilder getReceiptsByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Receipt.class, key, "Receipts"); @@ -190,43 +180,43 @@ public GetByKeyRequestBuilder getReceiptsByKey( final Integer id ) @Override @Nonnull - public CreateRequestBuilder createReceipts( @Nonnull final Receipt receipt ) - { + public CreateRequestBuilder createReceipts( + @Nonnull + final Receipt receipt) { return new CreateRequestBuilder(servicePath, receipt, "Receipts"); } @Override @Nonnull - public UpdateRequestBuilder updateReceipts( @Nonnull final Receipt receipt ) - { + public UpdateRequestBuilder updateReceipts( + @Nonnull + final Receipt receipt) { return new UpdateRequestBuilder(servicePath, receipt, "Receipts"); } @Override @Nonnull - public DeleteRequestBuilder deleteReceipts( @Nonnull final Receipt receipt ) - { + public DeleteRequestBuilder deleteReceipts( + @Nonnull + final Receipt receipt) { return new DeleteRequestBuilder(servicePath, receipt, "Receipts"); } @Override @Nonnull - public GetAllRequestBuilder

getAllAddresses() - { + public GetAllRequestBuilder
getAllAddresses() { return new GetAllRequestBuilder
(servicePath, Address.class, "Addresses"); } @Override @Nonnull - public CountRequestBuilder
countAddresses() - { + public CountRequestBuilder
countAddresses() { return new CountRequestBuilder
(servicePath, Address.class, "Addresses"); } @Override @Nonnull - public GetByKeyRequestBuilder
getAddressesByKey( final Integer id ) - { + public GetByKeyRequestBuilder
getAddressesByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder
(servicePath, Address.class, key, "Addresses"); @@ -234,43 +224,43 @@ public GetByKeyRequestBuilder
getAddressesByKey( final Integer id ) @Override @Nonnull - public CreateRequestBuilder
createAddresses( @Nonnull final Address address ) - { + public CreateRequestBuilder
createAddresses( + @Nonnull + final Address address) { return new CreateRequestBuilder
(servicePath, address, "Addresses"); } @Override @Nonnull - public UpdateRequestBuilder
updateAddresses( @Nonnull final Address address ) - { + public UpdateRequestBuilder
updateAddresses( + @Nonnull + final Address address) { return new UpdateRequestBuilder
(servicePath, address, "Addresses"); } @Override @Nonnull - public DeleteRequestBuilder
deleteAddresses( @Nonnull final Address address ) - { + public DeleteRequestBuilder
deleteAddresses( + @Nonnull + final Address address) { return new DeleteRequestBuilder
(servicePath, address, "Addresses"); } @Override @Nonnull - public GetAllRequestBuilder getAllShelves() - { + public GetAllRequestBuilder getAllShelves() { return new GetAllRequestBuilder(servicePath, Shelf.class, "Shelves"); } @Override @Nonnull - public CountRequestBuilder countShelves() - { + public CountRequestBuilder countShelves() { return new CountRequestBuilder(servicePath, Shelf.class, "Shelves"); } @Override @Nonnull - public GetByKeyRequestBuilder getShelvesByKey( final Integer id ) - { + public GetByKeyRequestBuilder getShelvesByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Shelf.class, key, "Shelves"); @@ -278,43 +268,43 @@ public GetByKeyRequestBuilder getShelvesByKey( final Integer id ) @Override @Nonnull - public CreateRequestBuilder createShelves( @Nonnull final Shelf shelf ) - { + public CreateRequestBuilder createShelves( + @Nonnull + final Shelf shelf) { return new CreateRequestBuilder(servicePath, shelf, "Shelves"); } @Override @Nonnull - public UpdateRequestBuilder updateShelves( @Nonnull final Shelf shelf ) - { + public UpdateRequestBuilder updateShelves( + @Nonnull + final Shelf shelf) { return new UpdateRequestBuilder(servicePath, shelf, "Shelves"); } @Override @Nonnull - public DeleteRequestBuilder deleteShelves( @Nonnull final Shelf shelf ) - { + public DeleteRequestBuilder deleteShelves( + @Nonnull + final Shelf shelf) { return new DeleteRequestBuilder(servicePath, shelf, "Shelves"); } @Override @Nonnull - public GetAllRequestBuilder getAllShopFloorShelves() - { + public GetAllRequestBuilder getAllShopFloorShelves() { return new GetAllRequestBuilder(servicePath, Shelf.class, "ShopFloorShelves"); } @Override @Nonnull - public CountRequestBuilder countShopFloorShelves() - { + public CountRequestBuilder countShopFloorShelves() { return new CountRequestBuilder(servicePath, Shelf.class, "ShopFloorShelves"); } @Override @Nonnull - public GetByKeyRequestBuilder getShopFloorShelvesByKey( final Integer id ) - { + public GetByKeyRequestBuilder getShopFloorShelvesByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Shelf.class, key, "ShopFloorShelves"); @@ -322,43 +312,43 @@ public GetByKeyRequestBuilder getShopFloorShelvesByKey( final Integer id @Override @Nonnull - public CreateRequestBuilder createShopFloorShelves( @Nonnull final Shelf shelf ) - { + public CreateRequestBuilder createShopFloorShelves( + @Nonnull + final Shelf shelf) { return new CreateRequestBuilder(servicePath, shelf, "ShopFloorShelves"); } @Override @Nonnull - public UpdateRequestBuilder updateShopFloorShelves( @Nonnull final Shelf shelf ) - { + public UpdateRequestBuilder updateShopFloorShelves( + @Nonnull + final Shelf shelf) { return new UpdateRequestBuilder(servicePath, shelf, "ShopFloorShelves"); } @Override @Nonnull - public DeleteRequestBuilder deleteShopFloorShelves( @Nonnull final Shelf shelf ) - { + public DeleteRequestBuilder deleteShopFloorShelves( + @Nonnull + final Shelf shelf) { return new DeleteRequestBuilder(servicePath, shelf, "ShopFloorShelves"); } @Override @Nonnull - public GetAllRequestBuilder getAllStorageShelves() - { + public GetAllRequestBuilder getAllStorageShelves() { return new GetAllRequestBuilder(servicePath, Shelf.class, "StorageShelves"); } @Override @Nonnull - public CountRequestBuilder countStorageShelves() - { + public CountRequestBuilder countStorageShelves() { return new CountRequestBuilder(servicePath, Shelf.class, "StorageShelves"); } @Override @Nonnull - public GetByKeyRequestBuilder getStorageShelvesByKey( final Integer id ) - { + public GetByKeyRequestBuilder getStorageShelvesByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Shelf.class, key, "StorageShelves"); @@ -366,43 +356,43 @@ public GetByKeyRequestBuilder getStorageShelvesByKey( final Integer id ) @Override @Nonnull - public CreateRequestBuilder createStorageShelves( @Nonnull final Shelf shelf ) - { + public CreateRequestBuilder createStorageShelves( + @Nonnull + final Shelf shelf) { return new CreateRequestBuilder(servicePath, shelf, "StorageShelves"); } @Override @Nonnull - public UpdateRequestBuilder updateStorageShelves( @Nonnull final Shelf shelf ) - { + public UpdateRequestBuilder updateStorageShelves( + @Nonnull + final Shelf shelf) { return new UpdateRequestBuilder(servicePath, shelf, "StorageShelves"); } @Override @Nonnull - public DeleteRequestBuilder deleteStorageShelves( @Nonnull final Shelf shelf ) - { + public DeleteRequestBuilder deleteStorageShelves( + @Nonnull + final Shelf shelf) { return new DeleteRequestBuilder(servicePath, shelf, "StorageShelves"); } @Override @Nonnull - public GetAllRequestBuilder getAllOpeningHours() - { + public GetAllRequestBuilder getAllOpeningHours() { return new GetAllRequestBuilder(servicePath, OpeningHours.class, "OpeningHours"); } @Override @Nonnull - public CountRequestBuilder countOpeningHours() - { + public CountRequestBuilder countOpeningHours() { return new CountRequestBuilder(servicePath, OpeningHours.class, "OpeningHours"); } @Override @Nonnull - public GetByKeyRequestBuilder getOpeningHoursByKey( final Integer id ) - { + public GetByKeyRequestBuilder getOpeningHoursByKey(final Integer id) { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, OpeningHours.class, key, "OpeningHours"); @@ -410,22 +400,25 @@ public GetByKeyRequestBuilder getOpeningHoursByKey( final Integer @Override @Nonnull - public CreateRequestBuilder createOpeningHours( @Nonnull final OpeningHours openingHours ) - { + public CreateRequestBuilder createOpeningHours( + @Nonnull + final OpeningHours openingHours) { return new CreateRequestBuilder(servicePath, openingHours, "OpeningHours"); } @Override @Nonnull - public UpdateRequestBuilder updateOpeningHours( @Nonnull final OpeningHours openingHours ) - { + public UpdateRequestBuilder updateOpeningHours( + @Nonnull + final OpeningHours openingHours) { return new UpdateRequestBuilder(servicePath, openingHours, "OpeningHours"); } @Override @Nonnull - public DeleteRequestBuilder deleteOpeningHours( @Nonnull final OpeningHours openingHours ) - { + public DeleteRequestBuilder deleteOpeningHours( + @Nonnull + final OpeningHours openingHours) { return new DeleteRequestBuilder(servicePath, openingHours, "OpeningHours"); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java index fc9137011..b659a1c63 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java @@ -5,7 +5,6 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.services; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder; @@ -20,809 +19,583 @@ import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf; + /** - *

Details:

- * - * - * - * - * - *
OData Service:SDK_Grocery_Store
- * + *

Details:

OData Service:SDK_Grocery_Store
+ * */ -public interface SdkGroceryStoreService -{ +public interface SdkGroceryStoreService { /** - * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path - * used to access the endpoint. - * + * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path used to access the endpoint. + * */ String DEFAULT_SERVICE_PATH = "/com.sap.cloud.sdk.store.grocery"; /** - * Overrides the default service path and returns a new service instance with the specified service path. Also - * adjusts the respective entity URLs. - * + * Overrides the default service path and returns a new service instance with the specified service path. Also adjusts the respective entity URLs. + * * @param servicePath - * Service path that will override the default. - * @return A new service instance with the specified service path. + * Service path that will override the default. + * @return + * A new service instance with the specified service path. */ @Nonnull - SdkGroceryStoreService withServicePath( @Nonnull final String servicePath ); + SdkGroceryStoreService withServicePath( + @Nonnull + final String servicePath); /** * Creates a batch request builder object. - * - * @return A request builder to handle batch operation on this service. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder#execute(Destination) execute} method - * on the request builder object. + * + * @return + * A request builder to handle batch operation on this service. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder#execute(Destination) execute} method on the request builder object. */ @Nonnull BatchRequestBuilder batch(); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllCustomers(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countCustomers(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} - * entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. + * * @param id - * ID of the customer. - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * using key fields. This request builder allows methods which modify the underlying query to be called - * before executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + * ID of the customer.

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getCustomersByKey( final Integer id ); + GetByKeyRequestBuilder getCustomersByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} - * entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. - * To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createCustomers( @Nonnull final Customer customer ); + CreateRequestBuilder createCustomers( + @Nonnull + final Customer customer); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer - * Customer} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. - * To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateCustomers( @Nonnull final Customer customer ); + UpdateRequestBuilder updateCustomers( + @Nonnull + final Customer customer); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer - * Customer} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity in the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. - * To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteCustomers( @Nonnull final Customer customer ); + DeleteRequestBuilder deleteCustomers( + @Nonnull + final Customer customer); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllProducts(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countProducts(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} - * entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. + * * @param id - * ID of the product. - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity - * using key fields. This request builder allows methods which modify the underlying query to be called - * before executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + * ID of the product.

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getProductsByKey( final Integer id ); + GetByKeyRequestBuilder getProductsByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createProducts( @Nonnull final Product product ); + CreateRequestBuilder createProducts( + @Nonnull + final Product product); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateProducts( @Nonnull final Product product ); + UpdateRequestBuilder updateProducts( + @Nonnull + final Product product); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity in the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteProducts( @Nonnull final Product product ); + DeleteRequestBuilder deleteProducts( + @Nonnull + final Product product); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllReceipts(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countReceipts(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} - * entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. + * * @param id - * ID of the receipt. - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * using key fields. This request builder allows methods which modify the underlying query to be called - * before executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + * ID of the receipt.

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getReceiptsByKey( final Integer id ); + GetByKeyRequestBuilder getReceiptsByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createReceipts( @Nonnull final Receipt receipt ); + CreateRequestBuilder createReceipts( + @Nonnull + final Receipt receipt); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateReceipts( @Nonnull final Receipt receipt ); + UpdateRequestBuilder updateReceipts( + @Nonnull + final Receipt receipt); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity in the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteReceipts( @Nonnull final Receipt receipt ); + DeleteRequestBuilder deleteReceipts( + @Nonnull + final Receipt receipt); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder
getAllAddresses(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. - * This request builder allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder
countAddresses(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} - * entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. + * * @param id - * ID of the address. - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity - * using key fields. This request builder allows methods which modify the underlying query to be called - * before executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + * ID of the address.

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder
getAddressesByKey( final Integer id ); + GetByKeyRequestBuilder
getAddressesByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder
createAddresses( @Nonnull final Address address ); + CreateRequestBuilder
createAddresses( + @Nonnull + final Address address); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder
updateAddresses( @Nonnull final Address address ); + UpdateRequestBuilder
updateAddresses( + @Nonnull + final Address address); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder
deleteAddresses( @Nonnull final Address address ); + DeleteRequestBuilder
deleteAddresses( + @Nonnull + final Address address); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * request builder allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllShelves(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * request builder allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countShelves(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. + * * @param id - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using - * key fields. This request builder allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + *

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getShelvesByKey( final Integer id ); + GetByKeyRequestBuilder getShelvesByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and - * save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createShelves( @Nonnull final Shelf shelf ); + CreateRequestBuilder createShelves( + @Nonnull + final Shelf shelf); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateShelves( @Nonnull final Shelf shelf ); + UpdateRequestBuilder updateShelves( + @Nonnull + final Shelf shelf); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteShelves( @Nonnull final Shelf shelf ); + DeleteRequestBuilder deleteShelves( + @Nonnull + final Shelf shelf); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * request builder allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllShopFloorShelves(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * request builder allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countShopFloorShelves(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. + * * @param id - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using - * key fields. This request builder allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + *

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getShopFloorShelvesByKey( final Integer id ); + GetByKeyRequestBuilder getShopFloorShelvesByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and - * save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createShopFloorShelves( @Nonnull final Shelf shelf ); + CreateRequestBuilder createShopFloorShelves( + @Nonnull + final Shelf shelf); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateShopFloorShelves( @Nonnull final Shelf shelf ); + UpdateRequestBuilder updateShopFloorShelves( + @Nonnull + final Shelf shelf); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteShopFloorShelves( @Nonnull final Shelf shelf ); + DeleteRequestBuilder deleteShopFloorShelves( + @Nonnull + final Shelf shelf); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * request builder allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllStorageShelves(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection - * matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * request builder allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countStorageShelves(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. + * * @param id - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using - * key fields. This request builder allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + *

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getStorageShelvesByKey( final Integer id ); + GetByKeyRequestBuilder getStorageShelvesByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and - * save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createStorageShelves( @Nonnull final Shelf shelf ); + CreateRequestBuilder createStorageShelves( + @Nonnull + final Shelf shelf); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateStorageShelves( @Nonnull final Shelf shelf ); + UpdateRequestBuilder updateStorageShelves( + @Nonnull + final Shelf shelf); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteStorageShelves( @Nonnull final Shelf shelf ); + DeleteRequestBuilder deleteStorageShelves( + @Nonnull + final Shelf shelf); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entities. - * - * @return A request builder to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entities. This request builder allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute - * execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. + * + * @return + * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllOpeningHours(); /** - * Fetch the number of entries from the - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity - * collection matching the filter and search expressions. - * - * @return A request builder to fetch the count of - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entities. This request builder allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute - * execute} method on the request builder object. + * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity collection matching the filter and search expressions. + * + * @return + * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. */ @Nonnull CountRequestBuilder countOpeningHours(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. + * * @param id - *

- * Constraints: Not nullable - *

- * @return A request builder to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity using key fields. This request builder allows methods which modify the underlying query to be - * called before executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute - * execute} method on the request builder object. + *

Constraints: Not nullable

+ * @return + * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getOpeningHoursByKey( final Integer id ); + GetByKeyRequestBuilder getOpeningHoursByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity object that will be created in the S/4HANA system. - * @return A request builder to create a new - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be created in the S/4HANA system. + * @return + * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createOpeningHours( @Nonnull final OpeningHours openingHours ); + CreateRequestBuilder createOpeningHours( + @Nonnull + final OpeningHours openingHours); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity object that will be updated in the S/4HANA system. - * @return A request builder to update an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. + * @return + * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateOpeningHours( @Nonnull final OpeningHours openingHours ); + UpdateRequestBuilder updateOpeningHours( + @Nonnull + final OpeningHours openingHours); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity in the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity object that will be deleted in the S/4HANA system. - * @return A request builder to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute - * execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be deleted in the S/4HANA system. + * @return + * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteOpeningHours( @Nonnull final OpeningHours openingHours ); + DeleteRequestBuilder deleteOpeningHours( + @Nonnull + final OpeningHours openingHours); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java index 60b72c0af..c2e3baab4 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -20,7 +18,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,310 +25,275 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Address - *

- * + *

Original entity name from the Odata EDM: Address

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class Address extends VdmEntity
+@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class Address + extends VdmEntity
{ /** * Selector for all available fields of Address. - * + * */ public final static AddressSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static AddressField ID = new AddressField("Id"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: Street - *

- * - * @return The street contained in this entity. + * Constraints: none

Original property name from the Odata EDM: Street

+ * + * @return + * The street contained in this entity. */ - @SerializedName( "Street" ) - @JsonProperty( "Street" ) + @SerializedName("Street") + @JsonProperty("Street") @Nullable - @ODataField( odataName = "Street" ) + @ODataField(odataName = "Street") private String street; /** * Use with available fluent helpers to apply the Street field to query operations. - * + * */ public final static AddressField STREET = new AddressField("Street"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: City - *

- * - * @return The city contained in this entity. + * Constraints: none

Original property name from the Odata EDM: City

+ * + * @return + * The city contained in this entity. */ - @SerializedName( "City" ) - @JsonProperty( "City" ) + @SerializedName("City") + @JsonProperty("City") @Nullable - @ODataField( odataName = "City" ) + @ODataField(odataName = "City") private String city; /** * Use with available fluent helpers to apply the City field to query operations. - * + * */ public final static AddressField CITY = new AddressField("City"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: State - *

- * - * @return The state contained in this entity. + * Constraints: none

Original property name from the Odata EDM: State

+ * + * @return + * The state contained in this entity. */ - @SerializedName( "State" ) - @JsonProperty( "State" ) + @SerializedName("State") + @JsonProperty("State") @Nullable - @ODataField( odataName = "State" ) + @ODataField(odataName = "State") private String state; /** * Use with available fluent helpers to apply the State field to query operations. - * + * */ public final static AddressField STATE = new AddressField("State"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: Country - *

- * - * @return The country contained in this entity. + * Constraints: none

Original property name from the Odata EDM: Country

+ * + * @return + * The country contained in this entity. */ - @SerializedName( "Country" ) - @JsonProperty( "Country" ) + @SerializedName("Country") + @JsonProperty("Country") @Nullable - @ODataField( odataName = "Country" ) + @ODataField(odataName = "Country") private String country; /** * Use with available fluent helpers to apply the Country field to query operations. - * + * */ public final static AddressField COUNTRY = new AddressField("Country"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: PostalCode - *

- * - * @return The postalCode contained in this entity. + * Constraints: none

Original property name from the Odata EDM: PostalCode

+ * + * @return + * The postalCode contained in this entity. */ - @SerializedName( "PostalCode" ) - @JsonProperty( "PostalCode" ) + @SerializedName("PostalCode") + @JsonProperty("PostalCode") @Nullable - @ODataField( odataName = "PostalCode" ) + @ODataField(odataName = "PostalCode") private String postalCode; /** * Use with available fluent helpers to apply the PostalCode field to query operations. - * + * */ public final static AddressField POSTAL_CODE = new AddressField("PostalCode"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Latitude - *

- * - * @return The latitude contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

+ * + * @return + * The latitude contained in this entity. */ - @SerializedName( "Latitude" ) - @JsonProperty( "Latitude" ) + @SerializedName("Latitude") + @JsonProperty("Latitude") @Nullable - @ODataField( odataName = "Latitude" ) + @ODataField(odataName = "Latitude") private Double latitude; /** * Use with available fluent helpers to apply the Latitude field to query operations. - * + * */ public final static AddressField LATITUDE = new AddressField("Latitude"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Longitude - *

- * - * @return The longitude contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

+ * + * @return + * The longitude contained in this entity. */ - @SerializedName( "Longitude" ) - @JsonProperty( "Longitude" ) + @SerializedName("Longitude") + @JsonProperty("Longitude") @Nullable - @ODataField( odataName = "Longitude" ) + @ODataField(odataName = "Longitude") private Double longitude; /** * Use with available fluent helpers to apply the Longitude field to query operations. - * + * */ public final static AddressField LONGITUDE = new AddressField("Longitude"); @Nonnull @Override - public Class
getType() - { + public Class
getType() { return Address.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: Street - *

- * + * Constraints: none

Original property name from the Odata EDM: Street

+ * * @param street - * The street to set. + * The street to set. */ - public void setStreet( @Nullable final String street ) - { + public void setStreet( + @Nullable + final String street) { rememberChangedField("Street", this.street); this.street = street; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: City - *

- * + * Constraints: none

Original property name from the Odata EDM: City

+ * * @param city - * The city to set. + * The city to set. */ - public void setCity( @Nullable final String city ) - { + public void setCity( + @Nullable + final String city) { rememberChangedField("City", this.city); this.city = city; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: State - *

- * + * Constraints: none

Original property name from the Odata EDM: State

+ * * @param state - * The state to set. + * The state to set. */ - public void setState( @Nullable final String state ) - { + public void setState( + @Nullable + final String state) { rememberChangedField("State", this.state); this.state = state; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: Country - *

- * + * Constraints: none

Original property name from the Odata EDM: Country

+ * * @param country - * The country to set. + * The country to set. */ - public void setCountry( @Nullable final String country ) - { + public void setCountry( + @Nullable + final String country) { rememberChangedField("Country", this.country); this.country = country; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: PostalCode - *

- * + * Constraints: none

Original property name from the Odata EDM: PostalCode

+ * * @param postalCode - * The postalCode to set. + * The postalCode to set. */ - public void setPostalCode( @Nullable final String postalCode ) - { + public void setPostalCode( + @Nullable + final String postalCode) { rememberChangedField("PostalCode", this.postalCode); this.postalCode = postalCode; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Latitude - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

+ * * @param latitude - * The latitude to set. + * The latitude to set. */ - public void setLatitude( @Nullable final Double latitude ) - { + public void setLatitude( + @Nullable + final Double latitude) { rememberChangedField("Latitude", this.latitude); this.latitude = latitude; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Longitude - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

+ * * @param longitude - * The longitude to set. + * The longitude to set. */ - public void setLongitude( @Nullable final Double longitude ) - { + public void setLongitude( + @Nullable + final Double longitude) { rememberChangedField("Longitude", this.longitude); this.longitude = longitude; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Addresses"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -339,8 +301,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Street", getStreet()); @@ -354,56 +315,55 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("Street") ) { + if (cloudSdkValues.containsKey("Street")) { final Object value = cloudSdkValues.remove("Street"); - if( (value == null) || (!value.equals(getStreet())) ) { + if ((value == null)||(!value.equals(getStreet()))) { setStreet(((String) value)); } } - if( cloudSdkValues.containsKey("City") ) { + if (cloudSdkValues.containsKey("City")) { final Object value = cloudSdkValues.remove("City"); - if( (value == null) || (!value.equals(getCity())) ) { + if ((value == null)||(!value.equals(getCity()))) { setCity(((String) value)); } } - if( cloudSdkValues.containsKey("State") ) { + if (cloudSdkValues.containsKey("State")) { final Object value = cloudSdkValues.remove("State"); - if( (value == null) || (!value.equals(getState())) ) { + if ((value == null)||(!value.equals(getState()))) { setState(((String) value)); } } - if( cloudSdkValues.containsKey("Country") ) { + if (cloudSdkValues.containsKey("Country")) { final Object value = cloudSdkValues.remove("Country"); - if( (value == null) || (!value.equals(getCountry())) ) { + if ((value == null)||(!value.equals(getCountry()))) { setCountry(((String) value)); } } - if( cloudSdkValues.containsKey("PostalCode") ) { + if (cloudSdkValues.containsKey("PostalCode")) { final Object value = cloudSdkValues.remove("PostalCode"); - if( (value == null) || (!value.equals(getPostalCode())) ) { + if ((value == null)||(!value.equals(getPostalCode()))) { setPostalCode(((String) value)); } } - if( cloudSdkValues.containsKey("Latitude") ) { + if (cloudSdkValues.containsKey("Latitude")) { final Object value = cloudSdkValues.remove("Latitude"); - if( (value == null) || (!value.equals(getLatitude())) ) { + if ((value == null)||(!value.equals(getLatitude()))) { setLatitude(((Double) value)); } } - if( cloudSdkValues.containsKey("Longitude") ) { + if (cloudSdkValues.containsKey("Longitude")) { final Object value = cloudSdkValues.remove("Longitude"); - if( (value == null) || (!value.equals(getLongitude())) ) { + if ((value == null)||(!value.equals(getLongitude()))) { setLongitude(((Double) value)); } } @@ -419,64 +379,72 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static AddressField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticAddressField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new AddressField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static AddressField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticAddressField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new AddressField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java index 195ccd485..fa6787d6d 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java @@ -5,57 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address - * Address} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class AddressByKeyFluentHelper extends FluentHelperByKey +public class AddressByKeyFluentHelper + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity with the - * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the - * fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Address} + * Entity Collection to be used to fetch a single {@code Address} * @param servicePath - * Service path to be used to fetch a single {@code Address} + * Service path to be used to fetch a single {@code Address} * @param id - * + * */ public AddressByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class
getEntityClass() - { + protected Class
getEntityClass() { return Address.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java index 9937d2d8e..8f2477261 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java @@ -5,52 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; + /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address - * Address} entity and save it to the S/4HANA system. - *

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class AddressCreateFluentHelper extends FluentHelperCreate +public class AddressCreateFluentHelper + extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that - * will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. + * */ private final Address entity; /** - * Creates a fluent helper object that will create a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Address to create. + * The Address to create. */ public AddressCreateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Address entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Address entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Address getEntity() - { + protected Address getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java index f1c8c725c..748d18502 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java @@ -5,53 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperDelete; + /** - * Fluent helper to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA - * system. - *

+ * Fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class AddressDeleteFluentHelper extends FluentHelperDelete +public class AddressDeleteFluentHelper + extends FluentHelperDelete { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that - * will be deleted in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. + * */ private final Address entity; /** - * Creates a fluent helper object that will delete a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will delete a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * The entity collection to direct the update requests to. + * The entity collection to direct the update requests to. * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Address to delete from the endpoint. + * The Address to delete from the endpoint. */ public AddressDeleteFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Address entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Address entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Address getEntity() - { + protected Address getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java index 83ed3e68b..9727f1c9e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address - * Address} entities. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class AddressFluentHelper extends FluentHelperRead +public class AddressFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public AddressFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public AddressFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class

getEntityClass() - { + protected Class
getEntityClass() { return Address.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java index 1f160000e..96a168607 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; + /** - * Fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the - * S/4HANA system. - *

+ * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class AddressUpdateFluentHelper extends FluentHelperUpdate +public class AddressUpdateFluentHelper + extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that - * will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. + * */ private final Address entity; /** - * Creates a fluent helper object that will update a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Address to take the updated values from. + * The Address to take the updated values from. */ public AddressUpdateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Address entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Address entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Address getEntity() - { + protected Address getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java index 1e31dff53..b5730c242 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -22,7 +20,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -34,221 +31,175 @@ import lombok.Setter; import lombok.ToString; + /** - * OData entity representation of Customer - *

- *

- *

- * Original entity name from the Odata EDM: Customer - *

- * + * OData entity representation of Customer

Original entity name from the Odata EDM: Customer

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class Customer extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class Customer + extends VdmEntity { /** * Selector for all available fields of Customer. - * + * */ public final static CustomerSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- *

- * With this numeric identifier it's possible to resolve and manipulate customer information - *

- * - * @return Customer identifier used as entity key value. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

With this numeric identifier it's possible to resolve and manipulate customer information

+ * + * @return + * Customer identifier used as entity key value. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static CustomerField ID = new CustomerField("Id"); /** - * Constraints: Not nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- *

- * The mandatory field may contain different combinations of first- and last-name. - *

- * - * @return Customer name. + * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

The mandatory field may contain different combinations of first- and last-name.

+ * + * @return + * Customer name. */ - @SerializedName( "Name" ) - @JsonProperty( "Name" ) + @SerializedName("Name") + @JsonProperty("Name") @Nullable - @ODataField( odataName = "Name" ) + @ODataField(odataName = "Name") private String name; /** * Use with available fluent helpers to apply the Name field to query operations. - * + * */ public final static CustomerField NAME = new CustomerField("Name"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: Email - *

- *

- * The optional field for customer email address is checked server-side for validity. - *

- * - * @return Customer email address. + * Constraints: none

Original property name from the Odata EDM: Email

The optional field for customer email address is checked server-side for validity.

+ * + * @return + * Customer email address. */ - @SerializedName( "Email" ) - @JsonProperty( "Email" ) + @SerializedName("Email") + @JsonProperty("Email") @Nullable - @ODataField( odataName = "Email" ) + @ODataField(odataName = "Email") private String email; /** * Use with available fluent helpers to apply the Email field to query operations. - * + * */ public final static CustomerField EMAIL = new CustomerField("Email"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: AddressId - *

- *

- * The optional field can be used to resolve the current customer address id. - *

- * - * @return Customer address identifier. + * Constraints: Nullable

Original property name from the Odata EDM: AddressId

The optional field can be used to resolve the current customer address id.

+ * + * @return + * Customer address identifier. */ - @SerializedName( "AddressId" ) - @JsonProperty( "AddressId" ) + @SerializedName("AddressId") + @JsonProperty("AddressId") @Nullable - @ODataField( odataName = "AddressId" ) + @ODataField(odataName = "AddressId") private Integer addressId; /** * Use with available fluent helpers to apply the AddressId field to query operations. - * + * */ public final static CustomerField ADDRESS_ID = new CustomerField("AddressId"); /** * Navigation property Address for Customer to single Address. - * + * */ - @SerializedName( "Address" ) - @JsonProperty( "Address" ) - @ODataField( odataName = "Address" ) + @SerializedName("Address") + @JsonProperty("Address") + @ODataField(odataName = "Address") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Address toAddress; /** * Use with available fluent helpers to apply the Address navigation property to query operations. - * + * */ public final static CustomerOneToOneLink
TO_ADDRESS = new CustomerOneToOneLink
("Address"); @Nonnull @Override - public Class getType() - { + public Class getType() { return Customer.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- *

- * With this numeric identifier it's possible to resolve and manipulate customer information - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

With this numeric identifier it's possible to resolve and manipulate customer information

+ * * @param id - * Customer identifier used as entity key value. + * Customer identifier used as entity key value. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- *

- * The mandatory field may contain different combinations of first- and last-name. - *

- * + * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

The mandatory field may contain different combinations of first- and last-name.

+ * * @param name - * Customer name. + * Customer name. */ - public void setName( @Nullable final String name ) - { + public void setName( + @Nullable + final String name) { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: Email - *

- *

- * The optional field for customer email address is checked server-side for validity. - *

- * + * Constraints: none

Original property name from the Odata EDM: Email

The optional field for customer email address is checked server-side for validity.

+ * * @param email - * Customer email address. + * Customer email address. */ - public void setEmail( @Nullable final String email ) - { + public void setEmail( + @Nullable + final String email) { rememberChangedField("Email", this.email); this.email = email; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: AddressId - *

- *

- * The optional field can be used to resolve the current customer address id. - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: AddressId

The optional field can be used to resolve the current customer address id.

+ * * @param addressId - * Customer address identifier. + * Customer address identifier. */ - public void setAddressId( @Nullable final Integer addressId ) - { + public void setAddressId( + @Nullable + final Integer addressId) { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Customers"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -256,8 +207,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -267,32 +217,31 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("Name") ) { + if (cloudSdkValues.containsKey("Name")) { final Object value = cloudSdkValues.remove("Name"); - if( (value == null) || (!value.equals(getName())) ) { + if ((value == null)||(!value.equals(getName()))) { setName(((String) value)); } } - if( cloudSdkValues.containsKey("Email") ) { + if (cloudSdkValues.containsKey("Email")) { final Object value = cloudSdkValues.remove("Email"); - if( (value == null) || (!value.equals(getEmail())) ) { + if ((value == null)||(!value.equals(getEmail()))) { setEmail(((String) value)); } } - if( cloudSdkValues.containsKey("AddressId") ) { + if (cloudSdkValues.containsKey("AddressId")) { final Object value = cloudSdkValues.remove("AddressId"); - if( (value == null) || (!value.equals(getAddressId())) ) { + if ((value == null)||(!value.equals(getAddressId()))) { setAddressId(((Integer) value)); } } @@ -302,14 +251,14 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("Address") ) { + if ((cloudSdkValues).containsKey("Address")) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if( cloudSdkValue instanceof Map ) { - if( toAddress == null ) { + if (cloudSdkValue instanceof Map) { + if (toAddress == null) { toAddress = new Address(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -319,177 +268,167 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static CustomerField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticCustomerField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new CustomerField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static CustomerField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticCustomerField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new CustomerField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toAddress != null ) { + if (toAddress!= null) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData - * navigation property Address. + * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData navigation property Address. *

* Please note: This method will not cache or persist the query results. - * - * @return The single associated Address entity, or {@code null} if an entity is not associated. + * + * @return + * The single associated Address entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Address fetchAddress() - { + public Address fetchAddress() { return fetchFieldAsSingle("Address", Address.class); } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property - * Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. *

- * If the navigation property Address of a queried Customer is operated lazily, an - * ODataException can be thrown in case of an OData query error. + * If the navigation property Address of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated Address entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated Address entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Address getAddressOrFetch() - { - if( toAddress == null ) { + public Address getAddressOrFetch() { + if (toAddress == null) { toAddress = fetchAddress(); } return toAddress; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property - * Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. *

- * If the navigation property for an entity Customer has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Address is already loaded, the result will contain the - * Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Customer has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() - { + public Option
getAddressIfPresent() { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress( final Address cloudSdkValue ) - { + public void setAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; } + /** * Helper class to allow for fluent creation of Customer instances. - * + * */ - public final static class CustomerBuilder - { + public final static class CustomerBuilder { private Address toAddress; - private Customer.CustomerBuilder toAddress( final Address cloudSdkValue ) - { + private Customer.CustomerBuilder toAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Customer to single Address. - * + * * @param cloudSdkValue - * The Address to build this Customer with. - * @return This Builder to allow for a fluent interface. + * The Address to build this Customer with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Customer.CustomerBuilder address( final Address cloudSdkValue ) - { + public Customer.CustomerBuilder address(final Address cloudSdkValue) { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java index 6b87f1f79..5e54f95e9 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java @@ -5,62 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer - * Customer} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ public class CustomerByKeyFluentHelper - extends - FluentHelperByKey + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity with the - * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the - * fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Customer} + * Entity Collection to be used to fetch a single {@code Customer} * @param servicePath - * Service path to be used to fetch a single {@code Customer} + * Service path to be used to fetch a single {@code Customer} * @param id - * Customer identifier used as entity key value. - *

- * Constraints: Not nullable - *

+ * Customer identifier used as entity key value.

Constraints: Not nullable

*/ public CustomerByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Customer.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java index debe16ca1..ca9e59355 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java @@ -5,52 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; + /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer - * Customer} entity and save it to the S/4HANA system. - *

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class CustomerCreateFluentHelper extends FluentHelperCreate +public class CustomerCreateFluentHelper + extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that - * will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. + * */ private final Customer entity; /** - * Creates a fluent helper object that will create a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Customer to create. + * The Customer to create. */ public CustomerCreateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Customer entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Customer entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Customer getEntity() - { + protected Customer getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java index 21b0e75f5..36039dcaf 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer - * Customer} entities. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class CustomerFluentHelper extends FluentHelperRead +public class CustomerFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public CustomerFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public CustomerFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Customer.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java index 7d326f3cd..bbc518033 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -20,7 +18,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,112 +25,101 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: FloorPlan - *

- * + *

Original entity name from the Odata EDM: FloorPlan

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class FloorPlan extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class FloorPlan + extends VdmEntity { /** * Selector for all available fields of FloorPlan. - * + * */ public final static FloorPlanSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static FloorPlanField ID = new FloorPlanField("Id"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: ImageUri - *

- * - * @return The imageUri contained in this entity. + * Constraints: none

Original property name from the Odata EDM: ImageUri

+ * + * @return + * The imageUri contained in this entity. */ - @SerializedName( "ImageUri" ) - @JsonProperty( "ImageUri" ) + @SerializedName("ImageUri") + @JsonProperty("ImageUri") @Nullable - @ODataField( odataName = "ImageUri" ) + @ODataField(odataName = "ImageUri") private String imageUri; /** * Use with available fluent helpers to apply the ImageUri field to query operations. - * + * */ public final static FloorPlanField IMAGE_URI = new FloorPlanField("ImageUri"); @Nonnull @Override - public Class getType() - { + public Class getType() { return FloorPlan.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: ImageUri - *

- * + * Constraints: none

Original property name from the Odata EDM: ImageUri

+ * * @param imageUri - * The imageUri to set. + * The imageUri to set. */ - public void setImageUri( @Nullable final String imageUri ) - { + public void setImageUri( + @Nullable + final String imageUri) { rememberChangedField("ImageUri", this.imageUri); this.imageUri = imageUri; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Floors"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -141,8 +127,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("ImageUri", getImageUri()); @@ -150,20 +135,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("ImageUri") ) { + if (cloudSdkValues.containsKey("ImageUri")) { final Object value = cloudSdkValues.remove("ImageUri"); - if( (value == null) || (!value.equals(getImageUri())) ) { + if ((value == null)||(!value.equals(getImageUri()))) { setImageUri(((String) value)); } } @@ -179,64 +163,72 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static FloorPlanField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticFloorPlanField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new FloorPlanField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static FloorPlanField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticFloorPlanField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new FloorPlanField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java index 6d51568ff..f56c9316f 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java @@ -5,59 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan - * FloorPlan} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ public class FloorPlanByKeyFluentHelper - extends - FluentHelperByKey + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity with the - * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the - * fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code FloorPlan} + * Entity Collection to be used to fetch a single {@code FloorPlan} * @param servicePath - * Service path to be used to fetch a single {@code FloorPlan} + * Service path to be used to fetch a single {@code FloorPlan} * @param id - * + * */ public FloorPlanByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return FloorPlan.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java index 5fd5ab1d9..4d420c992 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan - * FloorPlan} entities. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class FloorPlanFluentHelper extends FluentHelperRead +public class FloorPlanFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public FloorPlanFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public FloorPlanFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return FloorPlan.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java index 045980517..d5a007816 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java @@ -7,53 +7,44 @@ import java.net.URI; import java.util.List; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpUriRequest; - import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.CollectionValuedFluentHelperFunction; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpUriRequest; + /** * Fluent helper for the GetProductQuantities OData function import. - * + * */ public class GetProductQuantitiesFluentHelper - extends - CollectionValuedFluentHelperFunction> + extends CollectionValuedFluentHelperFunction> { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the GetProductQuantities OData function import with the - * provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent - * helper object. - * + * Creates a fluent helper object that will execute the GetProductQuantities OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param shelfId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ShelfId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ShelfId

* @param productId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ProductId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

* @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. */ public GetProductQuantitiesFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Integer shelfId, - @Nonnull final Integer productId ) - { + @Nonnull + final String servicePath, + @Nonnull + final Integer shelfId, + @Nonnull + final Integer productId) { super(servicePath); values.put("ShelfId", shelfId); values.put("ProductId", productId); @@ -61,23 +52,22 @@ public GetProductQuantitiesFluentHelper( @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return ProductCount.class; } @Override @Nonnull - protected String getFunctionName() - { + protected String getFunctionName() { return "GetProductQuantities"; } @Override @Nullable - protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) - { - if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { + protected JsonElement refineJsonResponse( + @Nullable + JsonElement jsonElement) { + if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -85,26 +75,27 @@ protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) @Override @Nonnull - protected Map getParameters() - { + protected Map getParameters() { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( @Nonnull final URI uri ) - { + protected HttpUriRequest createRequest( + @Nonnull + final URI uri) { return new HttpGet(uri); } /** * Execute this function import. - * + * */ @Override @Nonnull - public List executeRequest( @Nonnull final Destination destination ) - { + public List executeRequest( + @Nonnull + final Destination destination) { return super.executeMultiple(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java index 28a218734..efdae6bd8 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java @@ -7,66 +7,62 @@ import java.net.URI; import java.time.LocalDateTime; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpUriRequest; - import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpUriRequest; + /** * Fluent helper for the IsStoreOpen OData function import. - * + * */ -public class IsStoreOpenFluentHelper extends SingleValuedFluentHelperFunction +public class IsStoreOpenFluentHelper + extends SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the IsStoreOpen OData function import with the provided - * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will execute the IsStoreOpen OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param dateTime - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: DateTime - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: DateTime

* @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. */ - public IsStoreOpenFluentHelper( @Nonnull final String servicePath, @Nonnull final LocalDateTime dateTime ) - { + public IsStoreOpenFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final LocalDateTime dateTime) { super(servicePath); values.put("DateTime", dateTime); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Boolean.class; } @Override @Nonnull - protected String getFunctionName() - { + protected String getFunctionName() { return "IsStoreOpen"; } @Override @Nullable - protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) - { - if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { + protected JsonElement refineJsonResponse( + @Nullable + JsonElement jsonElement) { + if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -74,26 +70,27 @@ protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) @Override @Nonnull - protected Map getParameters() - { + protected Map getParameters() { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( @Nonnull final URI uri ) - { + protected HttpUriRequest createRequest( + @Nonnull + final URI uri) { return new HttpGet(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public Boolean executeRequest( @Nonnull final Destination destination ) - { + public Boolean executeRequest( + @Nonnull + final Destination destination) { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java index b32b52bf0..b9392e61a 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java @@ -6,10 +6,8 @@ import java.time.LocalTime; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -23,7 +21,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -31,188 +28,165 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: OpeningHours - *

- * + *

Original entity name from the Odata EDM: OpeningHours

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class OpeningHours extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class OpeningHours + extends VdmEntity { /** * Selector for all available fields of OpeningHours. - * + * */ public final static OpeningHoursSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static OpeningHoursField ID = new OpeningHoursField("Id"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: DayOfWeek - *

- * - * @return The dayOfWeek contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

+ * + * @return + * The dayOfWeek contained in this entity. */ - @SerializedName( "DayOfWeek" ) - @JsonProperty( "DayOfWeek" ) + @SerializedName("DayOfWeek") + @JsonProperty("DayOfWeek") @Nullable - @ODataField( odataName = "DayOfWeek" ) + @ODataField(odataName = "DayOfWeek") private Integer dayOfWeek; /** * Use with available fluent helpers to apply the DayOfWeek field to query operations. - * + * */ public final static OpeningHoursField DAY_OF_WEEK = new OpeningHoursField("DayOfWeek"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: OpenTime - *

- * - * @return The openTime contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

+ * + * @return + * The openTime contained in this entity. */ - @SerializedName( "OpenTime" ) - @JsonProperty( "OpenTime" ) + @SerializedName("OpenTime") + @JsonProperty("OpenTime") @Nullable - @JsonSerialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class ) - @JsonDeserialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class ) - @JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class ) - @ODataField( - odataName = "OpenTime", - converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class ) + @JsonSerialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class) + @JsonDeserialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class) + @JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class) + @ODataField(odataName = "OpenTime", converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class) private LocalTime openTime; /** * Use with available fluent helpers to apply the OpenTime field to query operations. - * + * */ public final static OpeningHoursField OPEN_TIME = new OpeningHoursField("OpenTime"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CloseTime - *

- * - * @return The closeTime contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

+ * + * @return + * The closeTime contained in this entity. */ - @SerializedName( "CloseTime" ) - @JsonProperty( "CloseTime" ) + @SerializedName("CloseTime") + @JsonProperty("CloseTime") @Nullable - @JsonSerialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class ) - @JsonDeserialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class ) - @JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class ) - @ODataField( - odataName = "CloseTime", - converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class ) + @JsonSerialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class) + @JsonDeserialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class) + @JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class) + @ODataField(odataName = "CloseTime", converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class) private LocalTime closeTime; /** * Use with available fluent helpers to apply the CloseTime field to query operations. - * + * */ public final static OpeningHoursField CLOSE_TIME = new OpeningHoursField("CloseTime"); @Nonnull @Override - public Class getType() - { + public Class getType() { return OpeningHours.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: DayOfWeek - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

+ * * @param dayOfWeek - * The dayOfWeek to set. + * The dayOfWeek to set. */ - public void setDayOfWeek( @Nullable final Integer dayOfWeek ) - { + public void setDayOfWeek( + @Nullable + final Integer dayOfWeek) { rememberChangedField("DayOfWeek", this.dayOfWeek); this.dayOfWeek = dayOfWeek; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: OpenTime - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

+ * * @param openTime - * The openTime to set. + * The openTime to set. */ - public void setOpenTime( @Nullable final LocalTime openTime ) - { + public void setOpenTime( + @Nullable + final LocalTime openTime) { rememberChangedField("OpenTime", this.openTime); this.openTime = openTime; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CloseTime - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

+ * * @param closeTime - * The closeTime to set. + * The closeTime to set. */ - public void setCloseTime( @Nullable final LocalTime closeTime ) - { + public void setCloseTime( + @Nullable + final LocalTime closeTime) { rememberChangedField("CloseTime", this.closeTime); this.closeTime = closeTime; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "OpeningHours"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -220,8 +194,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("DayOfWeek", getDayOfWeek()); @@ -231,32 +204,31 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("DayOfWeek") ) { + if (cloudSdkValues.containsKey("DayOfWeek")) { final Object value = cloudSdkValues.remove("DayOfWeek"); - if( (value == null) || (!value.equals(getDayOfWeek())) ) { + if ((value == null)||(!value.equals(getDayOfWeek()))) { setDayOfWeek(((Integer) value)); } } - if( cloudSdkValues.containsKey("OpenTime") ) { + if (cloudSdkValues.containsKey("OpenTime")) { final Object value = cloudSdkValues.remove("OpenTime"); - if( (value == null) || (!value.equals(getOpenTime())) ) { + if ((value == null)||(!value.equals(getOpenTime()))) { setOpenTime(((LocalTime) value)); } } - if( cloudSdkValues.containsKey("CloseTime") ) { + if (cloudSdkValues.containsKey("CloseTime")) { final Object value = cloudSdkValues.remove("CloseTime"); - if( (value == null) || (!value.equals(getCloseTime())) ) { + if ((value == null)||(!value.equals(getCloseTime()))) { setCloseTime(((LocalTime) value)); } } @@ -272,64 +244,72 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static OpeningHoursField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticOpeningHoursField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new OpeningHoursField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static OpeningHoursField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticOpeningHoursField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new OpeningHoursField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java index c4325ee1b..c188b98e9 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java @@ -5,60 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; + /** - * Fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using - * key fields. This fluent helper allows methods which modify the underlying query to be called before executing the - * query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ public class OpeningHoursByKeyFluentHelper - extends - FluentHelperByKey + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity with - * the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on - * the fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code OpeningHours} + * Entity Collection to be used to fetch a single {@code OpeningHours} * @param servicePath - * Service path to be used to fetch a single {@code OpeningHours} + * Service path to be used to fetch a single {@code OpeningHours} * @param id - * + * */ public OpeningHoursByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return OpeningHours.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java index 1b91e9757..44d46cf1b 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java @@ -5,38 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; + /** - * Fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This - * fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ public class OpeningHoursFluentHelper - extends - FluentHelperRead + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public OpeningHoursFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public OpeningHoursFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return OpeningHours.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java index f949c7935..699aff397 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; + /** - * Fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save - * it to the S/4HANA system. - *

+ * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class OpeningHoursUpdateFluentHelper extends FluentHelperUpdate +public class OpeningHoursUpdateFluentHelper + extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity - * object that will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. + * */ private final OpeningHours entity; /** - * Creates a fluent helper object that will update a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity on - * the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent - * helper object. - * + * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The OpeningHours to take the updated values from. + * The OpeningHours to take the updated values from. */ public OpeningHoursUpdateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final OpeningHours entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final OpeningHours entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected OpeningHours getEntity() - { + protected OpeningHours getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java index bcd53d367..a9473a740 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java @@ -6,59 +6,48 @@ import java.net.URI; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpUriRequest; - import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; + /** * Fluent helper for the OrderProduct OData function import. - * + * */ public class OrderProductFluentHelper - extends - SingleValuedFluentHelperFunction + extends SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the OrderProduct OData function import with the provided - * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will execute the OrderProduct OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param quantity - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: Quantity - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: Quantity

* @param productId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ProductId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

* @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. * @param customerId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: CustomerId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: CustomerId

*/ public OrderProductFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Integer customerId, - @Nonnull final Integer productId, - @Nonnull final Integer quantity ) - { + @Nonnull + final String servicePath, + @Nonnull + final Integer customerId, + @Nonnull + final Integer productId, + @Nonnull + final Integer quantity) { super(servicePath); values.put("CustomerId", customerId); values.put("ProductId", productId); @@ -67,23 +56,22 @@ public OrderProductFluentHelper( @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Receipt.class; } @Override @Nonnull - protected String getFunctionName() - { + protected String getFunctionName() { return "OrderProduct"; } @Override @Nullable - protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) - { - if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { + protected JsonElement refineJsonResponse( + @Nullable + JsonElement jsonElement) { + if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -91,26 +79,27 @@ protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) @Override @Nonnull - protected Map getParameters() - { + protected Map getParameters() { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( @Nonnull final URI uri ) - { + protected HttpUriRequest createRequest( + @Nonnull + final URI uri) { return new HttpPost(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public Receipt executeRequest( @Nonnull final Destination destination ) - { + public Receipt executeRequest( + @Nonnull + final Destination destination) { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java index 3c34e2bf7..c0d832e76 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java @@ -6,66 +6,62 @@ import java.net.URI; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpUriRequest; - import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; + /** * Fluent helper for the PrintReceipt OData function import. - * + * */ -public class PrintReceiptFluentHelper extends SingleValuedFluentHelperFunction +public class PrintReceiptFluentHelper + extends SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the PrintReceipt OData function import with the provided - * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will execute the PrintReceipt OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. * @param receiptId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ReceiptId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

*/ - public PrintReceiptFluentHelper( @Nonnull final String servicePath, @Nonnull final Integer receiptId ) - { + public PrintReceiptFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final Integer receiptId) { super(servicePath); values.put("ReceiptId", receiptId); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return String.class; } @Override @Nonnull - protected String getFunctionName() - { + protected String getFunctionName() { return "PrintReceipt"; } @Override @Nullable - protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) - { - if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { + protected JsonElement refineJsonResponse( + @Nullable + JsonElement jsonElement) { + if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -73,26 +69,27 @@ protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) @Override @Nonnull - protected Map getParameters() - { + protected Map getParameters() { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( @Nonnull final URI uri ) - { + protected HttpUriRequest createRequest( + @Nonnull + final URI uri) { return new HttpPost(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public String executeRequest( @Nonnull final Destination destination ) - { + public String executeRequest( + @Nonnull + final Destination destination) { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java index 290154de0..c02411d55 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java @@ -7,10 +7,8 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -26,7 +24,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -38,276 +35,249 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Product - *

- * + *

Original entity name from the Odata EDM: Product

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class Product extends VdmMediaEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class Product + extends VdmMediaEntity { /** * Selector for all available fields of Product. - * + * */ public final static ProductSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static ProductField ID = new ProductField("Id"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: Name - *

- * - * @return The name contained in this entity. + * Constraints: none

Original property name from the Odata EDM: Name

+ * + * @return + * The name contained in this entity. */ - @SerializedName( "Name" ) - @JsonProperty( "Name" ) + @SerializedName("Name") + @JsonProperty("Name") @Nullable - @ODataField( odataName = "Name" ) + @ODataField(odataName = "Name") private String name; /** * Use with available fluent helpers to apply the Name field to query operations. - * + * */ public final static ProductField NAME = new ProductField("Name"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ShelfId - *

- * - * @return The shelfId contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

+ * + * @return + * The shelfId contained in this entity. */ - @SerializedName( "ShelfId" ) - @JsonProperty( "ShelfId" ) + @SerializedName("ShelfId") + @JsonProperty("ShelfId") @Nullable - @ODataField( odataName = "ShelfId" ) + @ODataField(odataName = "ShelfId") private Integer shelfId; /** * Use with available fluent helpers to apply the ShelfId field to query operations. - * + * */ public final static ProductField SHELF_ID = new ProductField("ShelfId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: VendorId - *

- * - * @return The vendorId contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

+ * + * @return + * The vendorId contained in this entity. */ - @SerializedName( "VendorId" ) - @JsonProperty( "VendorId" ) + @SerializedName("VendorId") + @JsonProperty("VendorId") @Nullable - @ODataField( odataName = "VendorId" ) + @ODataField(odataName = "VendorId") private Integer vendorId; /** * Use with available fluent helpers to apply the VendorId field to query operations. - * + * */ public final static ProductField VENDOR_ID = new ProductField("VendorId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Price - *

- * - * @return The price contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: Price

+ * + * @return + * The price contained in this entity. */ - @SerializedName( "Price" ) - @JsonProperty( "Price" ) + @SerializedName("Price") + @JsonProperty("Price") @Nullable - @ODataField( odataName = "Price" ) + @ODataField(odataName = "Price") private BigDecimal price; /** * Use with available fluent helpers to apply the Price field to query operations. - * + * */ public final static ProductField PRICE = new ProductField("Price"); /** - * Constraints: none - *

- * Original property name from the Odata EDM: Image - *

- * - * @return The image contained in this entity. + * Constraints: none

Original property name from the Odata EDM: Image

+ * + * @return + * The image contained in this entity. */ - @SerializedName( "Image" ) - @JsonProperty( "Image" ) + @SerializedName("Image") + @JsonProperty("Image") @Nullable - @JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataBinaryAdapter.class ) - @ODataField( odataName = "Image" ) + @JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataBinaryAdapter.class) + @ODataField(odataName = "Image") private byte[] image; /** * Use with available fluent helpers to apply the Image field to query operations. - * + * */ public final static ProductField IMAGE = new ProductField("Image"); /** * Navigation property Vendor for Product to single Vendor. - * + * */ - @SerializedName( "Vendor" ) - @JsonProperty( "Vendor" ) - @ODataField( odataName = "Vendor" ) + @SerializedName("Vendor") + @JsonProperty("Vendor") + @ODataField(odataName = "Vendor") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Vendor toVendor; /** * Navigation property Shelf for Product to multiple Shelf. - * + * */ - @SerializedName( "Shelf" ) - @JsonProperty( "Shelf" ) - @ODataField( odataName = "Shelf" ) - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @SerializedName("Shelf") + @JsonProperty("Shelf") + @ODataField(odataName = "Shelf") + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private List toShelf; /** * Use with available fluent helpers to apply the Vendor navigation property to query operations. - * + * */ public final static ProductOneToOneLink TO_VENDOR = new ProductOneToOneLink("Vendor"); /** * Use with available fluent helpers to apply the Shelf navigation property to query operations. - * + * */ public final static ProductLink TO_SHELF = new ProductLink("Shelf"); @Nonnull @Override - public Class getType() - { + public Class getType() { return Product.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: Name - *

- * + * Constraints: none

Original property name from the Odata EDM: Name

+ * * @param name - * The name to set. + * The name to set. */ - public void setName( @Nullable final String name ) - { + public void setName( + @Nullable + final String name) { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ShelfId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

+ * * @param shelfId - * The shelfId to set. + * The shelfId to set. */ - public void setShelfId( @Nullable final Integer shelfId ) - { + public void setShelfId( + @Nullable + final Integer shelfId) { rememberChangedField("ShelfId", this.shelfId); this.shelfId = shelfId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: VendorId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

+ * * @param vendorId - * The vendorId to set. + * The vendorId to set. */ - public void setVendorId( @Nullable final Integer vendorId ) - { + public void setVendorId( + @Nullable + final Integer vendorId) { rememberChangedField("VendorId", this.vendorId); this.vendorId = vendorId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: Price - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: Price

+ * * @param price - * The price to set. + * The price to set. */ - public void setPrice( @Nullable final BigDecimal price ) - { + public void setPrice( + @Nullable + final BigDecimal price) { rememberChangedField("Price", this.price); this.price = price; } /** - * Constraints: none - *

- * Original property name from the Odata EDM: Image - *

- * + * Constraints: none

Original property name from the Odata EDM: Image

+ * * @param image - * The image to set. + * The image to set. */ - public void setImage( @Nullable final byte[] image ) - { + public void setImage( + @Nullable + final byte[] image) { rememberChangedField("Image", this.image); this.image = image; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Products"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -315,8 +285,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -328,44 +297,43 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("Name") ) { + if (cloudSdkValues.containsKey("Name")) { final Object value = cloudSdkValues.remove("Name"); - if( (value == null) || (!value.equals(getName())) ) { + if ((value == null)||(!value.equals(getName()))) { setName(((String) value)); } } - if( cloudSdkValues.containsKey("ShelfId") ) { + if (cloudSdkValues.containsKey("ShelfId")) { final Object value = cloudSdkValues.remove("ShelfId"); - if( (value == null) || (!value.equals(getShelfId())) ) { + if ((value == null)||(!value.equals(getShelfId()))) { setShelfId(((Integer) value)); } } - if( cloudSdkValues.containsKey("VendorId") ) { + if (cloudSdkValues.containsKey("VendorId")) { final Object value = cloudSdkValues.remove("VendorId"); - if( (value == null) || (!value.equals(getVendorId())) ) { + if ((value == null)||(!value.equals(getVendorId()))) { setVendorId(((Integer) value)); } } - if( cloudSdkValues.containsKey("Price") ) { + if (cloudSdkValues.containsKey("Price")) { final Object value = cloudSdkValues.remove("Price"); - if( (value == null) || (!value.equals(getPrice())) ) { + if ((value == null)||(!value.equals(getPrice()))) { setPrice(((BigDecimal) value)); } } - if( cloudSdkValues.containsKey("Image") ) { + if (cloudSdkValues.containsKey("Image")) { final Object value = cloudSdkValues.remove("Image"); - if( (value == null) || (!value.equals(getImage())) ) { + if ((value == null)||(!value.equals(getImage()))) { setImage(((byte[]) value)); } } @@ -375,40 +343,40 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("Vendor") ) { + if ((cloudSdkValues).containsKey("Vendor")) { final Object cloudSdkValue = (cloudSdkValues).remove("Vendor"); - if( cloudSdkValue instanceof Map ) { - if( toVendor == null ) { + if (cloudSdkValue instanceof Map) { + if (toVendor == null) { toVendor = new Vendor(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toVendor.fromMap(inputMap); } } - if( (cloudSdkValues).containsKey("Shelf") ) { + if ((cloudSdkValues).containsKey("Shelf")) { final Object cloudSdkValue = (cloudSdkValues).remove("Shelf"); - if( cloudSdkValue instanceof Iterable ) { - if( toShelf == null ) { + if (cloudSdkValue instanceof Iterable) { + if (toShelf == null) { toShelf = Lists.newArrayList(); } else { toShelf = Lists.newArrayList(toShelf); } int i = 0; - for( Object item : ((Iterable) cloudSdkValue) ) { - if( !(item instanceof Map) ) { + for (Object item: ((Iterable ) cloudSdkValue)) { + if (!(item instanceof Map)) { continue; } Shelf entity; - if( toShelf.size() > i ) { + if (toShelf.size()>i) { entity = toShelf.get(i); } else { entity = new Shelf(); toShelf.add(entity); } i = (i + 1); - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) item); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) item); entity.fromMap(inputMap); } } @@ -419,236 +387,208 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static ProductField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticProductField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new ProductField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static ProductField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticProductField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new ProductField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toVendor != null ) { + if (toVendor!= null) { (cloudSdkValues).put("Vendor", toVendor); } - if( toShelf != null ) { + if (toShelf!= null) { (cloudSdkValues).put("Shelf", toShelf); } return cloudSdkValues; } /** - * Fetches the Vendor entity (one to one) associated with this entity. This corresponds to the OData - * navigation property Vendor. + * Fetches the Vendor entity (one to one) associated with this entity. This corresponds to the OData navigation property Vendor. *

* Please note: This method will not cache or persist the query results. - * - * @return The single associated Vendor entity, or {@code null} if an entity is not associated. + * + * @return + * The single associated Vendor entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Vendor fetchVendor() - { + public Vendor fetchVendor() { return fetchFieldAsSingle("Vendor", Vendor.class); } /** - * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property - * Vendor. + * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property Vendor. *

- * If the navigation property Vendor of a queried Product is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Vendor of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated Vendor entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated Vendor entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Vendor getVendorOrFetch() - { - if( toVendor == null ) { + public Vendor getVendorOrFetch() { + if (toVendor == null) { toVendor = fetchVendor(); } return toVendor; } /** - * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property - * Vendor. + * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property Vendor. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Vendor is already loaded, the result will contain the - * Vendor entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Vendor is already loaded, the result will contain the Vendor entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getVendorIfPresent() - { + public Option getVendorIfPresent() { return Option.of(toVendor); } /** * Overwrites the associated Vendor entity for the loaded navigation property Vendor. - * + * * @param cloudSdkValue - * New Vendor entity. + * New Vendor entity. */ - public void setVendor( final Vendor cloudSdkValue ) - { + public void setVendor(final Vendor cloudSdkValue) { toVendor = cloudSdkValue; } /** - * Fetches the Shelf entities (one to many) associated with this entity. This corresponds to the OData - * navigation property Shelf. + * Fetches the Shelf entities (one to many) associated with this entity. This corresponds to the OData navigation property Shelf. *

* Please note: This method will not cache or persist the query results. - * - * @return List containing one or more associated Shelf entities. If no entities are associated then an empty - * list is returned. + * + * @return + * List containing one or more associated Shelf entities. If no entities are associated then an empty list is returned. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nonnull - public List fetchShelf() - { + public List fetchShelf() { return fetchFieldAsList("Shelf", Shelf.class); } /** - * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property - * Shelf. + * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property Shelf. *

- * If the navigation property Shelf of a queried Product is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Shelf of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated Shelf entities. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated Shelf entities. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nonnull - public List getShelfOrFetch() - { - if( toShelf == null ) { + public List getShelfOrFetch() { + if (toShelf == null) { toShelf = fetchShelf(); } return toShelf; } /** - * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property - * Shelf. + * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property Shelf. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Shelf is already loaded, the result will contain the - * Shelf entities. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Shelf is already loaded, the result will contain the Shelf entities. If not, an Option with result state empty is returned. */ @Nonnull - public Option> getShelfIfPresent() - { + public Option> getShelfIfPresent() { return Option.of(toShelf); } /** * Overwrites the list of associated Shelf entities for the loaded navigation property Shelf. *

- * If the navigation property Shelf of a queried Product is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Shelf of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * * @param cloudSdkValue - * List of Shelf entities. + * List of Shelf entities. */ - public void setShelf( @Nonnull final List cloudSdkValue ) - { - if( toShelf == null ) { + public void setShelf( + @Nonnull + final List cloudSdkValue) { + if (toShelf == null) { toShelf = Lists.newArrayList(); } toShelf.clear(); @@ -656,73 +596,65 @@ public void setShelf( @Nonnull final List cloudSdkValue ) } /** - * Adds elements to the list of associated Shelf entities. This corresponds to the OData navigation property - * Shelf. + * Adds elements to the list of associated Shelf entities. This corresponds to the OData navigation property Shelf. *

- * If the navigation property Shelf of a queried Product is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Shelf of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * * @param entity - * Array of Shelf entities. + * Array of Shelf entities. */ - public void addShelf( Shelf... entity ) - { - if( toShelf == null ) { + public void addShelf(Shelf... entity) { + if (toShelf == null) { toShelf = Lists.newArrayList(); } toShelf.addAll(Lists.newArrayList(entity)); } + /** * Helper class to allow for fluent creation of Product instances. - * + * */ - public final static class ProductBuilder - { + public final static class ProductBuilder { private Vendor toVendor; private List toShelf = Lists.newArrayList(); - private Product.ProductBuilder toVendor( final Vendor cloudSdkValue ) - { + private Product.ProductBuilder toVendor(final Vendor cloudSdkValue) { toVendor = cloudSdkValue; return this; } /** * Navigation property Vendor for Product to single Vendor. - * + * * @param cloudSdkValue - * The Vendor to build this Product with. - * @return This Builder to allow for a fluent interface. + * The Vendor to build this Product with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder vendor( final Vendor cloudSdkValue ) - { + public Product.ProductBuilder vendor(final Vendor cloudSdkValue) { return toVendor(cloudSdkValue); } - private Product.ProductBuilder toShelf( final List cloudSdkValue ) - { + private Product.ProductBuilder toShelf(final List cloudSdkValue) { toShelf.addAll(cloudSdkValue); return this; } /** * Navigation property Shelf for Product to multiple Shelf. - * + * * @param cloudSdkValue - * The Shelfs to build this Product with. - * @return This Builder to allow for a fluent interface. + * The Shelfs to build this Product with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder shelf( Shelf... cloudSdkValue ) - { + public Product.ProductBuilder shelf(Shelf... cloudSdkValue) { return toShelf(Lists.newArrayList(cloudSdkValue)); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java index a1add009e..5c9e713bd 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java @@ -5,57 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product - * Product} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class ProductByKeyFluentHelper extends FluentHelperByKey +public class ProductByKeyFluentHelper + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity with the - * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the - * fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Product} + * Entity Collection to be used to fetch a single {@code Product} * @param servicePath - * Service path to be used to fetch a single {@code Product} + * Service path to be used to fetch a single {@code Product} * @param id - * + * */ public ProductByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Product.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java index b7d8d4a07..d89f20a08 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java @@ -5,17 +5,14 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.sap.cloud.sdk.datamodel.odata.helper.VdmComplex; import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -23,62 +20,54 @@ import lombok.NoArgsConstructor; import lombok.ToString; + /** - *

- * Original complex type name from the Odata EDM: ProductCount - *

- * + *

Original complex type name from the Odata EDM: ProductCount

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class ProductCount extends VdmComplex +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class ProductCount + extends VdmComplex { /** - * Constraints: Not nullable - *

- * Original property from the Odata EDM: ProductId - *

- * + * Constraints: Not nullable

Original property from the Odata EDM: ProductId

+ * * @param productId - * + * */ - @SerializedName( "ProductId" ) - @JsonProperty( "ProductId" ) + @SerializedName("ProductId") + @JsonProperty("ProductId") @Nullable - @ODataField( odataName = "ProductId" ) + @ODataField(odataName = "ProductId") private Integer productId; /** - * Constraints: Not nullable - *

- * Original property from the Odata EDM: Quantity - *

- * + * Constraints: Not nullable

Original property from the Odata EDM: Quantity

+ * * @param quantity - * + * */ - @SerializedName( "Quantity" ) - @JsonProperty( "Quantity" ) + @SerializedName("Quantity") + @JsonProperty("Quantity") @Nullable - @ODataField( odataName = "Quantity" ) + @ODataField(odataName = "Quantity") private Integer quantity; @Nonnull @Override - public Class getType() - { + public Class getType() { return ProductCount.class; } @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("ProductId", getProductId()); cloudSdkValues.put("Quantity", getQuantity()); @@ -86,20 +75,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("ProductId") ) { + if (cloudSdkValues.containsKey("ProductId")) { final Object value = cloudSdkValues.remove("ProductId"); - if( (value == null) || (!value.equals(getProductId())) ) { + if ((value == null)||(!value.equals(getProductId()))) { setProductId(((Integer) value)); } } - if( cloudSdkValues.containsKey("Quantity") ) { + if (cloudSdkValues.containsKey("Quantity")) { final Object value = cloudSdkValues.remove("Quantity"); - if( (value == null) || (!value.equals(getQuantity())) ) { + if ((value == null)||(!value.equals(getQuantity()))) { setQuantity(((Integer) value)); } } @@ -115,38 +103,33 @@ protected void fromMap( final Map inputValues ) @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); return result; } /** - * Constraints: Not nullable - *

- * Original property from the Odata EDM: ProductId - *

- * + * Constraints: Not nullable

Original property from the Odata EDM: ProductId

+ * * @param productId - * The productId to set. + * The productId to set. */ - public void setProductId( @Nullable final Integer productId ) - { + public void setProductId( + @Nullable + final Integer productId) { rememberChangedField("ProductId", this.productId); this.productId = productId; } /** - * Constraints: Not nullable - *

- * Original property from the Odata EDM: Quantity - *

- * + * Constraints: Not nullable

Original property from the Odata EDM: Quantity

+ * * @param quantity - * The quantity to set. + * The quantity to set. */ - public void setQuantity( @Nullable final Integer quantity ) - { + public void setQuantity( + @Nullable + final Integer quantity) { rememberChangedField("Quantity", this.quantity); this.quantity = quantity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java index e715061a0..610efd52d 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java @@ -5,52 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; + /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product - * Product} entity and save it to the S/4HANA system. - *

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ProductCreateFluentHelper extends FluentHelperCreate +public class ProductCreateFluentHelper + extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that - * will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. + * */ private final Product entity; /** - * Creates a fluent helper object that will create a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Product to create. + * The Product to create. */ public ProductCreateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Product entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Product entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Product getEntity() - { + protected Product getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java index dd5474628..467b41b30 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product - * Product} entities. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class ProductFluentHelper extends FluentHelperRead +public class ProductFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public ProductFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public ProductFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Product.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java index fdc7e6026..0e46ba0ac 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; + /** - * Fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the - * S/4HANA system. - *

+ * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ProductUpdateFluentHelper extends FluentHelperUpdate +public class ProductUpdateFluentHelper + extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that - * will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. + * */ private final Product entity; /** - * Creates a fluent helper object that will update a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Product to take the updated values from. + * The Product to take the updated values from. */ public ProductUpdateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Product entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Product entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Product getEntity() - { + protected Product getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java index f29e08110..a034a0994 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java @@ -6,10 +6,8 @@ import java.math.BigDecimal; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -23,7 +21,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -35,441 +32,386 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Receipt - *

- * + *

Original entity name from the Odata EDM: Receipt

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class Receipt extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class Receipt + extends VdmEntity { /** * Selector for all available fields of Receipt. - * + * */ public final static ReceiptSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static ReceiptField ID = new ReceiptField("Id"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CustomerId - *

- * - * @return The customerId contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

+ * + * @return + * The customerId contained in this entity. */ - @SerializedName( "CustomerId" ) - @JsonProperty( "CustomerId" ) + @SerializedName("CustomerId") + @JsonProperty("CustomerId") @Nullable - @ODataField( odataName = "CustomerId" ) + @ODataField(odataName = "CustomerId") private Integer customerId; /** * Use with available fluent helpers to apply the CustomerId field to query operations. - * + * */ public final static ReceiptField CUSTOMER_ID = new ReceiptField("CustomerId"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: TotalAmount - *

- * - * @return The totalAmount contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

+ * + * @return + * The totalAmount contained in this entity. */ - @SerializedName( "TotalAmount" ) - @JsonProperty( "TotalAmount" ) + @SerializedName("TotalAmount") + @JsonProperty("TotalAmount") @Nullable - @ODataField( odataName = "TotalAmount" ) + @ODataField(odataName = "TotalAmount") private BigDecimal totalAmount; /** * Use with available fluent helpers to apply the TotalAmount field to query operations. - * + * */ public final static ReceiptField TOTAL_AMOUNT = new ReceiptField("TotalAmount"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductCount1 - *

- * - * @return The productCount1 contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount1

+ * + * @return + * The productCount1 contained in this entity. */ - @SerializedName( "ProductCount1" ) - @JsonProperty( "ProductCount1" ) + @SerializedName("ProductCount1") + @JsonProperty("ProductCount1") @Nullable - @ODataField( odataName = "ProductCount1" ) + @ODataField(odataName = "ProductCount1") private ProductCount productCount1; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount2 - *

- * - * @return The productCount2 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount2

+ * + * @return + * The productCount2 contained in this entity. */ - @SerializedName( "ProductCount2" ) - @JsonProperty( "ProductCount2" ) + @SerializedName("ProductCount2") + @JsonProperty("ProductCount2") @Nullable - @ODataField( odataName = "ProductCount2" ) + @ODataField(odataName = "ProductCount2") private ProductCount productCount2; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount3 - *

- * - * @return The productCount3 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount3

+ * + * @return + * The productCount3 contained in this entity. */ - @SerializedName( "ProductCount3" ) - @JsonProperty( "ProductCount3" ) + @SerializedName("ProductCount3") + @JsonProperty("ProductCount3") @Nullable - @ODataField( odataName = "ProductCount3" ) + @ODataField(odataName = "ProductCount3") private ProductCount productCount3; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount4 - *

- * - * @return The productCount4 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount4

+ * + * @return + * The productCount4 contained in this entity. */ - @SerializedName( "ProductCount4" ) - @JsonProperty( "ProductCount4" ) + @SerializedName("ProductCount4") + @JsonProperty("ProductCount4") @Nullable - @ODataField( odataName = "ProductCount4" ) + @ODataField(odataName = "ProductCount4") private ProductCount productCount4; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount5 - *

- * - * @return The productCount5 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount5

+ * + * @return + * The productCount5 contained in this entity. */ - @SerializedName( "ProductCount5" ) - @JsonProperty( "ProductCount5" ) + @SerializedName("ProductCount5") + @JsonProperty("ProductCount5") @Nullable - @ODataField( odataName = "ProductCount5" ) + @ODataField(odataName = "ProductCount5") private ProductCount productCount5; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount6 - *

- * - * @return The productCount6 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount6

+ * + * @return + * The productCount6 contained in this entity. */ - @SerializedName( "ProductCount6" ) - @JsonProperty( "ProductCount6" ) + @SerializedName("ProductCount6") + @JsonProperty("ProductCount6") @Nullable - @ODataField( odataName = "ProductCount6" ) + @ODataField(odataName = "ProductCount6") private ProductCount productCount6; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount7 - *

- * - * @return The productCount7 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount7

+ * + * @return + * The productCount7 contained in this entity. */ - @SerializedName( "ProductCount7" ) - @JsonProperty( "ProductCount7" ) + @SerializedName("ProductCount7") + @JsonProperty("ProductCount7") @Nullable - @ODataField( odataName = "ProductCount7" ) + @ODataField(odataName = "ProductCount7") private ProductCount productCount7; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount8 - *

- * - * @return The productCount8 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount8

+ * + * @return + * The productCount8 contained in this entity. */ - @SerializedName( "ProductCount8" ) - @JsonProperty( "ProductCount8" ) + @SerializedName("ProductCount8") + @JsonProperty("ProductCount8") @Nullable - @ODataField( odataName = "ProductCount8" ) + @ODataField(odataName = "ProductCount8") private ProductCount productCount8; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount9 - *

- * - * @return The productCount9 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount9

+ * + * @return + * The productCount9 contained in this entity. */ - @SerializedName( "ProductCount9" ) - @JsonProperty( "ProductCount9" ) + @SerializedName("ProductCount9") + @JsonProperty("ProductCount9") @Nullable - @ODataField( odataName = "ProductCount9" ) + @ODataField(odataName = "ProductCount9") private ProductCount productCount9; /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount10 - *

- * - * @return The productCount10 contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount10

+ * + * @return + * The productCount10 contained in this entity. */ - @SerializedName( "ProductCount10" ) - @JsonProperty( "ProductCount10" ) + @SerializedName("ProductCount10") + @JsonProperty("ProductCount10") @Nullable - @ODataField( odataName = "ProductCount10" ) + @ODataField(odataName = "ProductCount10") private ProductCount productCount10; /** * Navigation property Customer for Receipt to single Customer. - * + * */ - @SerializedName( "Customer" ) - @JsonProperty( "Customer" ) - @ODataField( odataName = "Customer" ) + @SerializedName("Customer") + @JsonProperty("Customer") + @ODataField(odataName = "Customer") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Customer toCustomer; /** * Use with available fluent helpers to apply the Customer navigation property to query operations. - * + * */ public final static ReceiptOneToOneLink TO_CUSTOMER = new ReceiptOneToOneLink("Customer"); @Nonnull @Override - public Class getType() - { + public Class getType() { return Receipt.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: CustomerId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

+ * * @param customerId - * The customerId to set. + * The customerId to set. */ - public void setCustomerId( @Nullable final Integer customerId ) - { + public void setCustomerId( + @Nullable + final Integer customerId) { rememberChangedField("CustomerId", this.customerId); this.customerId = customerId; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: TotalAmount - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

+ * * @param totalAmount - * The totalAmount to set. + * The totalAmount to set. */ - public void setTotalAmount( @Nullable final BigDecimal totalAmount ) - { + public void setTotalAmount( + @Nullable + final BigDecimal totalAmount) { rememberChangedField("TotalAmount", this.totalAmount); this.totalAmount = totalAmount; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: ProductCount1 - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount1

+ * * @param productCount1 - * The productCount1 to set. + * The productCount1 to set. */ - public void setProductCount1( @Nullable final ProductCount productCount1 ) - { + public void setProductCount1( + @Nullable + final ProductCount productCount1) { rememberChangedField("ProductCount1", this.productCount1); this.productCount1 = productCount1; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount2 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount2

+ * * @param productCount2 - * The productCount2 to set. + * The productCount2 to set. */ - public void setProductCount2( @Nullable final ProductCount productCount2 ) - { + public void setProductCount2( + @Nullable + final ProductCount productCount2) { rememberChangedField("ProductCount2", this.productCount2); this.productCount2 = productCount2; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount3 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount3

+ * * @param productCount3 - * The productCount3 to set. + * The productCount3 to set. */ - public void setProductCount3( @Nullable final ProductCount productCount3 ) - { + public void setProductCount3( + @Nullable + final ProductCount productCount3) { rememberChangedField("ProductCount3", this.productCount3); this.productCount3 = productCount3; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount4 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount4

+ * * @param productCount4 - * The productCount4 to set. + * The productCount4 to set. */ - public void setProductCount4( @Nullable final ProductCount productCount4 ) - { + public void setProductCount4( + @Nullable + final ProductCount productCount4) { rememberChangedField("ProductCount4", this.productCount4); this.productCount4 = productCount4; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount5 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount5

+ * * @param productCount5 - * The productCount5 to set. + * The productCount5 to set. */ - public void setProductCount5( @Nullable final ProductCount productCount5 ) - { + public void setProductCount5( + @Nullable + final ProductCount productCount5) { rememberChangedField("ProductCount5", this.productCount5); this.productCount5 = productCount5; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount6 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount6

+ * * @param productCount6 - * The productCount6 to set. + * The productCount6 to set. */ - public void setProductCount6( @Nullable final ProductCount productCount6 ) - { + public void setProductCount6( + @Nullable + final ProductCount productCount6) { rememberChangedField("ProductCount6", this.productCount6); this.productCount6 = productCount6; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount7 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount7

+ * * @param productCount7 - * The productCount7 to set. + * The productCount7 to set. */ - public void setProductCount7( @Nullable final ProductCount productCount7 ) - { + public void setProductCount7( + @Nullable + final ProductCount productCount7) { rememberChangedField("ProductCount7", this.productCount7); this.productCount7 = productCount7; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount8 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount8

+ * * @param productCount8 - * The productCount8 to set. + * The productCount8 to set. */ - public void setProductCount8( @Nullable final ProductCount productCount8 ) - { + public void setProductCount8( + @Nullable + final ProductCount productCount8) { rememberChangedField("ProductCount8", this.productCount8); this.productCount8 = productCount8; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount9 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount9

+ * * @param productCount9 - * The productCount9 to set. + * The productCount9 to set. */ - public void setProductCount9( @Nullable final ProductCount productCount9 ) - { + public void setProductCount9( + @Nullable + final ProductCount productCount9) { rememberChangedField("ProductCount9", this.productCount9); this.productCount9 = productCount9; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: ProductCount10 - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: ProductCount10

+ * * @param productCount10 - * The productCount10 to set. + * The productCount10 to set. */ - public void setProductCount10( @Nullable final ProductCount productCount10 ) - { + public void setProductCount10( + @Nullable + final ProductCount productCount10) { rememberChangedField("ProductCount10", this.productCount10); this.productCount10 = productCount10; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Receipts"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -477,8 +419,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("CustomerId", getCustomerId()); @@ -497,183 +438,182 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("CustomerId") ) { + if (cloudSdkValues.containsKey("CustomerId")) { final Object value = cloudSdkValues.remove("CustomerId"); - if( (value == null) || (!value.equals(getCustomerId())) ) { + if ((value == null)||(!value.equals(getCustomerId()))) { setCustomerId(((Integer) value)); } } - if( cloudSdkValues.containsKey("TotalAmount") ) { + if (cloudSdkValues.containsKey("TotalAmount")) { final Object value = cloudSdkValues.remove("TotalAmount"); - if( (value == null) || (!value.equals(getTotalAmount())) ) { + if ((value == null)||(!value.equals(getTotalAmount()))) { setTotalAmount(((BigDecimal) value)); } } } // structured properties { - if( cloudSdkValues.containsKey("ProductCount1") ) { + if (cloudSdkValues.containsKey("ProductCount1")) { final Object value = cloudSdkValues.remove("ProductCount1"); - if( value instanceof Map ) { - if( getProductCount1() == null ) { + if (value instanceof Map) { + if (getProductCount1() == null) { setProductCount1(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount1().fromMap(inputMap); } - if( (value == null) && (getProductCount1() != null) ) { + if ((value == null)&&(getProductCount1()!= null)) { setProductCount1(null); } } - if( cloudSdkValues.containsKey("ProductCount2") ) { + if (cloudSdkValues.containsKey("ProductCount2")) { final Object value = cloudSdkValues.remove("ProductCount2"); - if( value instanceof Map ) { - if( getProductCount2() == null ) { + if (value instanceof Map) { + if (getProductCount2() == null) { setProductCount2(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount2().fromMap(inputMap); } - if( (value == null) && (getProductCount2() != null) ) { + if ((value == null)&&(getProductCount2()!= null)) { setProductCount2(null); } } - if( cloudSdkValues.containsKey("ProductCount3") ) { + if (cloudSdkValues.containsKey("ProductCount3")) { final Object value = cloudSdkValues.remove("ProductCount3"); - if( value instanceof Map ) { - if( getProductCount3() == null ) { + if (value instanceof Map) { + if (getProductCount3() == null) { setProductCount3(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount3().fromMap(inputMap); } - if( (value == null) && (getProductCount3() != null) ) { + if ((value == null)&&(getProductCount3()!= null)) { setProductCount3(null); } } - if( cloudSdkValues.containsKey("ProductCount4") ) { + if (cloudSdkValues.containsKey("ProductCount4")) { final Object value = cloudSdkValues.remove("ProductCount4"); - if( value instanceof Map ) { - if( getProductCount4() == null ) { + if (value instanceof Map) { + if (getProductCount4() == null) { setProductCount4(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount4().fromMap(inputMap); } - if( (value == null) && (getProductCount4() != null) ) { + if ((value == null)&&(getProductCount4()!= null)) { setProductCount4(null); } } - if( cloudSdkValues.containsKey("ProductCount5") ) { + if (cloudSdkValues.containsKey("ProductCount5")) { final Object value = cloudSdkValues.remove("ProductCount5"); - if( value instanceof Map ) { - if( getProductCount5() == null ) { + if (value instanceof Map) { + if (getProductCount5() == null) { setProductCount5(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount5().fromMap(inputMap); } - if( (value == null) && (getProductCount5() != null) ) { + if ((value == null)&&(getProductCount5()!= null)) { setProductCount5(null); } } - if( cloudSdkValues.containsKey("ProductCount6") ) { + if (cloudSdkValues.containsKey("ProductCount6")) { final Object value = cloudSdkValues.remove("ProductCount6"); - if( value instanceof Map ) { - if( getProductCount6() == null ) { + if (value instanceof Map) { + if (getProductCount6() == null) { setProductCount6(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount6().fromMap(inputMap); } - if( (value == null) && (getProductCount6() != null) ) { + if ((value == null)&&(getProductCount6()!= null)) { setProductCount6(null); } } - if( cloudSdkValues.containsKey("ProductCount7") ) { + if (cloudSdkValues.containsKey("ProductCount7")) { final Object value = cloudSdkValues.remove("ProductCount7"); - if( value instanceof Map ) { - if( getProductCount7() == null ) { + if (value instanceof Map) { + if (getProductCount7() == null) { setProductCount7(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount7().fromMap(inputMap); } - if( (value == null) && (getProductCount7() != null) ) { + if ((value == null)&&(getProductCount7()!= null)) { setProductCount7(null); } } - if( cloudSdkValues.containsKey("ProductCount8") ) { + if (cloudSdkValues.containsKey("ProductCount8")) { final Object value = cloudSdkValues.remove("ProductCount8"); - if( value instanceof Map ) { - if( getProductCount8() == null ) { + if (value instanceof Map) { + if (getProductCount8() == null) { setProductCount8(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount8().fromMap(inputMap); } - if( (value == null) && (getProductCount8() != null) ) { + if ((value == null)&&(getProductCount8()!= null)) { setProductCount8(null); } } - if( cloudSdkValues.containsKey("ProductCount9") ) { + if (cloudSdkValues.containsKey("ProductCount9")) { final Object value = cloudSdkValues.remove("ProductCount9"); - if( value instanceof Map ) { - if( getProductCount9() == null ) { + if (value instanceof Map) { + if (getProductCount9() == null) { setProductCount9(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount9().fromMap(inputMap); } - if( (value == null) && (getProductCount9() != null) ) { + if ((value == null)&&(getProductCount9()!= null)) { setProductCount9(null); } } - if( cloudSdkValues.containsKey("ProductCount10") ) { + if (cloudSdkValues.containsKey("ProductCount10")) { final Object value = cloudSdkValues.remove("ProductCount10"); - if( value instanceof Map ) { - if( getProductCount10() == null ) { + if (value instanceof Map) { + if (getProductCount10() == null) { setProductCount10(new ProductCount()); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) value); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) value); getProductCount10().fromMap(inputMap); } - if( (value == null) && (getProductCount10() != null) ) { + if ((value == null)&&(getProductCount10()!= null)) { setProductCount10(null); } } } // navigation properties { - if( (cloudSdkValues).containsKey("Customer") ) { + if ((cloudSdkValues).containsKey("Customer")) { final Object cloudSdkValue = (cloudSdkValues).remove("Customer"); - if( cloudSdkValue instanceof Map ) { - if( toCustomer == null ) { + if (cloudSdkValue instanceof Map) { + if (toCustomer == null) { toCustomer = new Customer(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toCustomer.fromMap(inputMap); } } @@ -683,177 +623,167 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static ReceiptField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticReceiptField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new ReceiptField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static ReceiptField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticReceiptField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new ReceiptField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toCustomer != null ) { + if (toCustomer!= null) { (cloudSdkValues).put("Customer", toCustomer); } return cloudSdkValues; } /** - * Fetches the Customer entity (one to one) associated with this entity. This corresponds to the OData - * navigation property Customer. + * Fetches the Customer entity (one to one) associated with this entity. This corresponds to the OData navigation property Customer. *

* Please note: This method will not cache or persist the query results. - * - * @return The single associated Customer entity, or {@code null} if an entity is not associated. + * + * @return + * The single associated Customer entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Customer fetchCustomer() - { + public Customer fetchCustomer() { return fetchFieldAsSingle("Customer", Customer.class); } /** - * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property - * Customer. + * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property Customer. *

- * If the navigation property Customer of a queried Receipt is operated lazily, an - * ODataException can be thrown in case of an OData query error. + * If the navigation property Customer of a queried Receipt is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated Customer entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated Customer entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Customer getCustomerOrFetch() - { - if( toCustomer == null ) { + public Customer getCustomerOrFetch() { + if (toCustomer == null) { toCustomer = fetchCustomer(); } return toCustomer; } /** - * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property - * Customer. + * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property Customer. *

- * If the navigation property for an entity Receipt has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Customer is already loaded, the result will contain the - * Customer entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Receipt has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Customer is already loaded, the result will contain the Customer entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getCustomerIfPresent() - { + public Option getCustomerIfPresent() { return Option.of(toCustomer); } /** * Overwrites the associated Customer entity for the loaded navigation property Customer. - * + * * @param cloudSdkValue - * New Customer entity. + * New Customer entity. */ - public void setCustomer( final Customer cloudSdkValue ) - { + public void setCustomer(final Customer cloudSdkValue) { toCustomer = cloudSdkValue; } + /** * Helper class to allow for fluent creation of Receipt instances. - * + * */ - public final static class ReceiptBuilder - { + public final static class ReceiptBuilder { private Customer toCustomer; - private Receipt.ReceiptBuilder toCustomer( final Customer cloudSdkValue ) - { + private Receipt.ReceiptBuilder toCustomer(final Customer cloudSdkValue) { toCustomer = cloudSdkValue; return this; } /** * Navigation property Customer for Receipt to single Customer. - * + * * @param cloudSdkValue - * The Customer to build this Receipt with. - * @return This Builder to allow for a fluent interface. + * The Customer to build this Receipt with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Receipt.ReceiptBuilder customer( final Customer cloudSdkValue ) - { + public Receipt.ReceiptBuilder customer(final Customer cloudSdkValue) { return toCustomer(cloudSdkValue); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java index 7827edf47..d458c58ef 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java @@ -5,57 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt - * Receipt} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class ReceiptByKeyFluentHelper extends FluentHelperByKey +public class ReceiptByKeyFluentHelper + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity with the - * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the - * fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Receipt} + * Entity Collection to be used to fetch a single {@code Receipt} * @param servicePath - * Service path to be used to fetch a single {@code Receipt} + * Service path to be used to fetch a single {@code Receipt} * @param id - * + * */ public ReceiptByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Receipt.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java index 14e347b5f..d2025f06b 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java @@ -5,52 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; + /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt - * Receipt} entity and save it to the S/4HANA system. - *

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ReceiptCreateFluentHelper extends FluentHelperCreate +public class ReceiptCreateFluentHelper + extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that - * will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. + * */ private final Receipt entity; /** - * Creates a fluent helper object that will create a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Receipt to create. + * The Receipt to create. */ public ReceiptCreateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Receipt entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Receipt entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Receipt getEntity() - { + protected Receipt getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java index a85097306..055c7651b 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt - * Receipt} entities. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class ReceiptFluentHelper extends FluentHelperRead +public class ReceiptFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public ReceiptFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public ReceiptFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Receipt.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java index 84faec390..ef9ae9150 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java @@ -6,68 +6,62 @@ import java.net.URI; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpUriRequest; - import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; + /** * Fluent helper for the RevokeReceipt OData function import. - * + * */ public class RevokeReceiptFluentHelper - extends - SingleValuedFluentHelperFunction + extends SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the RevokeReceipt OData function import with the provided - * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will execute the RevokeReceipt OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. * @param receiptId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ReceiptId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

*/ - public RevokeReceiptFluentHelper( @Nonnull final String servicePath, @Nonnull final Integer receiptId ) - { + public RevokeReceiptFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final Integer receiptId) { super(servicePath); values.put("ReceiptId", receiptId); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return String.class; } @Override @Nonnull - protected String getFunctionName() - { + protected String getFunctionName() { return "RevokeReceipt"; } @Override @Nullable - protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) - { - if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { + protected JsonElement refineJsonResponse( + @Nullable + JsonElement jsonElement) { + if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -75,26 +69,27 @@ protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) @Override @Nonnull - protected Map getParameters() - { + protected Map getParameters() { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( @Nonnull final URI uri ) - { + protected HttpUriRequest createRequest( + @Nonnull + final URI uri) { return new HttpPost(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public String executeRequest( @Nonnull final Destination destination ) - { + public String executeRequest( + @Nonnull + final Destination destination) { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java index 9286e9649..8656ee8d7 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java @@ -6,10 +6,8 @@ import java.util.List; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -25,7 +23,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -37,143 +34,132 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Shelf - *

- * + *

Original entity name from the Odata EDM: Shelf

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class Shelf extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class Shelf + extends VdmEntity { /** * Selector for all available fields of Shelf. - * + * */ public final static ShelfSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static ShelfField ID = new ShelfField("Id"); /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: FloorPlanId - *

- * - * @return The floorPlanId contained in this entity. + * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

+ * + * @return + * The floorPlanId contained in this entity. */ - @SerializedName( "FloorPlanId" ) - @JsonProperty( "FloorPlanId" ) + @SerializedName("FloorPlanId") + @JsonProperty("FloorPlanId") @Nullable - @ODataField( odataName = "FloorPlanId" ) + @ODataField(odataName = "FloorPlanId") private Integer floorPlanId; /** * Use with available fluent helpers to apply the FloorPlanId field to query operations. - * + * */ public final static ShelfField FLOOR_PLAN_ID = new ShelfField("FloorPlanId"); /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * */ - @SerializedName( "FloorPlan" ) - @JsonProperty( "FloorPlan" ) - @ODataField( odataName = "FloorPlan" ) + @SerializedName("FloorPlan") + @JsonProperty("FloorPlan") + @ODataField(odataName = "FloorPlan") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private FloorPlan toFloorPlan; /** * Navigation property Products for Shelf to multiple Product. - * + * */ - @SerializedName( "Products" ) - @JsonProperty( "Products" ) - @ODataField( odataName = "Products" ) - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @SerializedName("Products") + @JsonProperty("Products") + @ODataField(odataName = "Products") + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private List toProducts; /** * Use with available fluent helpers to apply the FloorPlan navigation property to query operations. - * + * */ public final static ShelfOneToOneLink TO_FLOOR_PLAN = new ShelfOneToOneLink("FloorPlan"); /** * Use with available fluent helpers to apply the Products navigation property to query operations. - * + * */ public final static ShelfLink TO_PRODUCTS = new ShelfLink("Products"); @Nonnull @Override - public Class getType() - { + public Class getType() { return Shelf.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable - *

- * Original property name from the Odata EDM: FloorPlanId - *

- * + * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

+ * * @param floorPlanId - * The floorPlanId to set. + * The floorPlanId to set. */ - public void setFloorPlanId( @Nullable final Integer floorPlanId ) - { + public void setFloorPlanId( + @Nullable + final Integer floorPlanId) { rememberChangedField("FloorPlanId", this.floorPlanId); this.floorPlanId = floorPlanId; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Shelves"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -181,8 +167,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("FloorPlanId", getFloorPlanId()); @@ -190,20 +175,19 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("FloorPlanId") ) { + if (cloudSdkValues.containsKey("FloorPlanId")) { final Object value = cloudSdkValues.remove("FloorPlanId"); - if( (value == null) || (!value.equals(getFloorPlanId())) ) { + if ((value == null)||(!value.equals(getFloorPlanId()))) { setFloorPlanId(((Integer) value)); } } @@ -213,40 +197,40 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("FloorPlan") ) { + if ((cloudSdkValues).containsKey("FloorPlan")) { final Object cloudSdkValue = (cloudSdkValues).remove("FloorPlan"); - if( cloudSdkValue instanceof Map ) { - if( toFloorPlan == null ) { + if (cloudSdkValue instanceof Map) { + if (toFloorPlan == null) { toFloorPlan = new FloorPlan(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toFloorPlan.fromMap(inputMap); } } - if( (cloudSdkValues).containsKey("Products") ) { + if ((cloudSdkValues).containsKey("Products")) { final Object cloudSdkValue = (cloudSdkValues).remove("Products"); - if( cloudSdkValue instanceof Iterable ) { - if( toProducts == null ) { + if (cloudSdkValue instanceof Iterable) { + if (toProducts == null) { toProducts = Lists.newArrayList(); } else { toProducts = Lists.newArrayList(toProducts); } int i = 0; - for( Object item : ((Iterable) cloudSdkValue) ) { - if( !(item instanceof Map) ) { + for (Object item: ((Iterable ) cloudSdkValue)) { + if (!(item instanceof Map)) { continue; } Product entity; - if( toProducts.size() > i ) { + if (toProducts.size()>i) { entity = toProducts.get(i); } else { entity = new Product(); toProducts.add(entity); } i = (i + 1); - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) item); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) item); entity.fromMap(inputMap); } } @@ -257,237 +241,208 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static ShelfField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticShelfField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new ShelfField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static ShelfField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticShelfField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new ShelfField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toFloorPlan != null ) { + if (toFloorPlan!= null) { (cloudSdkValues).put("FloorPlan", toFloorPlan); } - if( toProducts != null ) { + if (toProducts!= null) { (cloudSdkValues).put("Products", toProducts); } return cloudSdkValues; } /** - * Fetches the FloorPlan entity (one to one) associated with this entity. This corresponds to the OData - * navigation property FloorPlan. + * Fetches the FloorPlan entity (one to one) associated with this entity. This corresponds to the OData navigation property FloorPlan. *

* Please note: This method will not cache or persist the query results. - * - * @return The single associated FloorPlan entity, or {@code null} if an entity is not associated. + * + * @return + * The single associated FloorPlan entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public FloorPlan fetchFloorPlan() - { + public FloorPlan fetchFloorPlan() { return fetchFieldAsSingle("FloorPlan", FloorPlan.class); } /** - * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property - * FloorPlan. + * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property FloorPlan. *

- * If the navigation property FloorPlan of a queried Shelf is operated lazily, an - * ODataException can be thrown in case of an OData query error. + * If the navigation property FloorPlan of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated FloorPlan entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated FloorPlan entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public FloorPlan getFloorPlanOrFetch() - { - if( toFloorPlan == null ) { + public FloorPlan getFloorPlanOrFetch() { + if (toFloorPlan == null) { toFloorPlan = fetchFloorPlan(); } return toFloorPlan; } /** - * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property - * FloorPlan. + * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property FloorPlan. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property FloorPlan is already loaded, the result will contain - * the FloorPlan entity. If not, an Option with result state empty is - * returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property FloorPlan is already loaded, the result will contain the FloorPlan entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getFloorPlanIfPresent() - { + public Option getFloorPlanIfPresent() { return Option.of(toFloorPlan); } /** * Overwrites the associated FloorPlan entity for the loaded navigation property FloorPlan. - * + * * @param cloudSdkValue - * New FloorPlan entity. + * New FloorPlan entity. */ - public void setFloorPlan( final FloorPlan cloudSdkValue ) - { + public void setFloorPlan(final FloorPlan cloudSdkValue) { toFloorPlan = cloudSdkValue; } /** - * Fetches the Product entities (one to many) associated with this entity. This corresponds to the OData - * navigation property Products. + * Fetches the Product entities (one to many) associated with this entity. This corresponds to the OData navigation property Products. *

* Please note: This method will not cache or persist the query results. - * - * @return List containing one or more associated Product entities. If no entities are associated then an - * empty list is returned. + * + * @return + * List containing one or more associated Product entities. If no entities are associated then an empty list is returned. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nonnull - public List fetchProducts() - { + public List fetchProducts() { return fetchFieldAsList("Products", Product.class); } /** - * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property - * Products. + * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated Product entities. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated Product entities. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nonnull - public List getProductsOrFetch() - { - if( toProducts == null ) { + public List getProductsOrFetch() { + if (toProducts == null) { toProducts = fetchProducts(); } return toProducts; } /** - * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property - * Products. + * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property Products. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Products is already loaded, the result will contain the - * Product entities. If not, an Option with result state empty is returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Products is already loaded, the result will contain the Product entities. If not, an Option with result state empty is returned. */ @Nonnull - public Option> getProductsIfPresent() - { + public Option> getProductsIfPresent() { return Option.of(toProducts); } /** * Overwrites the list of associated Product entities for the loaded navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * * @param cloudSdkValue - * List of Product entities. + * List of Product entities. */ - public void setProducts( @Nonnull final List cloudSdkValue ) - { - if( toProducts == null ) { + public void setProducts( + @Nonnull + final List cloudSdkValue) { + if (toProducts == null) { toProducts = Lists.newArrayList(); } toProducts.clear(); @@ -495,73 +450,65 @@ public void setProducts( @Nonnull final List cloudSdkValue ) } /** - * Adds elements to the list of associated Product entities. This corresponds to the OData navigation - * property Products. + * Adds elements to the list of associated Product entities. This corresponds to the OData navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * * @param entity - * Array of Product entities. + * Array of Product entities. */ - public void addProducts( Product... entity ) - { - if( toProducts == null ) { + public void addProducts(Product... entity) { + if (toProducts == null) { toProducts = Lists.newArrayList(); } toProducts.addAll(Lists.newArrayList(entity)); } + /** * Helper class to allow for fluent creation of Shelf instances. - * + * */ - public final static class ShelfBuilder - { + public final static class ShelfBuilder { private FloorPlan toFloorPlan; private List toProducts = Lists.newArrayList(); - private Shelf.ShelfBuilder toFloorPlan( final FloorPlan cloudSdkValue ) - { + private Shelf.ShelfBuilder toFloorPlan(final FloorPlan cloudSdkValue) { toFloorPlan = cloudSdkValue; return this; } /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * * @param cloudSdkValue - * The FloorPlan to build this Shelf with. - * @return This Builder to allow for a fluent interface. + * The FloorPlan to build this Shelf with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder floorPlan( final FloorPlan cloudSdkValue ) - { + public Shelf.ShelfBuilder floorPlan(final FloorPlan cloudSdkValue) { return toFloorPlan(cloudSdkValue); } - private Shelf.ShelfBuilder toProducts( final List cloudSdkValue ) - { + private Shelf.ShelfBuilder toProducts(final List cloudSdkValue) { toProducts.addAll(cloudSdkValue); return this; } /** * Navigation property Products for Shelf to multiple Product. - * + * * @param cloudSdkValue - * The Products to build this Shelf with. - * @return This Builder to allow for a fluent interface. + * The Products to build this Shelf with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder products( Product... cloudSdkValue ) - { + public Shelf.ShelfBuilder products(Product... cloudSdkValue) { return toProducts(Lists.newArrayList(cloudSdkValue)); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java index 8303f3f22..1b396e3e6 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java @@ -5,57 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf - * Shelf} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class ShelfByKeyFluentHelper extends FluentHelperByKey +public class ShelfByKeyFluentHelper + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity with the provided - * key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent - * helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Shelf} + * Entity Collection to be used to fetch a single {@code Shelf} * @param servicePath - * Service path to be used to fetch a single {@code Shelf} + * Service path to be used to fetch a single {@code Shelf} * @param id - * + * */ public ShelfByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Shelf.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java index cb46ff78c..76ee92a38 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java @@ -5,52 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; + /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity and save it to the S/4HANA system. - *

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ShelfCreateFluentHelper extends FluentHelperCreate +public class ShelfCreateFluentHelper + extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will - * be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. + * */ private final Shelf entity; /** - * Creates a fluent helper object that will create a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Shelf to create. + * The Shelf to create. */ public ShelfCreateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Shelf entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Shelf entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Shelf getEntity() - { + protected Shelf getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java index 25997351b..b6c3902a3 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java @@ -5,52 +5,48 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperDelete; + /** - * Fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf - * Shelf} entity in the S/4HANA system. - *

+ * Fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ShelfDeleteFluentHelper extends FluentHelperDelete +public class ShelfDeleteFluentHelper + extends FluentHelperDelete { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will - * be deleted in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. + * */ private final Shelf entity; /** - * Creates a fluent helper object that will delete a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will delete a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * The entity collection to direct the update requests to. + * The entity collection to direct the update requests to. * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Shelf to delete from the endpoint. + * The Shelf to delete from the endpoint. */ public ShelfDeleteFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Shelf entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Shelf entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Shelf getEntity() - { + protected Shelf getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java index 4e2511bfe..130b24a92 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf - * Shelf} entities. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class ShelfFluentHelper extends FluentHelperRead +public class ShelfFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public ShelfFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public ShelfFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Shelf.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java index f401060a5..0bd66e405 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java @@ -5,50 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; + /** - * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf - * Shelf} entity and save it to the S/4HANA system. - *

+ * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system.

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ShelfUpdateFluentHelper extends FluentHelperUpdate +public class ShelfUpdateFluentHelper + extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will - * be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. + * */ private final Shelf entity; /** - * Creates a fluent helper object that will update a - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData - * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper - * object. - * + * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Shelf to take the updated values from. + * The Shelf to take the updated values from. */ public ShelfUpdateFluentHelper( - @Nonnull final String servicePath, - @Nonnull final Shelf entity, - @Nonnull final String entityCollection ) - { + @Nonnull + final String servicePath, + @Nonnull + final Shelf entity, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Shelf getEntity() - { + protected Shelf getEntity() { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java index 758f1759e..c8ca82972 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java @@ -5,10 +5,8 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -22,7 +20,6 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; - import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -34,161 +31,146 @@ import lombok.Setter; import lombok.ToString; + /** - *

- * Original entity name from the Odata EDM: Vendor - *

- * + *

Original entity name from the Odata EDM: Vendor

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString( doNotUseGetters = true, callSuper = true ) -@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) -@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) -public class Vendor extends VdmEntity +@ToString(doNotUseGetters = true, callSuper = true) +@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) +@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) +public class Vendor + extends VdmEntity { /** * Selector for all available fields of Vendor. - * + * */ public final static VendorSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * - * @return The id contained in this entity. + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * + * @return + * The id contained in this entity. */ @Key - @SerializedName( "Id" ) - @JsonProperty( "Id" ) + @SerializedName("Id") + @JsonProperty("Id") @Nullable - @ODataField( odataName = "Id" ) + @ODataField(odataName = "Id") private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static VendorField ID = new VendorField("Id"); /** - * Constraints: Not nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- * - * @return The name contained in this entity. + * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

+ * + * @return + * The name contained in this entity. */ - @SerializedName( "Name" ) - @JsonProperty( "Name" ) + @SerializedName("Name") + @JsonProperty("Name") @Nullable - @ODataField( odataName = "Name" ) + @ODataField(odataName = "Name") private String name; /** * Use with available fluent helpers to apply the Name field to query operations. - * + * */ public final static VendorField NAME = new VendorField("Name"); /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: AddressId - *

- * - * @return The addressId contained in this entity. + * Constraints: Nullable

Original property name from the Odata EDM: AddressId

+ * + * @return + * The addressId contained in this entity. */ - @SerializedName( "AddressId" ) - @JsonProperty( "AddressId" ) + @SerializedName("AddressId") + @JsonProperty("AddressId") @Nullable - @ODataField( odataName = "AddressId" ) + @ODataField(odataName = "AddressId") private Integer addressId; /** * Use with available fluent helpers to apply the AddressId field to query operations. - * + * */ public final static VendorField ADDRESS_ID = new VendorField("AddressId"); /** * Navigation property Address for Vendor to single Address. - * + * */ - @SerializedName( "Address" ) - @JsonProperty( "Address" ) - @ODataField( odataName = "Address" ) + @SerializedName("Address") + @JsonProperty("Address") + @ODataField(odataName = "Address") @Nullable - @Getter( AccessLevel.NONE ) - @Setter( AccessLevel.NONE ) + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) private Address toAddress; /** * Use with available fluent helpers to apply the Address navigation property to query operations. - * + * */ public final static VendorOneToOneLink
TO_ADDRESS = new VendorOneToOneLink
("Address"); @Nonnull @Override - public Class getType() - { + public Class getType() { return Vendor.class; } /** - * (Key Field) Constraints: Not nullable - *

- * Original property name from the Odata EDM: Id - *

- * + * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( @Nullable final Integer id ) - { + public void setId( + @Nullable + final Integer id) { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable, Maximum length: 100 - *

- * Original property name from the Odata EDM: Name - *

- * + * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

+ * * @param name - * The name to set. + * The name to set. */ - public void setName( @Nullable final String name ) - { + public void setName( + @Nullable + final String name) { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Nullable - *

- * Original property name from the Odata EDM: AddressId - *

- * + * Constraints: Nullable

Original property name from the Odata EDM: AddressId

+ * * @param addressId - * The addressId to set. + * The addressId to set. */ - public void setAddressId( @Nullable final Integer addressId ) - { + public void setAddressId( + @Nullable + final Integer addressId) { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected String getEntityCollection() - { + protected String getEntityCollection() { return "Vendors"; } @Nonnull @Override - protected Map getKey() - { + protected Map getKey() { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -196,8 +178,7 @@ protected Map getKey() @Nonnull @Override - protected Map toMapOfFields() - { + protected Map toMapOfFields() { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -206,26 +187,25 @@ protected Map toMapOfFields() } @Override - protected void fromMap( final Map inputValues ) - { + protected void fromMap(final Map inputValues) { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if( cloudSdkValues.containsKey("Id") ) { + if (cloudSdkValues.containsKey("Id")) { final Object value = cloudSdkValues.remove("Id"); - if( (value == null) || (!value.equals(getId())) ) { + if ((value == null)||(!value.equals(getId()))) { setId(((Integer) value)); } } - if( cloudSdkValues.containsKey("Name") ) { + if (cloudSdkValues.containsKey("Name")) { final Object value = cloudSdkValues.remove("Name"); - if( (value == null) || (!value.equals(getName())) ) { + if ((value == null)||(!value.equals(getName()))) { setName(((String) value)); } } - if( cloudSdkValues.containsKey("AddressId") ) { + if (cloudSdkValues.containsKey("AddressId")) { final Object value = cloudSdkValues.remove("AddressId"); - if( (value == null) || (!value.equals(getAddressId())) ) { + if ((value == null)||(!value.equals(getAddressId()))) { setAddressId(((Integer) value)); } } @@ -235,14 +215,14 @@ protected void fromMap( final Map inputValues ) } // navigation properties { - if( (cloudSdkValues).containsKey("Address") ) { + if ((cloudSdkValues).containsKey("Address")) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if( cloudSdkValue instanceof Map ) { - if( toAddress == null ) { + if (cloudSdkValue instanceof Map) { + if (toAddress == null) { toAddress = new Address(); } - @SuppressWarnings( "unchecked" ) - final Map inputMap = ((Map) cloudSdkValue); + @SuppressWarnings("unchecked") + final Map inputMap = ((Map ) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -252,177 +232,167 @@ protected void fromMap( final Map inputValues ) /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return + * A representation of an extension field from this entity. */ @Nonnull - public static VendorField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) - { + public staticVendorField field( + @Nonnull + final String fieldName, + @Nonnull + final Class fieldType) { return new VendorField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return + * A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public static VendorField field( - @Nonnull final String fieldName, - @Nonnull final TypeConverter typeConverter ) - { + public staticVendorField field( + @Nonnull + final String fieldName, + @Nonnull + final TypeConverter typeConverter) { return new VendorField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() - { + public Destination getDestinationForFetch() { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) - { + protected void setServicePathForFetch( + @Nullable + final String servicePathForFetch) { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) - { + public void attachToService( + @Nullable + final String servicePath, + @Nonnull + final Destination destination) { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() - { + protected String getDefaultServicePath() { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() - { + protected Map toMapOfNavigationProperties() { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if( toAddress != null ) { + if (toAddress!= null) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData - * navigation property Address. + * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData navigation property Address. *

* Please note: This method will not cache or persist the query results. - * - * @return The single associated Address entity, or {@code null} if an entity is not associated. + * + * @return + * The single associated Address entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Address fetchAddress() - { + public Address fetchAddress() { return fetchFieldAsSingle("Address", Address.class); } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property - * Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. *

- * If the navigation property Address of a queried Vendor is operated lazily, an ODataException - * can be thrown in case of an OData query error. + * If the navigation property Address of a queried Vendor is operated lazily, an ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and - * persisting of items from a navigation property. If a lazy property is requested by the application for the - * first time and it has not yet been loaded, an OData query will be run in order to load the missing information - * and its result will get cached for future invocations. - * - * @return List of associated Address entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. + * + * @return + * List of associated Address entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and - * therefore has no ERP configuration context assigned. An entity is managed if it has been either - * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or - * UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. */ @Nullable - public Address getAddressOrFetch() - { - if( toAddress == null ) { + public Address getAddressOrFetch() { + if (toAddress == null) { toAddress = fetchAddress(); } return toAddress; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property - * Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. *

- * If the navigation property for an entity Vendor has not been resolved yet, this method will not - * query further information. Instead its Option result state will be empty. - * - * @return If the information for navigation property Address is already loaded, the result will contain the - * Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Vendor has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. + * + * @return + * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() - { + public Option
getAddressIfPresent() { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress( final Address cloudSdkValue ) - { + public void setAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; } + /** * Helper class to allow for fluent creation of Vendor instances. - * + * */ - public final static class VendorBuilder - { + public final static class VendorBuilder { private Address toAddress; - private Vendor.VendorBuilder toAddress( final Address cloudSdkValue ) - { + private Vendor.VendorBuilder toAddress(final Address cloudSdkValue) { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Vendor to single Address. - * + * * @param cloudSdkValue - * The Address to build this Vendor with. - * @return This Builder to allow for a fluent interface. + * The Address to build this Vendor with. + * @return + * This Builder to allow for a fluent interface. */ @Nonnull - public Vendor.VendorBuilder address( final Address cloudSdkValue ) - { + public Vendor.VendorBuilder address(final Address cloudSdkValue) { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java index 3c2e288b4..25a1c4659 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java @@ -5,57 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; - import javax.annotation.Nonnull; - import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; + /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor - * Vendor} entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class VendorByKeyFluentHelper extends FluentHelperByKey +public class VendorByKeyFluentHelper + extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity with the - * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the - * fluent helper object. - * + * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Vendor} + * Entity Collection to be used to fetch a single {@code Vendor} * @param servicePath - * Service path to be used to fetch a single {@code Vendor} + * Service path to be used to fetch a single {@code Vendor} * @param id - * + * */ public VendorByKeyFluentHelper( - @Nonnull final String servicePath, - @Nonnull final String entityCollection, - final Integer id ) - { + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection, final Integer id) { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Vendor.class; } @Override @Nonnull - protected Map getKey() - { + protected Map getKey() { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java index 5b11850a3..4d3394315 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java @@ -5,36 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; + /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor - * Vendor} entities. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ -public class VendorFluentHelper extends FluentHelperRead +public class VendorFluentHelper + extends FluentHelperRead { + /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public VendorFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) - { + public VendorFluentHelper( + @Nonnull + final String servicePath, + @Nonnull + final String entityCollection) { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() - { + protected Class getEntityClass() { return Vendor.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java index adc6a950c..294896d44 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java @@ -5,20 +5,16 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchFluentHelperBasic; + /** - * Default implementation of the {@link SdkGroceryStoreServiceBatch} interface exposed in the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}, allowing you - * to create multiple changesets and finally execute the batch request. - * + * Default implementation of the {@link SdkGroceryStoreServiceBatch} interface exposed in the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}, allowing you to create multiple changesets and finally execute the batch request. + * */ public class DefaultSdkGroceryStoreServiceBatch - extends - BatchFluentHelperBasic - implements - SdkGroceryStoreServiceBatch + extends BatchFluentHelperBasic + implements SdkGroceryStoreServiceBatch { @Nonnull @@ -28,50 +24,48 @@ public class DefaultSdkGroceryStoreServiceBatch /** * Creates a new instance of this DefaultSdkGroceryStoreServiceBatch. - * + * * @param service - * The service to execute all operations in this changeset on. + * The service to execute all operations in this changeset on. */ public DefaultSdkGroceryStoreServiceBatch( - @Nonnull final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service ) - { + @Nonnull + final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service) { this(service, com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } /** * Creates a new instance of this DefaultSdkGroceryStoreServiceBatch. - * + * * @param service - * The service to execute all operations in this changeset on. + * The service to execute all operations in this changeset on. * @param servicePath - * The custom service path to operate on. + * The custom service path to operate on. */ public DefaultSdkGroceryStoreServiceBatch( - @Nonnull final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service, - @Nonnull final String servicePath ) - { + @Nonnull + final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service, + @Nonnull + final String servicePath) { this.service = service; this.servicePath = servicePath; } @Nonnull @Override - protected String getServicePathForBatchRequest() - { + protected String getServicePathForBatchRequest() { return servicePath; } @Nonnull @Override - protected DefaultSdkGroceryStoreServiceBatch getThis() - { + protected DefaultSdkGroceryStoreServiceBatch getThis() { return this; } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet beginChangeSet() - { + public SdkGroceryStoreServiceBatchChangeSet beginChangeSet() { return new DefaultSdkGroceryStoreServiceBatchChangeSet(this, service); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java index 56ece6e0f..79766fdd4 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java @@ -5,7 +5,6 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchChangeSetFluentHelperBasic; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; @@ -14,111 +13,119 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; + /** - * Implementation of the {@link SdkGroceryStoreServiceBatchChangeSet} interface, enabling you to combine multiple - * operations into one changeset. For further information have a look into the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. - * + * Implementation of the {@link SdkGroceryStoreServiceBatchChangeSet} interface, enabling you to combine multiple operations into one changeset. For further information have a look into the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. + * */ public class DefaultSdkGroceryStoreServiceBatchChangeSet - extends - BatchChangeSetFluentHelperBasic - implements - SdkGroceryStoreServiceBatchChangeSet + extends BatchChangeSetFluentHelperBasic + implements SdkGroceryStoreServiceBatchChangeSet { @Nonnull private final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service; DefaultSdkGroceryStoreServiceBatchChangeSet( - @Nonnull final DefaultSdkGroceryStoreServiceBatch batchFluentHelper, - @Nonnull final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service ) - { + @Nonnull + final DefaultSdkGroceryStoreServiceBatch batchFluentHelper, + @Nonnull + final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service) { super(batchFluentHelper, batchFluentHelper); this.service = service; } @Nonnull @Override - protected DefaultSdkGroceryStoreServiceBatchChangeSet getThis() - { + protected DefaultSdkGroceryStoreServiceBatchChangeSet getThis() { return this; } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createCustomer( @Nonnull final Customer customer ) - { + public SdkGroceryStoreServiceBatchChangeSet createCustomer( + @Nonnull + final Customer customer) { return addRequestCreate(service::createCustomer, customer); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createProduct( @Nonnull final Product product ) - { + public SdkGroceryStoreServiceBatchChangeSet createProduct( + @Nonnull + final Product product) { return addRequestCreate(service::createProduct, product); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateProduct( @Nonnull final Product product ) - { + public SdkGroceryStoreServiceBatchChangeSet updateProduct( + @Nonnull + final Product product) { return addRequestUpdate(service::updateProduct, product); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createReceipt( @Nonnull final Receipt receipt ) - { + public SdkGroceryStoreServiceBatchChangeSet createReceipt( + @Nonnull + final Receipt receipt) { return addRequestCreate(service::createReceipt, receipt); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createAddress( @Nonnull final Address address ) - { + public SdkGroceryStoreServiceBatchChangeSet createAddress( + @Nonnull + final Address address) { return addRequestCreate(service::createAddress, address); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateAddress( @Nonnull final Address address ) - { + public SdkGroceryStoreServiceBatchChangeSet updateAddress( + @Nonnull + final Address address) { return addRequestUpdate(service::updateAddress, address); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet deleteAddress( @Nonnull final Address address ) - { + public SdkGroceryStoreServiceBatchChangeSet deleteAddress( + @Nonnull + final Address address) { return addRequestDelete(service::deleteAddress, address); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createShelf( @Nonnull final Shelf shelf ) - { + public SdkGroceryStoreServiceBatchChangeSet createShelf( + @Nonnull + final Shelf shelf) { return addRequestCreate(service::createShelf, shelf); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateShelf( @Nonnull final Shelf shelf ) - { + public SdkGroceryStoreServiceBatchChangeSet updateShelf( + @Nonnull + final Shelf shelf) { return addRequestUpdate(service::updateShelf, shelf); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet deleteShelf( @Nonnull final Shelf shelf ) - { + public SdkGroceryStoreServiceBatchChangeSet deleteShelf( + @Nonnull + final Shelf shelf) { return addRequestDelete(service::deleteShelf, shelf); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( @Nonnull final OpeningHours openingHours ) - { + public SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( + @Nonnull + final OpeningHours openingHours) { return addRequestUpdate(service::updateOpeningHours, openingHours); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java index e0fd008a0..31ff446be 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java @@ -6,14 +6,14 @@ import com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperServiceBatch; + /** - * Interface to the batch object of an - * {@code com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService} service. - * + * Interface to the batch object of an {@code com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService} service. + * */ public interface SdkGroceryStoreServiceBatch - extends - FluentHelperServiceBatch + extends FluentHelperServiceBatch { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java index 6c4d7ae35..9130ba400 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java @@ -5,7 +5,6 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperBatchChangeSet; import com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperBatchEndChangeSet; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; @@ -15,158 +14,157 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; + /** - * This interface enables you to combine multiple operations into one change set. For further information have a look - * into the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. - * + * This interface enables you to combine multiple operations into one change set. For further information have a look into the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. + * */ public interface SdkGroceryStoreServiceBatchChangeSet - extends - FluentHelperBatchChangeSet, - FluentHelperBatchEndChangeSet + extends FluentHelperBatchChangeSet , FluentHelperBatchEndChangeSet { + /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * object that will be created in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createCustomer( @Nonnull final Customer customer ); + SdkGroceryStoreServiceBatchChangeSet createCustomer( + @Nonnull + final Customer customer); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be created in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createProduct( @Nonnull final Product product ); + SdkGroceryStoreServiceBatchChangeSet createProduct( + @Nonnull + final Product product); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be updated in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateProduct( @Nonnull final Product product ); + SdkGroceryStoreServiceBatchChangeSet updateProduct( + @Nonnull + final Product product); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * object that will be created in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createReceipt( @Nonnull final Receipt receipt ); + SdkGroceryStoreServiceBatchChangeSet createReceipt( + @Nonnull + final Receipt receipt); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be created in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createAddress( @Nonnull final Address address ); + SdkGroceryStoreServiceBatchChangeSet createAddress( + @Nonnull + final Address address); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be updated in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateAddress( @Nonnull final Address address ); + SdkGroceryStoreServiceBatchChangeSet updateAddress( + @Nonnull + final Address address); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be deleted in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet deleteAddress( @Nonnull final Address address ); + SdkGroceryStoreServiceBatchChangeSet deleteAddress( + @Nonnull + final Address address); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and - * save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object - * that will be created in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createShelf( @Nonnull final Shelf shelf ); + SdkGroceryStoreServiceBatchChangeSet createShelf( + @Nonnull + final Shelf shelf); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object - * that will be updated in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateShelf( @Nonnull final Shelf shelf ); + SdkGroceryStoreServiceBatchChangeSet updateShelf( + @Nonnull + final Shelf shelf); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object - * that will be deleted in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet deleteShelf( @Nonnull final Shelf shelf ); + SdkGroceryStoreServiceBatchChangeSet deleteShelf( + @Nonnull + final Shelf shelf); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity object that will be updated in the S/4HANA system. - * @return This fluent helper to continue adding operations to the change set. To finalize the current change set - * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. + * @return + * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( @Nonnull final OpeningHours openingHours ); + SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( + @Nonnull + final OpeningHours openingHours); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java index 209f047c0..d1185198a 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. Instances of this object - * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a - * provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class AddressField extends EntityField implements AddressSelectable +public class AddressField + extends EntityField + implements AddressSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public AddressField( final String fieldName ) - { + public AddressField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public AddressField( final String fieldName, final TypeConverter typeConverter ) - { + public AddressField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java index 727405a04..7b886678f 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. Instances of this - * object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value - * with a provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class CustomerField extends EntityField implements CustomerSelectable +public class CustomerField + extends EntityField + implements CustomerSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public CustomerField( final String fieldName ) - { + public CustomerField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public CustomerField( final String fieldName, final TypeConverter typeConverter ) - { + public CustomerField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java index 6e5bb4d87..70a244aff 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. Instances of this - * object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value - * with a provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class FloorPlanField extends EntityField implements FloorPlanSelectable +public class FloorPlanField + extends EntityField + implements FloorPlanSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public FloorPlanField( final String fieldName ) - { + public FloorPlanField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public FloorPlanField( final String fieldName, final TypeConverter typeConverter ) - { + public FloorPlanField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java index c184120b6..ef5fdc617 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. Instances of - * this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's - * value with a provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class OpeningHoursField extends EntityField implements OpeningHoursSelectable +public class OpeningHoursField + extends EntityField + implements OpeningHoursSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursField( final String fieldName ) - { + public OpeningHoursField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursField( final String fieldName, final TypeConverter typeConverter ) - { + public OpeningHoursField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java index 245997532..2bc507e75 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. Instances of this object - * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a - * provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class ProductField extends EntityField implements ProductSelectable +public class ProductField + extends EntityField + implements ProductSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ProductField( final String fieldName ) - { + public ProductField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ProductField( final String fieldName, final TypeConverter typeConverter ) - { + public ProductField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java index 2c8531115..aaa7daced 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. Instances of this object - * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a - * provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class ReceiptField extends EntityField implements ReceiptSelectable +public class ReceiptField + extends EntityField + implements ReceiptSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ReceiptField( final String fieldName ) - { + public ReceiptField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ReceiptField( final String fieldName, final TypeConverter typeConverter ) - { + public ReceiptField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java index 8e8f7b548..69722b97e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. Instances of this object are - * used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a - * provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class ShelfField extends EntityField implements ShelfSelectable +public class ShelfField + extends EntityField + implements ShelfSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ShelfField( final String fieldName ) - { + public ShelfField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ShelfField( final String fieldName, final TypeConverter typeConverter ) - { + public ShelfField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java index bc2347ede..61671adf8 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java @@ -9,48 +9,43 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; + /** - * Template class to represent entity fields of the Entity - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. Instances of this object - * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a - * provided value. - * + * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class VendorField extends EntityField implements VendorSelectable +public class VendorField + extends EntityField + implements VendorSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public VendorField( final String fieldName ) - { + public VendorField(final String fieldName) { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to - * add a type converter that will be automatically used by the respective entity when getting or setting custom - * fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the - * type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public VendorField( final String fieldName, final TypeConverter typeConverter ) - { + public VendorField(final String fieldName, final TypeConverter typeConverter) { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java index 645b60ddf..4651ea1fd 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities. - * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare - * a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class AddressLink> extends EntityLink, Address, ObjectT> - implements - AddressSelectable +public class AddressLink > + extends EntityLink , Address, ObjectT> + implements AddressSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public AddressLink( final String fieldName ) - { + public AddressLink(final String fieldName) { super(fieldName); } - private AddressLink( final EntityLink, Address, ObjectT> toClone ) - { + private AddressLink(final EntityLink , Address, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected AddressLink translateLinkType( final EntityLink, Address, ObjectT> link ) - { + protected AddressLink translateLinkType(final EntityLink , Address, ObjectT> link) { return new AddressLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java index d2e2bb4a0..1fbf5c4b9 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities, where - * the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink} and provides - * an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class AddressOneToOneLink> extends AddressLink - implements - OneToOneLink +public class AddressOneToOneLink > + extends AddressLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public AddressOneToOneLink( final String fieldName ) - { + public AddressOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper
filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper
filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java index b5a439567..f2994c233 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities. - * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare - * a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class CustomerLink> extends EntityLink, Customer, ObjectT> - implements - CustomerSelectable +public class CustomerLink > + extends EntityLink , Customer, ObjectT> + implements CustomerSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public CustomerLink( final String fieldName ) - { + public CustomerLink(final String fieldName) { super(fieldName); } - private CustomerLink( final EntityLink, Customer, ObjectT> toClone ) - { + private CustomerLink(final EntityLink , Customer, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected CustomerLink translateLinkType( final EntityLink, Customer, ObjectT> link ) - { + protected CustomerLink translateLinkType(final EntityLink , Customer, ObjectT> link) { return new CustomerLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java index 41993217d..2d0c2ae57 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities, - * where the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink} and - * provides an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class CustomerOneToOneLink> extends CustomerLink - implements - OneToOneLink +public class CustomerOneToOneLink > + extends CustomerLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public CustomerOneToOneLink( final String fieldName ) - { + public CustomerOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java index 42da4b121..1057e5b6a 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java @@ -5,52 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities. - * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare - * a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class FloorPlanLink> extends EntityLink, FloorPlan, ObjectT> - implements - FloorPlanSelectable +public class FloorPlanLink > + extends EntityLink , FloorPlan, ObjectT> + implements FloorPlanSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public FloorPlanLink( final String fieldName ) - { + public FloorPlanLink(final String fieldName) { super(fieldName); } - private FloorPlanLink( final EntityLink, FloorPlan, ObjectT> toClone ) - { + private FloorPlanLink(final EntityLink , FloorPlan, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected FloorPlanLink translateLinkType( - final EntityLink, FloorPlan, ObjectT> link ) - { + protected FloorPlanLink translateLinkType(final EntityLink , FloorPlan, ObjectT> link) { return new FloorPlanLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java index 993567000..0c7831383 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities, - * where the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink FloorPlanLink} and - * provides an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink FloorPlanLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class FloorPlanOneToOneLink> extends FloorPlanLink - implements - OneToOneLink +public class FloorPlanOneToOneLink > + extends FloorPlanLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public FloorPlanOneToOneLink( final String fieldName ) - { + public FloorPlanOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java index 5dabccdcc..2e4c9c5e1 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java @@ -5,54 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other - * entities. Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods - * to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class OpeningHoursLink> - extends - EntityLink, OpeningHours, ObjectT> - implements - OpeningHoursSelectable +public class OpeningHoursLink > + extends EntityLink , OpeningHours, ObjectT> + implements OpeningHoursSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursLink( final String fieldName ) - { + public OpeningHoursLink(final String fieldName) { super(fieldName); } - private OpeningHoursLink( final EntityLink, OpeningHours, ObjectT> toClone ) - { + private OpeningHoursLink(final EntityLink , OpeningHours, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected OpeningHoursLink translateLinkType( - final EntityLink, OpeningHours, ObjectT> link ) - { + protected OpeningHoursLink translateLinkType(final EntityLink , OpeningHours, ObjectT> link) { return new OpeningHoursLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java index 566e2e001..1a79e2cc3 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java @@ -5,54 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other - * entities, where the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink} - * and provides an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class OpeningHoursOneToOneLink> extends OpeningHoursLink - implements - OneToOneLink +public class OpeningHoursOneToOneLink > + extends OpeningHoursLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursOneToOneLink( final String fieldName ) - { + public OpeningHoursOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override public ExpressionFluentHelper filter( - @Nonnull final ExpressionFluentHelper filterExpression ) - { + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java index a13a92c9e..73ef5e53e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities. - * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare - * a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ProductLink> extends EntityLink, Product, ObjectT> - implements - ProductSelectable +public class ProductLink > + extends EntityLink , Product, ObjectT> + implements ProductSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ProductLink( final String fieldName ) - { + public ProductLink(final String fieldName) { super(fieldName); } - private ProductLink( final EntityLink, Product, ObjectT> toClone ) - { + private ProductLink(final EntityLink , Product, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected ProductLink translateLinkType( final EntityLink, Product, ObjectT> link ) - { + protected ProductLink translateLinkType(final EntityLink , Product, ObjectT> link) { return new ProductLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java index 147781303..6d662b46d 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities, where - * the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink} and provides - * an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ProductOneToOneLink> extends ProductLink - implements - OneToOneLink +public class ProductOneToOneLink > + extends ProductLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ProductOneToOneLink( final String fieldName ) - { + public ProductOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java index 1b0cf89ba..524156c44 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities. - * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare - * a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ReceiptLink> extends EntityLink, Receipt, ObjectT> - implements - ReceiptSelectable +public class ReceiptLink > + extends EntityLink , Receipt, ObjectT> + implements ReceiptSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ReceiptLink( final String fieldName ) - { + public ReceiptLink(final String fieldName) { super(fieldName); } - private ReceiptLink( final EntityLink, Receipt, ObjectT> toClone ) - { + private ReceiptLink(final EntityLink , Receipt, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected ReceiptLink translateLinkType( final EntityLink, Receipt, ObjectT> link ) - { + protected ReceiptLink translateLinkType(final EntityLink , Receipt, ObjectT> link) { return new ReceiptLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java index 13a7fa861..a0b8c61d9 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities, where - * the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink} and provides - * an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ReceiptOneToOneLink> extends ReceiptLink - implements - OneToOneLink +public class ReceiptOneToOneLink > + extends ReceiptLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ReceiptOneToOneLink( final String fieldName ) - { + public ReceiptOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java index fd8fe87e7..c18ec916d 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities. Instances - * of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's - * value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ShelfLink> extends EntityLink, Shelf, ObjectT> - implements - ShelfSelectable +public class ShelfLink > + extends EntityLink , Shelf, ObjectT> + implements ShelfSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ShelfLink( final String fieldName ) - { + public ShelfLink(final String fieldName) { super(fieldName); } - private ShelfLink( final EntityLink, Shelf, ObjectT> toClone ) - { + private ShelfLink(final EntityLink , Shelf, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected ShelfLink translateLinkType( final EntityLink, Shelf, ObjectT> link ) - { + protected ShelfLink translateLinkType(final EntityLink , Shelf, ObjectT> link) { return new ShelfLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java index 9c8296f06..ab4cdac75 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities, where the - * cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink} and provides an - * additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ShelfOneToOneLink> extends ShelfLink - implements - OneToOneLink +public class ShelfOneToOneLink > + extends ShelfLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ShelfOneToOneLink( final String fieldName ) - { + public ShelfOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java index 6703a69cc..632199902 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java @@ -5,51 +5,46 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities. - * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare - * a field's value with a provided value. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities. Instances of this object are used in query modifier methods of the entity + * fluent helpers. Contains methods to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class VendorLink> extends EntityLink, Vendor, ObjectT> - implements - VendorSelectable +public class VendorLink > + extends EntityLink , Vendor, ObjectT> + implements VendorSelectable { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public VendorLink( final String fieldName ) - { + public VendorLink(final String fieldName) { super(fieldName); } - private VendorLink( final EntityLink, Vendor, ObjectT> toClone ) - { + private VendorLink(final EntityLink , Vendor, ObjectT> toClone) { super(toClone); } @Nonnull @Override - protected VendorLink translateLinkType( final EntityLink, Vendor, ObjectT> link ) - { + protected VendorLink translateLinkType(final EntityLink , Vendor, ObjectT> link) { return new VendorLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java index cdae3b110..2e2998e78 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java @@ -5,53 +5,47 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor; + /** - * Template class to represent entity navigation links of - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities, where - * the cardinality of the related entity is at most 1. This class extends - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink} and provides - * an additional filter function. - * + * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink} and provides an additional filter function. * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class VendorOneToOneLink> extends VendorLink - implements - OneToOneLink +public class VendorOneToOneLink > + extends VendorLink + implements OneToOneLink { + /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying - * OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public VendorOneToOneLink( final String fieldName ) - { + public VendorOneToOneLink(final String fieldName) { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a - * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection - * of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return + * A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) - { + public ExpressionFluentHelper filter( + @Nonnull + final ExpressionFluentHelper filterExpression) { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java index d3336352f..6b9309499 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java @@ -7,14 +7,11 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. This interface is used - * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.AddressField AddressField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.AddressField AddressField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#STREET STREET}
  • @@ -25,9 +22,11 @@ *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#LATITUDE LATITUDE}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#LONGITUDE LONGITUDE}
  • *
- * + * */ -public interface AddressSelectable extends EntitySelectable
+public interface AddressSelectable + extends EntitySelectable
{ + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java index 75f72c266..7db625d89 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java @@ -7,14 +7,11 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. This interface is used - * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.CustomerField CustomerField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.CustomerField CustomerField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#NAME NAME}
  • @@ -22,9 +19,11 @@ *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#ADDRESS_ID ADDRESS_ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#TO_ADDRESS TO_ADDRESS}
  • *
- * + * */ -public interface CustomerSelectable extends EntitySelectable +public interface CustomerSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java index ea50ca9d8..edcf26ef6 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java @@ -7,22 +7,20 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. This interface is - * used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.FloorPlanField - * FloorPlanField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink - * FloorPlanLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.FloorPlanField FloorPlanField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink FloorPlanLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan#IMAGE_URI IMAGE_URI}
  • *
- * + * */ -public interface FloorPlanSelectable extends EntitySelectable +public interface FloorPlanSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java index 352cfe404..0c11f0cb5 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java @@ -7,26 +7,22 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. This interface - * is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.OpeningHoursField - * OpeningHoursField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.OpeningHoursField OpeningHoursField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#ID ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#DAY_OF_WEEK - * DAY_OF_WEEK}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#DAY_OF_WEEK DAY_OF_WEEK}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#OPEN_TIME OPEN_TIME}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#CLOSE_TIME - * CLOSE_TIME}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#CLOSE_TIME CLOSE_TIME}
  • *
- * + * */ -public interface OpeningHoursSelectable extends EntitySelectable +public interface OpeningHoursSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java index 82e522e6c..1357a6ddc 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java @@ -7,14 +7,11 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. This interface is used - * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ProductField ProductField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ProductField ProductField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#NAME NAME}
  • @@ -25,9 +22,11 @@ *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#TO_VENDOR TO_VENDOR}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#TO_SHELF TO_SHELF}
  • *
- * + * */ -public interface ProductSelectable extends EntitySelectable +public interface ProductSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java index 23abc7fae..531e708e0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java @@ -7,24 +7,22 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. This interface is used - * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ReceiptField ReceiptField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ReceiptField ReceiptField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#CUSTOMER_ID CUSTOMER_ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#TOTAL_AMOUNT - * TOTAL_AMOUNT}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#TOTAL_AMOUNT TOTAL_AMOUNT}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#TO_CUSTOMER TO_CUSTOMER}
  • *
- * + * */ -public interface ReceiptSelectable extends EntitySelectable +public interface ReceiptSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java index f06cad99a..5ce456211 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java @@ -7,25 +7,22 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. This interface is used by - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ShelfField ShelfField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ShelfField ShelfField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#ID ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#FLOOR_PLAN_ID - * FLOOR_PLAN_ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#TO_FLOOR_PLAN - * TO_FLOOR_PLAN}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#FLOOR_PLAN_ID FLOOR_PLAN_ID}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#TO_FLOOR_PLAN TO_FLOOR_PLAN}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#TO_PRODUCTS TO_PRODUCTS}
  • *
- * + * */ -public interface ShelfSelectable extends EntitySelectable +public interface ShelfSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java index 28e956abf..5327fe557 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java @@ -7,23 +7,22 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor; + /** - * Interface to enable OData entity selectors for - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. This interface is used by - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.VendorField VendorField} and - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink}. - * - *

- * Available instances: + * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.VendorField VendorField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink}. + * + *

Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#NAME NAME}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#ADDRESS_ID ADDRESS_ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#TO_ADDRESS TO_ADDRESS}
  • *
- * + * */ -public interface VendorSelectable extends EntitySelectable +public interface VendorSelectable + extends EntitySelectable { + } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java index d54a8cad6..151a58670 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java @@ -5,9 +5,7 @@ package com.sap.cloud.sdk.datamodel.odata.sample.services; import java.time.LocalDateTime; - import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressCreateFluentHelper; @@ -48,17 +46,13 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch.DefaultSdkGroceryStoreServiceBatch; + /** - *

Details:

- * - * - * - * - * - *
OData Service:SDK_Grocery_Store
- * + *

Details:

OData Service:SDK_Grocery_Store
+ * */ -public class DefaultSdkGroceryStoreService implements SdkGroceryStoreService +public class DefaultSdkGroceryStoreService + implements SdkGroceryStoreService { @Nonnull @@ -66,10 +60,9 @@ public class DefaultSdkGroceryStoreService implements SdkGroceryStoreService /** * Creates a service using {@link SdkGroceryStoreService#DEFAULT_SERVICE_PATH} to send the requests. - * + * */ - public DefaultSdkGroceryStoreService() - { + public DefaultSdkGroceryStoreService() { servicePath = SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @@ -77,253 +70,255 @@ public DefaultSdkGroceryStoreService() * Creates a service using the provided service path to send the requests. *

* Used by the fluent {@link #withServicePath(String)} method. - * + * */ - private DefaultSdkGroceryStoreService( @Nonnull final String servicePath ) - { + private DefaultSdkGroceryStoreService( + @Nonnull + final String servicePath) { this.servicePath = servicePath; } @Override @Nonnull - public DefaultSdkGroceryStoreService withServicePath( @Nonnull final String servicePath ) - { + public DefaultSdkGroceryStoreService withServicePath( + @Nonnull + final String servicePath) { return new DefaultSdkGroceryStoreService(servicePath); } @Override @Nonnull - public DefaultSdkGroceryStoreServiceBatch batch() - { + public DefaultSdkGroceryStoreServiceBatch batch() { return new DefaultSdkGroceryStoreServiceBatch(this, servicePath); } @Override @Nonnull - public CustomerFluentHelper getAllCustomer() - { + public CustomerFluentHelper getAllCustomer() { return new CustomerFluentHelper(servicePath, "Customers"); } @Override @Nonnull - public CustomerByKeyFluentHelper getCustomerByKey( final Integer id ) - { + public CustomerByKeyFluentHelper getCustomerByKey(final Integer id) { return new CustomerByKeyFluentHelper(servicePath, "Customers", id); } @Override @Nonnull - public CustomerCreateFluentHelper createCustomer( @Nonnull final Customer customer ) - { + public CustomerCreateFluentHelper createCustomer( + @Nonnull + final Customer customer) { return new CustomerCreateFluentHelper(servicePath, customer, "Customers"); } @Override @Nonnull - public ProductFluentHelper getAllProduct() - { + public ProductFluentHelper getAllProduct() { return new ProductFluentHelper(servicePath, "Products"); } @Override @Nonnull - public ProductByKeyFluentHelper getProductByKey( final Integer id ) - { + public ProductByKeyFluentHelper getProductByKey(final Integer id) { return new ProductByKeyFluentHelper(servicePath, "Products", id); } @Override @Nonnull - public ProductCreateFluentHelper createProduct( @Nonnull final Product product ) - { + public ProductCreateFluentHelper createProduct( + @Nonnull + final Product product) { return new ProductCreateFluentHelper(servicePath, product, "Products"); } @Override @Nonnull - public ProductUpdateFluentHelper updateProduct( @Nonnull final Product product ) - { + public ProductUpdateFluentHelper updateProduct( + @Nonnull + final Product product) { return new ProductUpdateFluentHelper(servicePath, product, "Products"); } @Override @Nonnull - public ReceiptFluentHelper getAllReceipt() - { + public ReceiptFluentHelper getAllReceipt() { return new ReceiptFluentHelper(servicePath, "Receipts"); } @Override @Nonnull - public ReceiptByKeyFluentHelper getReceiptByKey( final Integer id ) - { + public ReceiptByKeyFluentHelper getReceiptByKey(final Integer id) { return new ReceiptByKeyFluentHelper(servicePath, "Receipts", id); } @Override @Nonnull - public ReceiptCreateFluentHelper createReceipt( @Nonnull final Receipt receipt ) - { + public ReceiptCreateFluentHelper createReceipt( + @Nonnull + final Receipt receipt) { return new ReceiptCreateFluentHelper(servicePath, receipt, "Receipts"); } @Override @Nonnull - public AddressFluentHelper getAllAddress() - { + public AddressFluentHelper getAllAddress() { return new AddressFluentHelper(servicePath, "Addresses"); } @Override @Nonnull - public AddressByKeyFluentHelper getAddressByKey( final Integer id ) - { + public AddressByKeyFluentHelper getAddressByKey(final Integer id) { return new AddressByKeyFluentHelper(servicePath, "Addresses", id); } @Override @Nonnull - public AddressCreateFluentHelper createAddress( @Nonnull final Address address ) - { + public AddressCreateFluentHelper createAddress( + @Nonnull + final Address address) { return new AddressCreateFluentHelper(servicePath, address, "Addresses"); } @Override @Nonnull - public AddressUpdateFluentHelper updateAddress( @Nonnull final Address address ) - { + public AddressUpdateFluentHelper updateAddress( + @Nonnull + final Address address) { return new AddressUpdateFluentHelper(servicePath, address, "Addresses"); } @Override @Nonnull - public AddressDeleteFluentHelper deleteAddress( @Nonnull final Address address ) - { + public AddressDeleteFluentHelper deleteAddress( + @Nonnull + final Address address) { return new AddressDeleteFluentHelper(servicePath, address, "Addresses"); } @Override @Nonnull - public ShelfFluentHelper getAllShelf() - { + public ShelfFluentHelper getAllShelf() { return new ShelfFluentHelper(servicePath, "Shelves"); } @Override @Nonnull - public ShelfByKeyFluentHelper getShelfByKey( final Integer id ) - { + public ShelfByKeyFluentHelper getShelfByKey(final Integer id) { return new ShelfByKeyFluentHelper(servicePath, "Shelves", id); } @Override @Nonnull - public ShelfCreateFluentHelper createShelf( @Nonnull final Shelf shelf ) - { + public ShelfCreateFluentHelper createShelf( + @Nonnull + final Shelf shelf) { return new ShelfCreateFluentHelper(servicePath, shelf, "Shelves"); } @Override @Nonnull - public ShelfUpdateFluentHelper updateShelf( @Nonnull final Shelf shelf ) - { + public ShelfUpdateFluentHelper updateShelf( + @Nonnull + final Shelf shelf) { return new ShelfUpdateFluentHelper(servicePath, shelf, "Shelves"); } @Override @Nonnull - public ShelfDeleteFluentHelper deleteShelf( @Nonnull final Shelf shelf ) - { + public ShelfDeleteFluentHelper deleteShelf( + @Nonnull + final Shelf shelf) { return new ShelfDeleteFluentHelper(servicePath, shelf, "Shelves"); } @Override @Nonnull - public OpeningHoursFluentHelper getAllOpeningHours() - { + public OpeningHoursFluentHelper getAllOpeningHours() { return new OpeningHoursFluentHelper(servicePath, "OpeningHours"); } @Override @Nonnull - public OpeningHoursByKeyFluentHelper getOpeningHoursByKey( final Integer id ) - { + public OpeningHoursByKeyFluentHelper getOpeningHoursByKey(final Integer id) { return new OpeningHoursByKeyFluentHelper(servicePath, "OpeningHours", id); } @Override @Nonnull - public OpeningHoursUpdateFluentHelper updateOpeningHours( @Nonnull final OpeningHours openingHours ) - { + public OpeningHoursUpdateFluentHelper updateOpeningHours( + @Nonnull + final OpeningHours openingHours) { return new OpeningHoursUpdateFluentHelper(servicePath, openingHours, "OpeningHours"); } @Override @Nonnull - public VendorFluentHelper getAllVendor() - { + public VendorFluentHelper getAllVendor() { return new VendorFluentHelper(servicePath, "Vendors"); } @Override @Nonnull - public VendorByKeyFluentHelper getVendorByKey( final Integer id ) - { + public VendorByKeyFluentHelper getVendorByKey(final Integer id) { return new VendorByKeyFluentHelper(servicePath, "Vendors", id); } @Override @Nonnull - public FloorPlanFluentHelper getAllFloorPlan() - { + public FloorPlanFluentHelper getAllFloorPlan() { return new FloorPlanFluentHelper(servicePath, "Floors"); } @Override @Nonnull - public FloorPlanByKeyFluentHelper getFloorPlanByKey( final Integer id ) - { + public FloorPlanByKeyFluentHelper getFloorPlanByKey(final Integer id) { return new FloorPlanByKeyFluentHelper(servicePath, "Floors", id); } @Override @Nonnull - public PrintReceiptFluentHelper printReceipt( @Nonnull final Integer receiptId ) - { + public PrintReceiptFluentHelper printReceipt( + @Nonnull + final Integer receiptId) { return new PrintReceiptFluentHelper(servicePath, receiptId); } @Override @Nonnull - public RevokeReceiptFluentHelper revokeReceipt( @Nonnull final Integer receiptId ) - { + public RevokeReceiptFluentHelper revokeReceipt( + @Nonnull + final Integer receiptId) { return new RevokeReceiptFluentHelper(servicePath, receiptId); } @Override @Nonnull - public IsStoreOpenFluentHelper isStoreOpen( @Nonnull final LocalDateTime dateTime ) - { + public IsStoreOpenFluentHelper isStoreOpen( + @Nonnull + final LocalDateTime dateTime) { return new IsStoreOpenFluentHelper(servicePath, dateTime); } @Override @Nonnull public OrderProductFluentHelper orderProduct( - @Nonnull final Integer customerId, - @Nonnull final Integer productId, - @Nonnull final Integer quantity ) - { + @Nonnull + final Integer customerId, + @Nonnull + final Integer productId, + @Nonnull + final Integer quantity) { return new OrderProductFluentHelper(servicePath, customerId, productId, quantity); } @Override @Nonnull - public - GetProductQuantitiesFluentHelper - getProductQuantities( @Nonnull final Integer shelfId, @Nonnull final Integer productId ) - { + public GetProductQuantitiesFluentHelper getProductQuantities( + @Nonnull + final Integer shelfId, + @Nonnull + final Integer productId) { return new GetProductQuantitiesFluentHelper(servicePath, shelfId, productId); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java index e98534bbf..0caa305b6 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java @@ -5,9 +5,7 @@ package com.sap.cloud.sdk.datamodel.odata.sample.services; import java.time.LocalDateTime; - import javax.annotation.Nonnull; - import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchService; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper; @@ -49,577 +47,412 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch.SdkGroceryStoreServiceBatch; + /** - *

Details:

- * - * - * - * - * - *
OData Service:SDK_Grocery_Store
- * + *

Details:

OData Service:SDK_Grocery_Store
+ * */ -public interface SdkGroceryStoreService extends BatchService +public interface SdkGroceryStoreService + extends BatchService { /** - * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path - * used to access the endpoint. - * + * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path used to access the endpoint. + * */ String DEFAULT_SERVICE_PATH = "/com.sap.cloud.sdk.store.grocery"; /** - * Overrides the default service path and returns a new service instance with the specified service path. Also - * adjusts the respective entity URLs. - * + * Overrides the default service path and returns a new service instance with the specified service path. Also adjusts the respective entity URLs. + * * @param servicePath - * Service path that will override the default. - * @return A new service instance with the specified service path. + * Service path that will override the default. + * @return + * A new service instance with the specified service path. */ @Nonnull - SdkGroceryStoreService withServicePath( @Nonnull final String servicePath ); + SdkGroceryStoreService withServicePath( + @Nonnull + final String servicePath); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} - * entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. - * This fluent helper allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull CustomerFluentHelper getAllCustomer(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} - * entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. + * * @param id - * Customer identifier used as entity key value. - *

- * Constraints: Not nullable - *

- * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * using key fields. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * Customer identifier used as entity key value.

Constraints: Not nullable

+ * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - CustomerByKeyFluentHelper getCustomerByKey( final Integer id ); + CustomerByKeyFluentHelper getCustomerByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity - * object that will be created in the S/4HANA system. - * @return A fluent helper to create a new - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerCreateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. + * @return + * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerCreateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - CustomerCreateFluentHelper createCustomer( @Nonnull final Customer customer ); + CustomerCreateFluentHelper createCustomer( + @Nonnull + final Customer customer); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} - * entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. - * This fluent helper allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull ProductFluentHelper getAllProduct(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using - * key fields. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ProductByKeyFluentHelper getProductByKey( final Integer id ); + ProductByKeyFluentHelper getProductByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be created in the S/4HANA system. - * @return A fluent helper to create a new - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductCreateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. + * @return + * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductCreateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ProductCreateFluentHelper createProduct( @Nonnull final Product product ); + ProductCreateFluentHelper createProduct( + @Nonnull + final Product product); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity - * object that will be updated in the S/4HANA system. - * @return A fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductUpdateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. + * @return + * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductUpdateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ProductUpdateFluentHelper updateProduct( @Nonnull final Product product ); + ProductUpdateFluentHelper updateProduct( + @Nonnull + final Product product); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} - * entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. - * This fluent helper allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull ReceiptFluentHelper getAllReceipt(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using - * key fields. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ReceiptByKeyFluentHelper getReceiptByKey( final Integer id ); + ReceiptByKeyFluentHelper getReceiptByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity - * object that will be created in the S/4HANA system. - * @return A fluent helper to create a new - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptCreateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. + * @return + * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptCreateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ReceiptCreateFluentHelper createReceipt( @Nonnull final Receipt receipt ); + ReceiptCreateFluentHelper createReceipt( + @Nonnull + final Receipt receipt); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} - * entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. - * This fluent helper allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull AddressFluentHelper getAllAddress(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using - * key fields. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - AddressByKeyFluentHelper getAddressByKey( final Integer id ); + AddressByKeyFluentHelper getAddressByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be created in the S/4HANA system. - * @return A fluent helper to create a new - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressCreateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. + * @return + * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressCreateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - AddressCreateFluentHelper createAddress( @Nonnull final Address address ); + AddressCreateFluentHelper createAddress( + @Nonnull + final Address address); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} - * entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be updated in the S/4HANA system. - * @return A fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressUpdateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. + * @return + * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressUpdateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - AddressUpdateFluentHelper updateAddress( @Nonnull final Address address ); + AddressUpdateFluentHelper updateAddress( + @Nonnull + final Address address); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity - * object that will be deleted in the S/4HANA system. - * @return A fluent helper to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressDeleteFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. + * @return + * A fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressDeleteFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - AddressDeleteFluentHelper deleteAddress( @Nonnull final Address address ); + AddressDeleteFluentHelper deleteAddress( + @Nonnull + final Address address); /** * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This - * fluent helper allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull ShelfFluentHelper getAllShelf(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key - * fields. This fluent helper allows methods which modify the underlying query to be called before executing - * the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ShelfByKeyFluentHelper getShelfByKey( final Integer id ); + ShelfByKeyFluentHelper getShelfByKey(final Integer id); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and - * save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object - * that will be created in the S/4HANA system. - * @return A fluent helper to create a new - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfCreateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. + * @return + * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfCreateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ShelfCreateFluentHelper createShelf( @Nonnull final Shelf shelf ); + ShelfCreateFluentHelper createShelf( + @Nonnull + final Shelf shelf); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity - * and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object - * that will be updated in the S/4HANA system. - * @return A fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfUpdateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. + * @return + * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfUpdateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ShelfUpdateFluentHelper updateShelf( @Nonnull final Shelf shelf ); + ShelfUpdateFluentHelper updateShelf( + @Nonnull + final Shelf shelf); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} - * entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object - * that will be deleted in the S/4HANA system. - * @return A fluent helper to delete an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To - * perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfDeleteFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. + * @return + * A fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfDeleteFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - ShelfDeleteFluentHelper deleteShelf( @Nonnull final Shelf shelf ); + ShelfDeleteFluentHelper deleteShelf( + @Nonnull + final Shelf shelf); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entities. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull OpeningHoursFluentHelper getAllOpeningHours(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity using key fields. This fluent helper allows methods which modify the underlying query to be called - * before executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - OpeningHoursByKeyFluentHelper getOpeningHoursByKey( final Integer id ); + OpeningHoursByKeyFluentHelper getOpeningHoursByKey(final Integer id); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours - * OpeningHours} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity object that will be updated in the S/4HANA system. - * @return A fluent helper to update an existing - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} - * entity. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursUpdateFluentHelper#execute - * execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. + * @return + * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursUpdateFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - OpeningHoursUpdateFluentHelper updateOpeningHours( @Nonnull final OpeningHours openingHours ); + OpeningHoursUpdateFluentHelper updateOpeningHours( + @Nonnull + final OpeningHours openingHours); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} - * entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. This - * fluent helper allows methods which modify the underlying query to be called before executing the query - * itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull VendorFluentHelper getAllVendor(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity - * using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using - * key fields. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - VendorByKeyFluentHelper getVendorByKey( final Integer id ); + VendorByKeyFluentHelper getVendorByKey(final Integer id); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} - * entities. - * - * @return A fluent helper to fetch multiple - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. - * This fluent helper allows methods which modify the underlying query to be called before executing the - * query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanFluentHelper#execute - * execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. + * + * @return + * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull FloorPlanFluentHelper getAllFloorPlan(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} - * entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity using key fields. + * * @param id - * - * @return A fluent helper to fetch a single - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity - * using key fields. This fluent helper allows methods which modify the underlying query to be called before - * executing the query itself. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanByKeyFluentHelper#execute - * execute} method on the fluent helper object. + * + * @return + * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanByKeyFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull - FloorPlanByKeyFluentHelper getFloorPlanByKey( final Integer id ); + FloorPlanByKeyFluentHelper getFloorPlanByKey(final Integer id); /** - * Returns the Count of Attachments - *

- *

- *

- * Creates a fluent helper for the PrintReceipt OData function import. - *

- * + * Returns the Count of Attachments

Creates a fluent helper for the PrintReceipt OData function import.

+ * * @param receiptId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ReceiptId - *

- * @return A fluent helper object that will execute the PrintReceipt OData function import with the provided - * parameters. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.PrintReceiptFluentHelper#execute - * execute} method on the fluent helper object. - */ - @Nonnull - PrintReceiptFluentHelper printReceipt( @Nonnull final Integer receiptId ); - - /** - * Returns the Count of Attachments - *

- *

- *

- * Creates a fluent helper for the RevokeReceipt OData function import. - *

- * + * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

+ * @return + * A fluent helper object that will execute the PrintReceipt OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.PrintReceiptFluentHelper#execute execute} method on the fluent helper object. + */ + @Nonnull + PrintReceiptFluentHelper printReceipt( + @Nonnull + final Integer receiptId); + + /** + * Returns the Count of Attachments

Creates a fluent helper for the RevokeReceipt OData function import.

+ * * @param receiptId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ReceiptId - *

- * @return A fluent helper object that will execute the RevokeReceipt OData function import with the provided - * parameters. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.RevokeReceiptFluentHelper#execute - * execute} method on the fluent helper object. - */ - @Nonnull - RevokeReceiptFluentHelper revokeReceipt( @Nonnull final Integer receiptId ); - - /** - * Check whether the store is open. - *

- *

- *

- * Creates a fluent helper for the IsStoreOpen OData function import. - *

- * + * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

+ * @return + * A fluent helper object that will execute the RevokeReceipt OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.RevokeReceiptFluentHelper#execute execute} method on the fluent helper object. + */ + @Nonnull + RevokeReceiptFluentHelper revokeReceipt( + @Nonnull + final Integer receiptId); + + /** + * Check whether the store is open.

Creates a fluent helper for the IsStoreOpen OData function import.

+ * * @param dateTime - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: DateTime - *

- * @return A fluent helper object that will execute the IsStoreOpen OData function import with the provided - * parameters. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.IsStoreOpenFluentHelper#execute - * execute} method on the fluent helper object. - */ - @Nonnull - IsStoreOpenFluentHelper isStoreOpen( @Nonnull final LocalDateTime dateTime ); - - /** - * Create an order for a given customer. - *

- *

- *

- * Creates a fluent helper for the OrderProduct OData function import. - *

- * + * Constraints: Not nullable

Original parameter name from the Odata EDM: DateTime

+ * @return + * A fluent helper object that will execute the IsStoreOpen OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.IsStoreOpenFluentHelper#execute execute} method on the fluent helper object. + */ + @Nonnull + IsStoreOpenFluentHelper isStoreOpen( + @Nonnull + final LocalDateTime dateTime); + + /** + * Create an order for a given customer.

Creates a fluent helper for the OrderProduct OData function import.

+ * * @param quantity - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: Quantity - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: Quantity

* @param productId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ProductId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

* @param customerId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: CustomerId - *

- * @return A fluent helper object that will execute the OrderProduct OData function import with the provided - * parameters. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OrderProductFluentHelper#execute - * execute} method on the fluent helper object. + * Constraints: Not nullable

Original parameter name from the Odata EDM: CustomerId

+ * @return + * A fluent helper object that will execute the OrderProduct OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OrderProductFluentHelper#execute execute} method on the fluent helper object. */ @Nonnull OrderProductFluentHelper orderProduct( - @Nonnull final Integer customerId, - @Nonnull final Integer productId, - @Nonnull final Integer quantity ); - - /** - * Get inventory of a given shelf. - *

- *

- *

- * Creates a fluent helper for the GetProductQuantities OData function import. - *

- * + @Nonnull + final Integer customerId, + @Nonnull + final Integer productId, + @Nonnull + final Integer quantity); + + /** + * Get inventory of a given shelf.

Creates a fluent helper for the GetProductQuantities OData function import.

+ * * @param shelfId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ShelfId - *

+ * Constraints: Not nullable

Original parameter name from the Odata EDM: ShelfId

* @param productId - * Constraints: Not nullable - *

- * Original parameter name from the Odata EDM: ProductId - *

- * @return A fluent helper object that will execute the GetProductQuantities OData function import with the - * provided parameters. To perform execution, call the - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.GetProductQuantitiesFluentHelper#execute - * execute} method on the fluent helper object. - */ - @Nonnull - GetProductQuantitiesFluentHelper - getProductQuantities( @Nonnull final Integer shelfId, @Nonnull final Integer productId ); + * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

+ * @return + * A fluent helper object that will execute the GetProductQuantities OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.GetProductQuantitiesFluentHelper#execute execute} method on the fluent helper object. + */ + @Nonnull + GetProductQuantitiesFluentHelper getProductQuantities( + @Nonnull + final Integer shelfId, + @Nonnull + final Integer productId); } diff --git a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorApacheIntegrationTest.java b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorApacheIntegrationTest.java index 33677cfd8..d9bcfb2c6 100644 --- a/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorApacheIntegrationTest.java +++ b/datamodel/openapi/openapi-generator/src/test/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorApacheIntegrationTest.java @@ -30,7 +30,13 @@ class DataModelGeneratorApacheIntegrationTest extends DataModelGeneratorIntegrat "ONE_OF_INTERFACES_DISABLED", "ONE_OF_INTERFACES_ENABLED", "INPUT_SPEC_WITH_BUILDER", - "GENERATE_APIS" } ) + "GENERATE_APIS", + "OAS31_NULLABLE_TYPE_ARRAY", + "OAS31_EXCLUSIVE_MIN_MAX", + "OAS31_REF_WITH_SIBLING", + "OAS31_NULLABLE_REF", + "OAS30_EXCLUSIVE_MIN_MAX", + "OAS31_COMPONENTS_PATH_ITEMS" } ) void integrationTests( final TestCase testCase, @TempDir final Path path ) throws Throwable { @@ -79,7 +85,13 @@ void integrationTests( final TestCase testCase, @TempDir final Path path ) // "ONE_OF_INTERFACES_DISABLED", // "ONE_OF_INTERFACES_ENABLED", // "INPUT_SPEC_WITH_BUILDER", - // "GENERATE_APIS" + // "GENERATE_APIS", + // "OAS31_NULLABLE_TYPE_ARRAY", + // "OAS31_EXCLUSIVE_MIN_MAX", + // "OAS31_REF_WITH_SIBLING", + // "OAS31_NULLABLE_REF", + // "OAS30_EXCLUSIVE_MIN_MAX", + // "OAS31_COMPONENTS_PATH_ITEMS" // }) // @EnumSource( value = TestCase.class, names = { "API_CLASS_VENDOR_EXTENSION_YAML" } ) // ...and this one to only generate specific ones @Override diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml deleted file mode 100644 index 9ad45cbb3..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/input/sodastore.yaml +++ /dev/null @@ -1,38 +0,0 @@ -openapi: 3.0.3 -info: - title: OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum - version: 1.0.0 - -paths: - /sodas: - get: - operationId: getSodas - responses: - '200': - description: A soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - -components: - schemas: - Soda: - type: object - properties: - name: - type: string - rating: - # OAS 3.0: boolean exclusiveMinimum/exclusiveMaximum as flags alongside minimum/maximum - type: number - minimum: 0 - exclusiveMinimum: true - maximum: 5 - exclusiveMaximum: true - score: - # OAS 3.0: non-exclusive minimum/maximum (no boolean flags) - type: number - minimum: 0 - maximum: 100 - required: - - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java deleted file mode 100644 index bbd12b54a..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.api; - -import com.fasterxml.jackson.core.type.TypeReference; - -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; - - -import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringJoiner; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; - - -/** - * OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum in version 1.0.0. - *

- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - */ -public class DefaultApi extends BaseApi { - - /** - * Instantiates this API class to invoke operations on the OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum. - * - * @param httpDestination The destination that API should be used with - */ - public DefaultApi( @Nonnull final Destination httpDestination ) - { - super(httpDestination); - } - - /** - * Instantiates this API class to invoke operations on the OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum based on a given {@link ApiClient}. - * - * @param apiClient - * ApiClient to invoke the API on - */ - public DefaultApi(@Nonnull final ApiClient apiClient) { - super(apiClient); - } - - /** - * Creates a new API instance with additional default headers. - * - * @param defaultHeaders Additional headers to include in all requests - * @return A new API instance with the combined headers - */ - public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { - final var api = new DefaultApi(apiClient); - api.defaultHeaders.putAll(this.defaultHeaders); - api.defaultHeaders.putAll(defaultHeaders); - return api; - } - - - /** - *

- *

- *

200 - A soda - * @return Soda - * @throws OpenApiRequestException if an error occurs while attempting to invoke the API - */ - @Nonnull - public Soda getSodas() throws OpenApiRequestException { - - // create path and map variables - final String localVarPath = "/sodas"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList(); - final List localVarCollectionQueryParams = new ArrayList(); - final Map localVarHeaderParams = new HashMap(defaultHeaders); - final Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); - - final TypeReference localVarReturnType = new TypeReference() {}; - - return apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - null, - localVarHeaderParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarReturnType - ); - } - } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java deleted file mode 100644 index 2838b9548..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas30-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.0 Boolean exclusiveMinimum and exclusiveMaximum - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Soda - */ -// CHECKSTYLE:OFF -public class Soda -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonProperty("rating") - private BigDecimal rating; - - @JsonProperty("score") - private BigDecimal score; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link Soda} instance and return the same instance. - * - * @param name The name of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda name( @Nonnull final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link Soda} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link Soda} instance. - * - * @param name The name of this {@link Soda} - */ - public void setName( @Nonnull final String name) { - this.name = name; - } - - /** - * Set the rating of this {@link Soda} instance and return the same instance. - * - * @param rating The rating of this {@link Soda} - * Minimum: 0 (exclusive) - * Maximum: 5 (exclusive) - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda rating( @Nullable final BigDecimal rating) { - this.rating = rating; - return this; - } - - /** - * Get rating - * minimum: 0 (exclusive) - * maximum: 5 (exclusive) - * @return rating The rating of this {@link Soda} instance. - */ - @Nonnull - public BigDecimal getRating() { - return rating; - } - - /** - * Set the rating of this {@link Soda} instance. - * - * @param rating The rating of this {@link Soda} - * Minimum: 0 (exclusive) - * Maximum: 5 (exclusive) - */ - public void setRating( @Nullable final BigDecimal rating) { - this.rating = rating; - } - - /** - * Set the score of this {@link Soda} instance and return the same instance. - * - * @param score The score of this {@link Soda} - * Minimum: 0 - * Maximum: 100 - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda score( @Nullable final BigDecimal score) { - this.score = score; - return this; - } - - /** - * Get score - * minimum: 0 - * maximum: 100 - * @return score The score of this {@link Soda} instance. - */ - @Nonnull - public BigDecimal getScore() { - return score; - } - - /** - * Set the score of this {@link Soda} instance. - * - * @param score The score of this {@link Soda} - * Minimum: 0 - * Maximum: 100 - */ - public void setScore( @Nullable final BigDecimal score) { - this.score = score; - } - - /** - * Get the names of the unrecognizable properties of the {@link Soda}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link Soda} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("Soda has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link Soda} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - if( rating != null ) declaredFields.put("rating", rating); - if( score != null ) declaredFields.put("score", score); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final Soda soda = (Soda) o; - return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && - Objects.equals(this.name, soda.name) && - Objects.equals(this.rating, soda.rating) && - Objects.equals(this.score, soda.score); - } - - @Override - public int hashCode() { - return Objects.hash(name, rating, score, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class Soda {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" rating: ").append(toIndentedString(rating)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml deleted file mode 100644 index 0ea8f9807..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/input/sodastore.yaml +++ /dev/null @@ -1,49 +0,0 @@ -openapi: 3.1.0 -info: - title: OAS 3.1 components/pathItems schema references - version: 1.0.0 - -paths: - /sodas: - get: - operationId: getSodas - responses: - '200': - description: A soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - -components: - # OAS 3.1 adds components/pathItems — schemas referenced here must not be removed - pathItems: - sodaItem: - get: - operationId: getSodaDetail - responses: - '200': - description: success - content: - application/json: - schema: - $ref: '#/components/schemas/SodaDetail' - - schemas: - Soda: - type: object - properties: - name: - type: string - # Only referenced from components/pathItems, not from paths - SodaDetail: - type: object - properties: - description: - type: string - # Not referenced anywhere — should be removed by removeUnusedComponents - UnusedSchema: - type: object - properties: - garbage: - type: string diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java deleted file mode 100644 index 427527506..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.api; - -import com.fasterxml.jackson.core.type.TypeReference; - -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; - - -import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringJoiner; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; - - -/** - * OAS 3.1 components/pathItems schema references in version 1.0.0. - *

- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - */ -public class DefaultApi extends BaseApi { - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 components/pathItems schema references. - * - * @param httpDestination The destination that API should be used with - */ - public DefaultApi( @Nonnull final Destination httpDestination ) - { - super(httpDestination); - } - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 components/pathItems schema references based on a given {@link ApiClient}. - * - * @param apiClient - * ApiClient to invoke the API on - */ - public DefaultApi(@Nonnull final ApiClient apiClient) { - super(apiClient); - } - - /** - * Creates a new API instance with additional default headers. - * - * @param defaultHeaders Additional headers to include in all requests - * @return A new API instance with the combined headers - */ - public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { - final var api = new DefaultApi(apiClient); - api.defaultHeaders.putAll(this.defaultHeaders); - api.defaultHeaders.putAll(defaultHeaders); - return api; - } - - - /** - *

- *

- *

200 - A soda - * @return Soda - * @throws OpenApiRequestException if an error occurs while attempting to invoke the API - */ - @Nonnull - public Soda getSodas() throws OpenApiRequestException { - - // create path and map variables - final String localVarPath = "/sodas"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList(); - final List localVarCollectionQueryParams = new ArrayList(); - final Map localVarHeaderParams = new HashMap(defaultHeaders); - final Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); - - final TypeReference localVarReturnType = new TypeReference() {}; - - return apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - null, - localVarHeaderParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarReturnType - ); - } - } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java deleted file mode 100644 index 3b19ef960..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 components/pathItems schema references - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Soda - */ -// CHECKSTYLE:OFF -public class Soda -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link Soda} instance and return the same instance. - * - * @param name The name of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda name( @Nullable final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link Soda} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link Soda} instance. - * - * @param name The name of this {@link Soda} - */ - public void setName( @Nullable final String name) { - this.name = name; - } - - /** - * Get the names of the unrecognizable properties of the {@link Soda}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link Soda} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("Soda has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link Soda} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final Soda soda = (Soda) o; - return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && - Objects.equals(this.name, soda.name); - } - - @Override - public int hashCode() { - return Objects.hash(name, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class Soda {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java deleted file mode 100644 index 7d6f56797..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-components-path-items/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaDetail.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 components/pathItems schema references - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * SodaDetail - */ -// CHECKSTYLE:OFF -public class SodaDetail -// CHECKSTYLE:ON -{ - @JsonProperty("description") - private String description; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the description of this {@link SodaDetail} instance and return the same instance. - * - * @param description The description of this {@link SodaDetail} - * @return The same instance of this {@link SodaDetail} class - */ - @Nonnull public SodaDetail description( @Nullable final String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description The description of this {@link SodaDetail} instance. - */ - @Nonnull - public String getDescription() { - return description; - } - - /** - * Set the description of this {@link SodaDetail} instance. - * - * @param description The description of this {@link SodaDetail} - */ - public void setDescription( @Nullable final String description) { - this.description = description; - } - - /** - * Get the names of the unrecognizable properties of the {@link SodaDetail}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link SodaDetail} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("SodaDetail has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link SodaDetail} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( description != null ) declaredFields.put("description", description); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link SodaDetail} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final SodaDetail sodaDetail = (SodaDetail) o; - return Objects.equals(this.cloudSdkCustomFields, sodaDetail.cloudSdkCustomFields) && - Objects.equals(this.description, sodaDetail.description); - } - - @Override - public int hashCode() { - return Objects.hash(description, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class SodaDetail {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml deleted file mode 100644 index 913834b7c..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/input/sodastore.yaml +++ /dev/null @@ -1,47 +0,0 @@ -openapi: 3.1.0 -info: - title: OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum - version: 1.0.0 - -paths: - /sodas: - get: - operationId: getSodas - responses: - '200': - description: A soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - -components: - schemas: - Soda: - type: object - properties: - name: - type: string - rating: - # numeric exclusiveMinimum/exclusiveMaximum as direct values - type: number - exclusiveMinimum: 0 - exclusiveMaximum: 5 - score: - # OAS 3.1: non-exclusive minimum/maximum (plain numeric values) - type: number - minimum: 0 - maximum: 100 - temperature: - # OAS 3.1: mixed — inclusive minimum alongside exclusive maximum - type: number - minimum: 0 - exclusiveMaximum: 100 - combo: - # OAS 3.1: both minimum (inclusive) and exclusiveMinimum (exclusive numeric) present; - # exclusiveMinimum: 3 is stricter than minimum: 2, so effective constraint is > 3 - type: number - minimum: 2 - exclusiveMinimum: 3 - required: - - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java deleted file mode 100644 index a9aa17c3f..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.api; - -import com.fasterxml.jackson.core.type.TypeReference; - -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; - - -import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringJoiner; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; - - -/** - * OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum in version 1.0.0. - *

- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - */ -public class DefaultApi extends BaseApi { - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum. - * - * @param httpDestination The destination that API should be used with - */ - public DefaultApi( @Nonnull final Destination httpDestination ) - { - super(httpDestination); - } - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum based on a given {@link ApiClient}. - * - * @param apiClient - * ApiClient to invoke the API on - */ - public DefaultApi(@Nonnull final ApiClient apiClient) { - super(apiClient); - } - - /** - * Creates a new API instance with additional default headers. - * - * @param defaultHeaders Additional headers to include in all requests - * @return A new API instance with the combined headers - */ - public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { - final var api = new DefaultApi(apiClient); - api.defaultHeaders.putAll(this.defaultHeaders); - api.defaultHeaders.putAll(defaultHeaders); - return api; - } - - - /** - *

- *

- *

200 - A soda - * @return Soda - * @throws OpenApiRequestException if an error occurs while attempting to invoke the API - */ - @Nonnull - public Soda getSodas() throws OpenApiRequestException { - - // create path and map variables - final String localVarPath = "/sodas"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList(); - final List localVarCollectionQueryParams = new ArrayList(); - final Map localVarHeaderParams = new HashMap(defaultHeaders); - final Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); - - final TypeReference localVarReturnType = new TypeReference() {}; - - return apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - null, - localVarHeaderParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarReturnType - ); - } - } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java deleted file mode 100644 index e071d03ae..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-exclusive-min-max/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 Numeric exclusiveMinimum and exclusiveMaximum - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Soda - */ -// CHECKSTYLE:OFF -public class Soda -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonProperty("rating") - private BigDecimal rating; - - @JsonProperty("score") - private BigDecimal score; - - @JsonProperty("temperature") - private BigDecimal temperature; - - @JsonProperty("combo") - private BigDecimal combo; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link Soda} instance and return the same instance. - * - * @param name The name of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda name( @Nonnull final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link Soda} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link Soda} instance. - * - * @param name The name of this {@link Soda} - */ - public void setName( @Nonnull final String name) { - this.name = name; - } - - /** - * Set the rating of this {@link Soda} instance and return the same instance. - * - * @param rating The rating of this {@link Soda} - * Minimum: 0 (exclusive) - * Maximum: 5 (exclusive) - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda rating( @Nullable final BigDecimal rating) { - this.rating = rating; - return this; - } - - /** - * Get rating - * minimum: 0 (exclusive) - * maximum: 5 (exclusive) - * @return rating The rating of this {@link Soda} instance. - */ - @Nonnull - public BigDecimal getRating() { - return rating; - } - - /** - * Set the rating of this {@link Soda} instance. - * - * @param rating The rating of this {@link Soda} - * Minimum: 0 (exclusive) - * Maximum: 5 (exclusive) - */ - public void setRating( @Nullable final BigDecimal rating) { - this.rating = rating; - } - - /** - * Set the score of this {@link Soda} instance and return the same instance. - * - * @param score The score of this {@link Soda} - * Minimum: 0 - * Maximum: 100 - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda score( @Nullable final BigDecimal score) { - this.score = score; - return this; - } - - /** - * Get score - * minimum: 0 - * maximum: 100 - * @return score The score of this {@link Soda} instance. - */ - @Nonnull - public BigDecimal getScore() { - return score; - } - - /** - * Set the score of this {@link Soda} instance. - * - * @param score The score of this {@link Soda} - * Minimum: 0 - * Maximum: 100 - */ - public void setScore( @Nullable final BigDecimal score) { - this.score = score; - } - - /** - * Set the temperature of this {@link Soda} instance and return the same instance. - * - * @param temperature The temperature of this {@link Soda} - * Minimum: 0 - * Maximum: 100 (exclusive) - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda temperature( @Nullable final BigDecimal temperature) { - this.temperature = temperature; - return this; - } - - /** - * Get temperature - * minimum: 0 - * maximum: 100 (exclusive) - * @return temperature The temperature of this {@link Soda} instance. - */ - @Nonnull - public BigDecimal getTemperature() { - return temperature; - } - - /** - * Set the temperature of this {@link Soda} instance. - * - * @param temperature The temperature of this {@link Soda} - * Minimum: 0 - * Maximum: 100 (exclusive) - */ - public void setTemperature( @Nullable final BigDecimal temperature) { - this.temperature = temperature; - } - - /** - * Set the combo of this {@link Soda} instance and return the same instance. - * - * @param combo The combo of this {@link Soda} - * Minimum: 3 (exclusive) - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda combo( @Nullable final BigDecimal combo) { - this.combo = combo; - return this; - } - - /** - * Get combo - * minimum: 3 (exclusive) - * @return combo The combo of this {@link Soda} instance. - */ - @Nonnull - public BigDecimal getCombo() { - return combo; - } - - /** - * Set the combo of this {@link Soda} instance. - * - * @param combo The combo of this {@link Soda} - * Minimum: 3 (exclusive) - */ - public void setCombo( @Nullable final BigDecimal combo) { - this.combo = combo; - } - - /** - * Get the names of the unrecognizable properties of the {@link Soda}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link Soda} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("Soda has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link Soda} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - if( rating != null ) declaredFields.put("rating", rating); - if( score != null ) declaredFields.put("score", score); - if( temperature != null ) declaredFields.put("temperature", temperature); - if( combo != null ) declaredFields.put("combo", combo); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final Soda soda = (Soda) o; - return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && - Objects.equals(this.name, soda.name) && - Objects.equals(this.rating, soda.rating) && - Objects.equals(this.score, soda.score) && - Objects.equals(this.temperature, soda.temperature) && - Objects.equals(this.combo, soda.combo); - } - - @Override - public int hashCode() { - return Objects.hash(name, rating, score, temperature, combo, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class Soda {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" rating: ").append(toIndentedString(rating)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).append("\n"); - sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); - sb.append(" combo: ").append(toIndentedString(combo)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml deleted file mode 100644 index 19686b15e..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/input/sodastore.yaml +++ /dev/null @@ -1,37 +0,0 @@ -openapi: 3.1.0 -info: - title: OAS 3.1 Nullable $ref via anyOf - version: 1.0.0 - -paths: - /sodas: - get: - operationId: getSodas - responses: - '200': - description: A soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - -components: - schemas: - SodaCategory: - type: object - properties: - name: - type: string - - Soda: - type: object - properties: - name: - type: string - category: - # nullable $ref using anyOf with null type - anyOf: - - $ref: '#/components/schemas/SodaCategory' - - type: "null" - required: - - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java deleted file mode 100644 index 030db3644..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.api; - -import com.fasterxml.jackson.core.type.TypeReference; - -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; - - -import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringJoiner; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; - - -/** - * OAS 3.1 Nullable $ref via anyOf in version 1.0.0. - *

- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - */ -public class DefaultApi extends BaseApi { - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 Nullable $ref via anyOf. - * - * @param httpDestination The destination that API should be used with - */ - public DefaultApi( @Nonnull final Destination httpDestination ) - { - super(httpDestination); - } - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 Nullable $ref via anyOf based on a given {@link ApiClient}. - * - * @param apiClient - * ApiClient to invoke the API on - */ - public DefaultApi(@Nonnull final ApiClient apiClient) { - super(apiClient); - } - - /** - * Creates a new API instance with additional default headers. - * - * @param defaultHeaders Additional headers to include in all requests - * @return A new API instance with the combined headers - */ - public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { - final var api = new DefaultApi(apiClient); - api.defaultHeaders.putAll(this.defaultHeaders); - api.defaultHeaders.putAll(defaultHeaders); - return api; - } - - - /** - *

- *

- *

200 - A soda - * @return Soda - * @throws OpenApiRequestException if an error occurs while attempting to invoke the API - */ - @Nonnull - public Soda getSodas() throws OpenApiRequestException { - - // create path and map variables - final String localVarPath = "/sodas"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList(); - final List localVarCollectionQueryParams = new ArrayList(); - final Map localVarHeaderParams = new HashMap(defaultHeaders); - final Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); - - final TypeReference localVarReturnType = new TypeReference() {}; - - return apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - null, - localVarHeaderParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarReturnType - ); - } - } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java deleted file mode 100644 index 7468af81f..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 Nullable $ref via anyOf - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.sap.cloud.sdk.datamodel.rest.test.model.SodaCategory; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Soda - */ -// CHECKSTYLE:OFF -public class Soda -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonProperty("category") - private SodaCategory category; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link Soda} instance and return the same instance. - * - * @param name The name of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda name( @Nonnull final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link Soda} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link Soda} instance. - * - * @param name The name of this {@link Soda} - */ - public void setName( @Nonnull final String name) { - this.name = name; - } - - /** - * Set the category of this {@link Soda} instance and return the same instance. - * - * @param category The category of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda category( @Nullable final SodaCategory category) { - this.category = category; - return this; - } - - /** - * Get category - * @return category The category of this {@link Soda} instance. - */ - @Nullable - public SodaCategory getCategory() { - return category; - } - - /** - * Set the category of this {@link Soda} instance. - * - * @param category The category of this {@link Soda} - */ - public void setCategory( @Nullable final SodaCategory category) { - this.category = category; - } - - /** - * Get the names of the unrecognizable properties of the {@link Soda}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link Soda} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("Soda has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link Soda} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - if( category != null ) declaredFields.put("category", category); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final Soda soda = (Soda) o; - return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && - Objects.equals(this.name, soda.name) && - Objects.equals(this.category, soda.category); - } - - @Override - public int hashCode() { - return Objects.hash(name, category, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class Soda {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java deleted file mode 100644 index 90e9cc595..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-ref/output/com/sap/cloud/sdk/datamodel/rest/test/model/SodaCategory.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 Nullable $ref via anyOf - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * SodaCategory - */ -// CHECKSTYLE:OFF -public class SodaCategory -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link SodaCategory} instance and return the same instance. - * - * @param name The name of this {@link SodaCategory} - * @return The same instance of this {@link SodaCategory} class - */ - @Nonnull public SodaCategory name( @Nullable final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link SodaCategory} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link SodaCategory} instance. - * - * @param name The name of this {@link SodaCategory} - */ - public void setName( @Nullable final String name) { - this.name = name; - } - - /** - * Get the names of the unrecognizable properties of the {@link SodaCategory}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link SodaCategory} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("SodaCategory has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link SodaCategory} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link SodaCategory} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final SodaCategory sodaCategory = (SodaCategory) o; - return Objects.equals(this.cloudSdkCustomFields, sodaCategory.cloudSdkCustomFields) && - Objects.equals(this.name, sodaCategory.name); - } - - @Override - public int hashCode() { - return Objects.hash(name, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class SodaCategory {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml deleted file mode 100644 index c31da5b70..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/input/sodastore.yaml +++ /dev/null @@ -1,31 +0,0 @@ -openapi: 3.1.0 -info: - title: OAS 3.1 Nullable Type Array - version: 1.0.0 - -paths: - /sodas: - get: - operationId: getSodas - responses: - '200': - description: A soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - -components: - schemas: - Soda: - type: object - properties: - name: - type: string - brand: - # nullable via type array instead of nullable: true - type: - - string - - "null" - required: - - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java deleted file mode 100644 index 7c74b39ef..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.api; - -import com.fasterxml.jackson.core.type.TypeReference; - -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; - - -import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringJoiner; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; - - -/** - * OAS 3.1 Nullable Type Array in version 1.0.0. - *

- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - */ -public class DefaultApi extends BaseApi { - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 Nullable Type Array. - * - * @param httpDestination The destination that API should be used with - */ - public DefaultApi( @Nonnull final Destination httpDestination ) - { - super(httpDestination); - } - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 Nullable Type Array based on a given {@link ApiClient}. - * - * @param apiClient - * ApiClient to invoke the API on - */ - public DefaultApi(@Nonnull final ApiClient apiClient) { - super(apiClient); - } - - /** - * Creates a new API instance with additional default headers. - * - * @param defaultHeaders Additional headers to include in all requests - * @return A new API instance with the combined headers - */ - public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { - final var api = new DefaultApi(apiClient); - api.defaultHeaders.putAll(this.defaultHeaders); - api.defaultHeaders.putAll(defaultHeaders); - return api; - } - - - /** - *

- *

- *

200 - A soda - * @return Soda - * @throws OpenApiRequestException if an error occurs while attempting to invoke the API - */ - @Nonnull - public Soda getSodas() throws OpenApiRequestException { - - // create path and map variables - final String localVarPath = "/sodas"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList(); - final List localVarCollectionQueryParams = new ArrayList(); - final Map localVarHeaderParams = new HashMap(defaultHeaders); - final Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); - - final TypeReference localVarReturnType = new TypeReference() {}; - - return apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - null, - localVarHeaderParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarReturnType - ); - } - } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java deleted file mode 100644 index 5b3605010..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-nullable-type-array/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 Nullable Type Array - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Soda - */ -// CHECKSTYLE:OFF -public class Soda -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonProperty("brand") - private String brand; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link Soda} instance and return the same instance. - * - * @param name The name of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda name( @Nonnull final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link Soda} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link Soda} instance. - * - * @param name The name of this {@link Soda} - */ - public void setName( @Nonnull final String name) { - this.name = name; - } - - /** - * Set the brand of this {@link Soda} instance and return the same instance. - * - * @param brand The brand of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda brand( @Nullable final String brand) { - this.brand = brand; - return this; - } - - /** - * Get brand - * @return brand The brand of this {@link Soda} instance. - */ - @Nullable - public String getBrand() { - return brand; - } - - /** - * Set the brand of this {@link Soda} instance. - * - * @param brand The brand of this {@link Soda} - */ - public void setBrand( @Nullable final String brand) { - this.brand = brand; - } - - /** - * Get the names of the unrecognizable properties of the {@link Soda}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link Soda} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("Soda has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link Soda} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - if( brand != null ) declaredFields.put("brand", brand); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final Soda soda = (Soda) o; - return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && - Objects.equals(this.name, soda.name) && - Objects.equals(this.brand, soda.brand); - } - - @Override - public int hashCode() { - return Objects.hash(name, brand, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class Soda {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" brand: ").append(toIndentedString(brand)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml deleted file mode 100644 index 081c00662..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/input/sodastore.yaml +++ /dev/null @@ -1,34 +0,0 @@ -openapi: 3.1.0 -info: - title: OAS 3.1 $ref with Sibling Properties - version: 1.0.0 - -paths: - /sodas: - get: - operationId: getSodas - responses: - '200': - description: A soda - content: - application/json: - schema: - $ref: '#/components/schemas/Soda' - -components: - schemas: - SodaDescription: - type: string - description: Soda description - - Soda: - type: object - properties: - name: - type: string - description: - # $ref with a sibling property — valid in OAS 3.1 - $ref: '#/components/schemas/SodaDescription' - description: Soda description as part of the Soda object - required: - - name diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java deleted file mode 100644 index fdf9fb865..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/api/DefaultApi.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.api; - -import com.fasterxml.jackson.core.type.TypeReference; - -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException; -import com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; -import com.sap.cloud.sdk.services.openapi.apache.apiclient.Pair; - - -import com.sap.cloud.sdk.datamodel.rest.test.model.Soda; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringJoiner; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; - - -/** - * OAS 3.1 $ref with Sibling Properties in version 1.0.0. - *

- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - */ -public class DefaultApi extends BaseApi { - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 $ref with Sibling Properties. - * - * @param httpDestination The destination that API should be used with - */ - public DefaultApi( @Nonnull final Destination httpDestination ) - { - super(httpDestination); - } - - /** - * Instantiates this API class to invoke operations on the OAS 3.1 $ref with Sibling Properties based on a given {@link ApiClient}. - * - * @param apiClient - * ApiClient to invoke the API on - */ - public DefaultApi(@Nonnull final ApiClient apiClient) { - super(apiClient); - } - - /** - * Creates a new API instance with additional default headers. - * - * @param defaultHeaders Additional headers to include in all requests - * @return A new API instance with the combined headers - */ - public DefaultApi withDefaultHeaders(@Nonnull final Map defaultHeaders) { - final var api = new DefaultApi(apiClient); - api.defaultHeaders.putAll(this.defaultHeaders); - api.defaultHeaders.putAll(defaultHeaders); - return api; - } - - - /** - *

- *

- *

200 - A soda - * @return Soda - * @throws OpenApiRequestException if an error occurs while attempting to invoke the API - */ - @Nonnull - public Soda getSodas() throws OpenApiRequestException { - - // create path and map variables - final String localVarPath = "/sodas"; - - final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - final List localVarQueryParams = new ArrayList(); - final List localVarCollectionQueryParams = new ArrayList(); - final Map localVarHeaderParams = new HashMap(defaultHeaders); - final Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { - - }; - final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); - - final TypeReference localVarReturnType = new TypeReference() {}; - - return apiClient.invokeAPI( - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarQueryStringJoiner.toString(), - null, - localVarHeaderParams, - localVarFormParams, - localVarAccept, - localVarContentType, - localVarReturnType - ); - } - } diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java deleted file mode 100644 index 03a3867db..000000000 --- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorApacheIntegrationTest/oas31-ref-with-sibling/output/com/sap/cloud/sdk/datamodel/rest/test/model/Soda.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. - */ - -/* - * OAS 3.1 $ref with Sibling Properties - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.sap.cloud.sdk.datamodel.rest.test.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Soda - */ -// CHECKSTYLE:OFF -public class Soda -// CHECKSTYLE:ON -{ - @JsonProperty("name") - private String name; - - @JsonProperty("description") - private String description; - - @JsonAnySetter - @JsonAnyGetter - private final Map cloudSdkCustomFields = new LinkedHashMap<>(); - - /** - * Set the name of this {@link Soda} instance and return the same instance. - * - * @param name The name of this {@link Soda} - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda name( @Nonnull final String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name The name of this {@link Soda} instance. - */ - @Nonnull - public String getName() { - return name; - } - - /** - * Set the name of this {@link Soda} instance. - * - * @param name The name of this {@link Soda} - */ - public void setName( @Nonnull final String name) { - this.name = name; - } - - /** - * Set the description of this {@link Soda} instance and return the same instance. - * - * @param description Soda description as part of the Soda object - * @return The same instance of this {@link Soda} class - */ - @Nonnull public Soda description( @Nullable final String description) { - this.description = description; - return this; - } - - /** - * Soda description as part of the Soda object - * @return description The description of this {@link Soda} instance. - */ - @Nonnull - public String getDescription() { - return description; - } - - /** - * Set the description of this {@link Soda} instance. - * - * @param description Soda description as part of the Soda object - */ - public void setDescription( @Nullable final String description) { - this.description = description; - } - - /** - * Get the names of the unrecognizable properties of the {@link Soda}. - * @return The set of properties names - */ - @JsonIgnore - @Nonnull - public Set getCustomFieldNames() { - return cloudSdkCustomFields.keySet(); - } - - /** - * Get the value of an unrecognizable property of this {@link Soda} instance. - * @deprecated Use {@link #toMap()} instead. - * @param name The name of the property - * @return The value of the property - * @throws NoSuchElementException If no property with the given name could be found. - */ - @Nullable - @Deprecated - public Object getCustomField( @Nonnull final String name ) throws NoSuchElementException { - if( !cloudSdkCustomFields.containsKey(name) ) { - throw new NoSuchElementException("Soda has no field with name '" + name + "'."); - } - return cloudSdkCustomFields.get(name); - } - - /** - * Get the value of all properties of this {@link Soda} instance including unrecognized properties. - * - * @return The map of all properties - */ - @JsonIgnore - @Nonnull - public Map toMap() - { - final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); - if( name != null ) declaredFields.put("name", name); - if( description != null ) declaredFields.put("description", description); - return declaredFields; - } - - /** - * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping - * for the key, the old value is replaced by the specified value. - * @param customFieldName The name of the property - * @param customFieldValue The value of the property - */ - @JsonIgnore - public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue ) - { - cloudSdkCustomFields.put(customFieldName, customFieldValue); - } - - - @Override - public boolean equals(@Nullable final java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final Soda soda = (Soda) o; - return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) && - Objects.equals(this.name, soda.name) && - Objects.equals(this.description, soda.description); - } - - @Override - public int hashCode() { - return Objects.hash(name, description, cloudSdkCustomFields); - } - - @Override - @Nonnull public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("class Soda {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(final java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - From 3e149d6225b333b335b912e0ef13ca5af4d5c578 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 30 Jul 2026 15:41:18 +0200 Subject: [PATCH 20/28] Remove analysis md --- datamodel/openapi/OAS31_CHANGES.md | 182 -------------- datamodel/openapi/OAS31_GAPS.md | 386 ----------------------------- 2 files changed, 568 deletions(-) delete mode 100644 datamodel/openapi/OAS31_CHANGES.md delete mode 100644 datamodel/openapi/OAS31_GAPS.md diff --git a/datamodel/openapi/OAS31_CHANGES.md b/datamodel/openapi/OAS31_CHANGES.md deleted file mode 100644 index ed724da43..000000000 --- a/datamodel/openapi/OAS31_CHANGES.md +++ /dev/null @@ -1,182 +0,0 @@ -# OAS 3.1 Support — Change Summary - -This document describes all code changes made to add OAS 3.1.x support to the SAP Cloud SDK OpenAPI -generator. The full gap analysis is in [OAS31_GAPS.md](OAS31_GAPS.md). Gaps 9, 12, 14, and 15 are -out of scope and remain documented there for future work. - ---- - -## New File: `OasVersionUtil.java` - -**Path:** `openapi-generator/src/main/java/.../generator/OasVersionUtil.java` - -A small utility class with three static `isOas31(...)` overloads accepting a `String`, an `OpenAPI` -object, or a `JsonNode`. Every version-conditional code path in the other changed files delegates to -this class so the version check is defined in one place. - ---- - -## Changed: `CustomOpenAPINormalizer.java` - -**Gaps addressed:** 1, 2, 4, 7, 8 - -### What changed - -**`isOas31` field** — Set in the constructor via `OasVersionUtil.isOas31(openAPI)`. All new -behaviour in this class is gated on this flag, so OAS 3.0 specs are processed identically to before. - -**`normalizeReferenceSchema` — Gap 1 (nullable deprecation warning)** -When processing an OAS 3.1 spec and encountering a `$ref` schema that still carries `nullable: true` -(which is not valid in 3.1), the normalizer now emits a `WARN` log telling the spec author to use -`anyOf: [{$ref: "..."}, {type: "null"}]` instead. This does not block generation. - -**`normalizeReferenceSchema` — Gap 2 (numeric exclusiveMinimum/Maximum)** -In OAS 3.0 `exclusiveMinimum`/`exclusiveMaximum` are booleans. In OAS 3.1 they are independent -numeric values (`BigDecimal`). The swagger-core model exposes these as separate fields: -`getExclusiveMinimumValue()` / `getExclusiveMaximumValue()`. Both are now included in the -sibling-property condition that triggers `allOf` wrapping, so a `$ref` schema with a numeric -exclusive bound is handled correctly. - -**`normalizeReferenceSchema` — Gap 4 (`const` as $ref sibling)** -The OAS 3.1 `const` keyword (from JSON Schema 2020-12) is now included in the sibling-property -condition, so a `$ref` schema with a `const` sibling is wrapped in `allOf` and the constant -constraint is preserved in generated code. - -**New `normalizeSchema` override — Gap 7 (example deprecation warning)** -In OAS 3.1 the singular `example` keyword inside Schema Objects is deprecated in favour of the -array form `examples: [...]`. When `isOas31` and a schema carries `example`, a `WARN` log is -emitted. Generation is not blocked. - -**New `normalizeSchema` override — Gap 8 (binary file upload encoding)** -OAS 3.1 replaces `format: binary` / `format: byte` with JSON Schema keywords `contentEncoding` and -`contentMediaType`. This normalizer override maps those back to the legacy `format` values before -the upstream code generator sees the schema, preserving the existing `File → byte[]` type mapping: - -| OAS 3.1 input | Mapped to | -|---|---| -| `contentEncoding: base64` | `format: byte` | -| `contentEncoding: ` | `format: binary` | -| `contentMediaType: ` (no encoding) | `format: binary` | - ---- - -## Changed: `ValidationKeywordsPreprocessor.java` - -**Gaps addressed:** 5, 10 - -### What changed - -**Gap 5 — Webhooks-only documents** -OAS 3.1 makes the top-level `paths` field optional. A document with only `webhooks` (and no `paths`) -is now detected early and a clear `OpenApiGeneratorException` is thrown explaining that webhook -client generation is not yet supported. Previously, such a document would silently produce no output -or cause a `NullPointerException` downstream. - -A document with only `components` and neither `paths` nor `webhooks` is allowed to continue — -the upstream generator handles this case gracefully. - -**Gap 10 — Canonical OAS 3.1 nullable-ref pattern** -The preprocessor used to block *any* occurrence of `anyOf` or `oneOf` when -`oneOfAnyOfGenerationEnabled=false`. In OAS 3.1 the standard way to express a nullable `$ref` is: - -```yaml -anyOf: - - $ref: '#/components/schemas/Foo' - - type: "null" -``` - -A new private `isNullUnionPattern(JsonNode)` method recognises this exact two-element array -(one `$ref`-only object, one `{type: "null"}`-only object) and exempts it from the block. All other -multi-element or non-null-union `anyOf`/`oneOf` occurrences are still blocked unless the -`oneOfAnyOfGenerationEnabled` flag is set. - ---- - -## Changed: `CustomJavaClientCodegen.java` - -**Gaps addressed:** 5, 6 - -### What changed - -**Gap 5 — Null-safe `paths` access** -Two places called `openAPI.getPaths()` without guarding against `null`: - -- `preprocessOpenAPI`: the `USE_EXCLUDE_PATHS` loop now checks `openAPI.getPaths() != null` before - calling `.keySet().remove(...)`. -- `preprocessRemoveRedundancies`: an early-return guard is added at the top. If `paths` is null or - empty a warning is logged and the method returns immediately, avoiding a `NullPointerException` on - webhooks-only or components-only documents. - -**Gap 6 — `components/pathItems` traversal** -The `preprocessRemoveRedundancies` method discovers which `components/schemas` are in use by -scanning path definitions for `$ref` strings. In OAS 3.1 reusable path items can be stored in -`components/pathItems` and referenced from both `paths` and `webhooks`. The method now also scans -`openAPI.getComponents().getPathItems()` using the same regex-based approach, so schemas referenced -only via a reusable path item are not wrongly pruned by the remove-unused-components feature. - ---- - -## Changed: `GenerationConfigurationConverter.java` - -**Gap addressed:** 11 - -### What changed - -After the spec is parsed, `OasVersionUtil.isOas31(result)` is checked. If true, an `INFO` log is -emitted stating the detected version and pointing to `OAS31_GAPS.md` for known limitations. This -gives users a clear signal that OAS 3.1 mode is active without blocking generation. - ---- - -## New Test Fixtures - -### `DataModelGeneratorUnitTest/sodastore-31.yaml` - -An OAS 3.1.0 version of the standard sodastore spec that exercises the following 3.1 features: - -- `info.summary` and `info.license.identifier` (SPDX) -- `type: ["string", "null"]` (Gap 1 / Gap 3 — type as array) -- `exclusiveMinimum: 0` / `exclusiveMaximum: 5` as numeric values (Gap 2) -- `$ref` with a sibling `description` (Gap 4) -- `anyOf: [{$ref: ...}, {type: "null"}]` on a schema property (Gap 10) - -### `DataModelGeneratorUnitTest/sodastore-31-mutual-tls.yaml` - -An OAS 3.1.0 spec with a `type: mutualTLS` security scheme in `components/securitySchemes` (Gap 13). -Verifies the generator does not crash on the new security scheme type. - -### `ValidationKeywordsPreprocessorTest/sodastore-31-nullable.json` - -An OAS 3.1.0 spec with null-union `anyOf` patterns in both a path request body and a component -schema. Used by the new preprocessor tests to verify Gap 10. - ---- - -## New Tests - -### `DataModelGeneratorUnitTest` - -| Test | What it verifies | -|---|---| -| `testSuccessfulGenerationWithOas31Spec` | Full generation from `sodastore-31.yaml` succeeds and produces files | -| `testSuccessfulGenerationWithMutualTlsSecurityScheme` | Generation with `mutualTLS` security scheme does not throw | - -### `ValidationKeywordsPreprocessorTest` - -| Test | What it verifies | -|---|---| -| `testOas31NullUnionAnyOfInPaths_isAllowed` | Null-union `anyOf` in a path request body is not blocked (Gap 10) | -| `testOas31NullUnionAnyOfInSchemas_isAllowed` | Null-union `anyOf` in a component schema is not blocked (Gap 10) | -| `testNonNullUnionOneOfInPaths_isBlocked` | A `oneOf` with two `$ref` items (no null type) in a path is still blocked without the `oneOfAnyOfGenerationEnabled` flag | - ---- - -## What Is Not Changed (Out of Scope) - -| Gap | Reason deferred | -|---|---| -| Gap 9 — `if/then/else`, `prefixItems`, `$dynamicRef` | No Java equivalent; left to upstream `openapi-generator` | -| Gap 12 — `info.summary` / `license.identifier` in metadata | No code generation impact; metadata output not changed | -| Gap 13 — `mutualTLS` test coverage | Covered by smoke test above; no custom codegen needed | -| Gap 14 — Server `summary` field | No code generation impact | -| Gap 15 — `jsonSchemaDialect` field | Uncommon; handled by upstream parser | diff --git a/datamodel/openapi/OAS31_GAPS.md b/datamodel/openapi/OAS31_GAPS.md deleted file mode 100644 index 21f12aafc..000000000 --- a/datamodel/openapi/OAS31_GAPS.md +++ /dev/null @@ -1,386 +0,0 @@ -# OAS 3.1 Generator Gaps Analysis - -This document summarizes the gaps between the current SAP Cloud SDK OpenAPI generator (targeting OAS 3.0) -and full OAS 3.1.x support. It covers every release from 3.1.0-rc0 (June 2020) through 3.1.2 (September 2025). - -## Background - -The generator is built on top of `openapi-generator` 7.23.0 and `swagger-parser` 2.1.45. -Its custom layers are concentrated in: - -- [CustomOpenAPINormalizer.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomOpenAPINormalizer.java) — schema normalisation before code generation -- [ValidationKeywordsPreprocessor.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/ValidationKeywordsPreprocessor.java) — spec validation on raw `JsonNode` -- [GenerationConfigurationConverter.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java) — parser invocation and additional properties -- [CustomJavaClientCodegen.java](openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java) — codegen overrides (composed schemas, array types, etc.) - -All test specs use `openapi: 3.0.0` or `openapi: 3.0.3`. No OAS 3.1 test fixtures exist. - ---- - -## Gap 1 — `nullable` Keyword Removed (Breaking) - -**Spec change (3.1.0-rc0):** `nullable: true` is entirely removed. The replacement is expressing null as a member of a type union: - -```yaml -# OAS 3.0 -type: string -nullable: true - -# OAS 3.1 -type: - - string - - "null" -``` - -**Current code:** -`CustomOpenAPINormalizer.normalizeReferenceSchema()` (line 51) reads `schema.getNullable()` and uses it to decide whether to wrap a `$ref` schema in `allOf`. This logic silently passes when `nullable` is absent (as in a 3.1 spec), leaving nullable intent unexpressed. - -`GenerationConfigurationConverter` forces `openApiNullable=false` (line 184) as a workaround for `JsonNullable` issues (BLI CLOUDECOSYSTEM-9843), which further masks any nullable annotation generated from 3.0's `nullable: true`. - -**Impact:** -- A 3.1 spec using `type: ["string", "null"]` will be parsed with the upstream `swagger-parser`, but the custom normalizer and codegen have no path to propagate "null-union" types to `@Nullable` Java annotations or `JsonNullable` wrappers. -- Any pre-existing 3.0 spec migrated to 3.1 with `nullable: true` kept will have nullability silently dropped. - -**Action required:** -- Replace `getNullable()` checks with inspection of `schema.getTypes()` for the presence of `"null"`. -- Resolve CLOUDECOSYSTEM-9843 to re-enable `openApiNullable` correctly. -- Add test fixtures using `type: ["string", "null"]` and `anyOf: [{$ref: ...}, {type: "null"}]`. - ---- - -## Gap 2 — `exclusiveMinimum` / `exclusiveMaximum` Semantic Inversion (Breaking) - -**Spec change (3.1.0-rc0):** These keywords change from boolean modifiers on `minimum`/`maximum` to standalone numeric bounds: - -```yaml -# OAS 3.0: boolean modifier — minimum is 7, exclusive -minimum: 7 -exclusiveMinimum: true - -# OAS 3.1: standalone — exclusive minimum is 7 (minimum keyword unused) -exclusiveMinimum: 7 -``` - -**Current code:** -`CustomOpenAPINormalizer.normalizeReferenceSchema()` (lines 56–57) reads `schema.getExclusiveMaximum()` and `schema.getExclusiveMinimum()` purely to detect the presence of sibling keywords alongside a `$ref`. In `swagger-parser` 2.1.45 the model class `Schema` maps both 3.0 `Boolean` and 3.1 `BigDecimal` forms, but the current custom code does not branch on version. - -**Impact:** -- A 3.1 spec with `exclusiveMinimum: 7` (numeric) will be parsed as a BigDecimal by `swagger-parser`, but the normalizer checks `!= null` only to trigger `allOf` wrapping — it does not validate or pass through the exclusive bound value. -- Bean-validation annotations generated for 3.0 schemas (e.g., `@DecimalMin(value="7", inclusive=false)`) will be generated incorrectly for 3.1 specs because the numeric value of `exclusiveMinimum` is conflated with the boolean flag. - -**Action required:** -- Detect OAS version at parse time and branch on `exclusiveMinimum`/`exclusiveMaximum` semantics accordingly. -- For 3.1: treat the keyword value directly as the exclusive bound; do not read `minimum`/`maximum` as the companion inclusive bound. -- Add version-conditional normalizer logic or a dedicated preprocessing step. - ---- - -## Gap 3 — `type` as Array (Breaking) - -**Spec change (3.1.0-rc0, JSON Schema 2020-12):** `type` may now be either a string or an array of strings: - -```yaml -# Both valid in 3.1 -type: string -type: ["string", "integer", "null"] -``` - -**Current code:** -`CustomOpenAPINormalizer.normalizeReferenceSchema()` (line 42) correctly checks both `schema.getType()` (single string, OAS 3.0) and `schema.getTypes()` (set, OAS 3.1) in the same condition. However it only *clears* both fields; it does not model or propagate multi-type unions through code generation. - -Downstream in `CustomJavaClientCodegen`, type resolution is delegated entirely to `JavaClientCodegen` from upstream openapi-generator. The upstream library has partial 3.1 support, but union types beyond null-union are not mapped to Java types (there is no direct Java equivalent of `type: ["string", "integer"]`). - -**Impact:** -- Multi-type arrays beyond `["X", "null"]` have no Java representation and will silently fall back to `Object`. -- The `checkForValidatorsInSchemas` in `ValidationKeywordsPreprocessor` does not check for multi-type arrays, so no validation error is raised for unsupported cases. - -**Action required:** -- Document supported subset: only `["X", "null"]` (nullable scalar) is mappable to Java. -- Emit a warning or error for multi-value type arrays that are not null-unions. -- Add a test fixture with multi-type schemas to verify fallback behaviour. - ---- - -## Gap 4 — `$ref` Sibling Properties Now Merged in Schema Objects (Breaking) - -**Spec change (3.1.0-rc0):** In OAS 3.0 any properties alongside a `$ref` were **ignored**. In OAS 3.1 (following JSON Schema 2020-12) sibling keywords are **combined** with the referenced schema: - -```yaml -# 3.0 — description was silently ignored -schema: - $ref: '#/components/schemas/Pet' - description: "ignored in 3.0" - -# 3.1 — description is combined with the referenced schema -schema: - $ref: '#/components/schemas/Pet' - description: "applied in 3.1" -``` - -**Current code:** -`CustomOpenAPINormalizer.normalizeReferenceSchema()` (lines 84–88) already implements an `allOf` wrapping strategy to handle sibling properties on `$ref` schemas. The workaround exists because `swagger-parser` may copy properties from a referenced schema onto the `$ref` node (lines 71–88 comments). This happens to produce correct results for OAS 3.0 sibling-annotation patterns. - -However the logic gates on `schema.getNullable()` (OAS 3.0 only) and several other 3.0-specific fields. A 3.1 schema with a `$ref` + `description` or `$ref` + `const` pair will only trigger wrapping if those properties are among the checked set. - -**Impact:** -- New 3.1 sibling keywords (`const`, `$comment`, JSON Schema 2020-12 vocabulary keywords) are not included in the trigger condition. They will be silently dropped. -- Reference Object contexts (parameter `$ref`, response `$ref`) allow **only** `summary` and `description` as overrides in 3.1. The current preprocessor does not validate this restriction. - -**Action required:** -- Extend the sibling-property condition in `normalizeReferenceSchema()` to cover `const`, `$comment`, `if`/`then`/`else`, `unevaluatedProperties`, and other 3.1 keywords. -- Add a validation check that non-Schema Reference Objects (parameters, responses, headers) carry at most `summary` and `description` alongside `$ref`. - ---- - -## Gap 5 — `webhooks` Top-Level Field Not Supported - -**Spec change (3.1.0-rc0):** A new top-level `webhooks` field maps webhook names to Path Item Objects. The `paths` top-level field is now **optional**. - -**Current code:** -`ValidationKeywordsPreprocessor.execute()` (line 23) reads `input.path(PATHS_NODE)` unconditionally. If `paths` is absent (a valid 3.1 document), `pathsNode` will be a `MissingNode`; the `findValue` calls return `null`, so no exception is thrown — but the document is effectively ignored. - -`CustomJavaClientCodegen.preprocessRemoveRedundancies()` (line 204) calls `openAPI.getPaths().values()` without a null check; a webhooks-only document would throw a `NullPointerException` here. - -No `webhooks` field is traversed anywhere in the custom code. - -**Impact:** -- Webhooks-only or paths-absent 3.1 documents cannot be processed. -- NPE risk in `preprocessRemoveRedundancies` when `paths` is null. - -**Action required:** -- Add null-check guards for `openAPI.getPaths()` wherever it is called. -- Evaluate whether SAP Cloud SDK should support generating webhook subscriber clients and decide on scope. -- At minimum, emit a clear error message when a document contains `webhooks` but no `paths`. - ---- - -## Gap 6 — `components.pathItems` Not Handled - -**Spec change (3.1.0-rc0):** The `components` object gains a `pathItems` map for reusable Path Item Objects. - -**Current code:** -`GenerationConfigurationConverter.preprocessSpecification()` (lines 139–158) and the remove-redundancies logic in `CustomJavaClientCodegen` only walk `components.schemas`, `components.responses`, and paths. No code traverses `components.pathItems`. - -**Impact:** -- `$ref` references pointing into `#/components/pathItems/...` will not be resolved correctly during preprocessing. -- The remove-unused-components feature (`FIX_REMOVE_UNUSED_COMPONENTS`) will not count path item references and may spuriously remove schemas referenced only from a reusable path item. - -**Action required:** -- Extend schema/ref traversal in `preprocessRemoveRedundancies` to descend into `components.pathItems`. -- Verify that `swagger-parser` 2.1.45 correctly resolves `#/components/pathItems/` references (upgrade may be needed). - ---- - -## Gap 7 — `schema.example` Deprecated in Favour of `examples` Array - -**Spec change (3.1.0):** Inside Schema Objects, the singular `example` keyword is deprecated. The JSON Schema 2020-12 standard uses `examples` (an array): - -```yaml -# 3.0 / deprecated 3.1 -example: "Berlin" - -# 3.1 preferred -examples: ["Berlin"] -``` - -**Current code:** -`CustomOpenAPINormalizer.normalizeReferenceSchema()` (line 66) checks `schema.getExample() != null` as a trigger for `allOf` wrapping. This means a 3.1 schema that uses `examples` (array) alongside a `$ref` will not be wrapped, potentially losing those examples. - -Line 67 checks `schema.getExamples() != null` as well, so the array form is covered in the wrap condition. However the two are treated identically — no deprecation warning for singular `example` in 3.1 documents is emitted. - -**Impact:** -- No generation failure, but no deprecation guidance for spec authors using 3.0's `example` in a 3.1 document. -- Example values from the `examples` array are not surfaced differently from the singular `example` in generated code or API documentation. - -**Action required:** -- Emit a deprecation warning when `schema.getExample()` is non-null in a 3.1 document. -- Ensure generated Javadoc/swagger annotations use the `examples` array form when targeting 3.1. - ---- - -## Gap 8 — File Upload / Binary Encoding Pattern Changed (Breaking) - -**Spec change (3.1.0-rc0):** Binary file descriptions change from format-based to JSON Schema content keywords: - -```yaml -# OAS 3.0 (still parseable but deprecated in 3.1) -type: string -format: binary - -# OAS 3.1 (correct) -type: string -contentEncoding: base64 -contentMediaType: image/png -``` - -**Current code:** -`GenerationConfigurationConverter` contains a type mapping for `File -> byte[]` passed from `GenerationConfiguration.typeMappings`. The underlying `JavaClientCodegen` maps `format: binary` to a byte-array or `File` Java type. Neither the custom normalizer nor the preprocessing steps handle `contentEncoding` or `contentMediaType`. - -**Impact:** -- A 3.1 spec using `contentEncoding`/`contentMediaType` for file uploads will not generate a `byte[]` or `InputStream` Java type; it will likely fall back to `Object` or `String`. -- The `format: binary` pattern still works via the upstream library for 3.0-style specs even when served under `openapi: 3.1.0`. - -**Action required:** -- Add a preprocessing step or normalizer hook that maps `contentEncoding: base64` → `format: byte` and `contentMediaType: application/octet-stream` → `format: binary` for compatibility with downstream type mapping. -- Add a test fixture for file upload with `contentEncoding`. - ---- - -## Gap 9 — JSON Schema 2020-12 Vocabulary Keywords Unhandled - -**Spec change (3.1.0):** Full JSON Schema 2020-12 alignment introduces keywords the OAS 3.0-era generator has never seen: - -| Keyword | Description | -|---|---| -| `$defs` | Inline reusable schemas (replaces `definitions`) | -| `$comment` | Non-validating developer annotation | -| `const` | Single-value constraint (cleaner than single-item `enum`) | -| `prefixItems` | Positional array item schemas (replaces array form of `items`) | -| `unevaluatedProperties` | Stricter `additionalProperties` that sees through `$ref`/combinators | -| `unevaluatedItems` | Same as above for array items | -| `if` / `then` / `else` | Conditional schema application | -| `$dynamicRef` / `$dynamicAnchor` | Dynamic references for recursive schemas | - -**Current code:** -None of these keywords are referenced anywhere in the custom generator code. They will either be passed through silently to the upstream `JavaClientCodegen` (which has partial support) or be ignored. - -`CustomJavaClientCodegen.updateModelForObject()` (line 264) unconditionally sets `additionalProperties` to `Boolean.FALSE`. In 3.1 `unevaluatedProperties` is the correct mechanism for sealing an object that uses `allOf`/`anyOf`/`oneOf` — `additionalProperties: false` does not see through those combinators. This means any 3.1 schema that uses `unevaluatedProperties: false` instead of `additionalProperties: false` will NOT be sealed by the codegen. - -**Impact:** -- `const` schemas will generate as single-value `enum` — workable but different from the intended model. -- `$defs` references will not be resolved by the preprocessing traversal in `preprocessRemoveRedundancies`, potentially causing schemas that are only referenced via `$defs` to be pruned. -- `unevaluatedProperties` is silently ignored; generated model classes will have an `additionalProperties` map even when the spec author intended to seal the object. -- `prefixItems` / tuple arrays are not mapped — they will likely generate as `List`. -- `if`/`then`/`else` schemas are not mapped — they will generate as `Object`. - -**Action required:** -- `$defs`: extend `preprocessRemoveRedundancies` traversal to follow `$defs` references. -- `const`: map to a single-element enum or a `@JsonProperty` constant in generated code; add a preprocessing step to normalise `const` to a single-item `enum` if the upstream generator does not handle it. -- `unevaluatedProperties`: do not force-set `additionalProperties: false` in `updateModelForObject`; instead inspect whether `unevaluatedProperties` is present. -- `if`/`then`/`else`, `prefixItems`, `$dynamicRef`: emit unsupported-feature warnings. - ---- - -## Gap 10 — `ValidationKeywordsPreprocessor` Assumes `paths` is Present - -**Current code:** -`ValidationKeywordsPreprocessor.execute()` (line 23) always walks `input.path("paths")`. In OAS 3.1 a document may omit `paths` entirely and provide only `webhooks` or `components`. - -When `paths` is missing, `pathsNode` is a `MissingNode`; `findValue()` returns `null` and no exception is raised — but it also means the validator silently skips validation entirely, allowing invalid `anyOf`/`oneOf` placements in a spec that does have `paths` nested inside `webhooks`. - -**Action required:** -- Guard on `pathsNode.isMissingNode()` and emit a warning when `paths` is absent. -- Extend validation to traverse `webhooks` operations for the same `anyOf`/`oneOf` placement rules. -- Consider whether the `oneOfAnyOfGenerationEnabled=false` default restriction makes sense for 3.1 specs, where `anyOf: [{$ref:...}, {type:"null"}]` is the canonical nullable pattern and must be supported. - ---- - -## Gap 11 — No OAS Version Detection or Version-Specific Routing - -**Current state:** -There is no code in the custom layers that reads `openAPI.getOpenapi()` (the version string) to branch behaviour. All processing assumes OAS 3.0.x semantics. `swagger-parser` 2.1.45 transparently parses both versions into the same `io.swagger.v3.oas.models.OpenAPI` object model, hiding the version distinction from consumers. - -**Impact:** -- The same preprocessing logic is applied regardless of whether the document declares `openapi: 3.0.3` or `openapi: 3.1.0`, leading to incorrect behaviour for `exclusiveMinimum`/`exclusiveMaximum`, `nullable`, and `$ref` sibling semantics. -- No validation that the spec version matches expected conventions. - -**Action required:** -- Read the version from `openAPI.getOpenapi()` (or from the raw `JsonNode` in preprocessing steps) and gate version-specific logic behind it. -- Add an explicit unsupported-version warning (or error) when the generator encounters a version it is not yet fully tested against. - ---- - -## Gap 12 — `info.summary` and `info.license.identifier` Not Surfaced - -**Spec change (3.1.0-rc0):** The Info Object gains a `summary` field (plain string) and the License Object gains an `identifier` field (SPDX expression): - -```yaml -info: - title: My API - summary: Short one-liner for catalog views - license: - name: Apache 2.0 - identifier: Apache-2.0 -``` - -**Current code:** -The generator does not read or surface `info.summary` or `license.identifier` anywhere. These fields exist only in documentation metadata and are not directly relevant to Java code generation. - -**Impact:** Low. These fields affect tooling that reads the spec for catalog/discovery purposes, not the generated Java client. - -**Action required:** No code change needed. Note that `DatamodelMetadataGeneratorAdapter` may wish to persist `info.summary` as part of the generated `.json` metadata file. - ---- - -## Gap 13 — `mutualTLS` Security Scheme Type Not Tested - -**Spec change (3.1.0-rc0):** A new `mutualTLS` security scheme type is added. It has no extra fields beyond `description`. - -**Current code:** -Security scheme types are not handled in the custom code; upstream `JavaClientCodegen` manages them. The upstream library maps security schemes to authentication annotations and configuration classes. - -**Impact:** Low for code generation (no extra fields to generate). Generated client code does not require special handling for `mutualTLS` at the source level — it is a transport-layer concern. - -**Action required:** -- Verify that `swagger-parser` 2.1.45 correctly parses `type: mutualTLS` without throwing an unknown-type exception. -- Add a test fixture with a `mutualTLS` security scheme. - ---- - -## Gap 14 — Server Object `summary` Field Not Surfaced - -**Spec change (3.1.0-rc0):** Server Objects gain a `summary` field (plain text label for tooling). - -**Current code:** Not used in code generation. No impact on generated Java clients. - -**Action required:** None for code generation. May be relevant for generated documentation or `DatamodelMetadataGeneratorAdapter`. - ---- - -## Gap 15 — `jsonSchemaDialect` Top-Level Field Not Handled - -**Spec change (3.1.0):** A new top-level `jsonSchemaDialect` URI field declares the default JSON Schema dialect for all Schema Objects. The OAS dialect URI is `https://spec.openapis.org/oas/3.1/dialect/base`. - -**Current code:** `swagger-parser` accepts this field without error, but neither the custom normalizer nor the preprocessing steps read or act on it. - -**Impact:** Low for the common case (spec authors rarely override the dialect). Non-standard dialects (e.g., pure JSON Schema 2020-12 without OAS extensions) may cause the upstream `JavaClientCodegen` to mishandle discriminator or `xml` objects. - -**Action required:** -- Emit a warning when `jsonSchemaDialect` is set to a non-OAS URI. -- Consider passing the dialect URI through to `swagger-parser` parse options. - ---- - -## Dependency Versions to Verify - -The following library versions determine how much OAS 3.1 support is available out-of-the-box: - -| Library | Current version | Notes | -|---|---|---| -| `openapi-generator` | 7.23.0 | 3.1 support present but has known bugs (nullable+allOf+$ref, unevaluatedProperties) | -| `io-swagger-parser-v3` | 2.1.45 | Parses 3.1 but full 2020-12 JSON Schema validation is incomplete | -| `io-swagger-core-v3` | 2.2.52 | Model classes expose both `getType()` and `getTypes()` — sufficient for dual-version handling | - -Recommend checking the upstream changelogs for any 3.1-related fixes released after these versions before implementing the gaps above. - ---- - -## Priority Summary - -| Priority | Gap | Effort | -|---|---|---| -| P0 — Breaking | Gap 1: `nullable` removed | Medium | -| P0 — Breaking | Gap 2: `exclusiveMinimum/Maximum` semantic change | Low | -| P0 — Breaking | Gap 3: `type` as array | Medium | -| P0 — Breaking | Gap 4: `$ref` sibling merging | Medium | -| P1 — Functional | Gap 5: `webhooks` / optional `paths` (NPE risk) | Medium | -| P1 — Functional | Gap 8: Binary/file upload encoding | Low | -| P1 — Functional | Gap 9: JSON Schema 2020-12 keywords (`$defs`, `const`, `unevaluatedProperties`) | High | -| P1 — Functional | Gap 10: `ValidationKeywordsPreprocessor` blocks canonical nullable pattern | Low | -| P1 — Functional | Gap 11: No OAS version detection | Low | -| P2 — Quality | Gap 6: `components.pathItems` traversal | Low | -| P2 — Quality | Gap 7: `example` deprecation warning | Low | -| P3 — Informational | Gap 12: `info.summary` / `license.identifier` | Trivial | -| P3 — Informational | Gap 13: `mutualTLS` test coverage | Trivial | -| P3 — Informational | Gap 14: Server `summary` | Trivial | -| P3 — Informational | Gap 15: `jsonSchemaDialect` field | Trivial | From 4719fbb5bade5414b9fb00f38e8e62d0b3cdd41a Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 30 Jul 2026 15:46:18 +0200 Subject: [PATCH 21/28] Formatting --- .../namespaces/sdkgrocerystore/Address.java | 305 +++--- .../namespaces/sdkgrocerystore/Customer.java | 336 ++++--- .../namespaces/sdkgrocerystore/DateRange.java | 101 +- .../namespaces/sdkgrocerystore/FloorPlan.java | 109 ++- .../sdkgrocerystore/OpeningHours.java | 204 ++-- .../namespaces/sdkgrocerystore/Product.java | 385 ++++---- .../sdkgrocerystore/ProductCategory.java | 39 +- .../sdkgrocerystore/ProductCount.java | 105 ++- .../sdkgrocerystore/PurchaseHistoryItem.java | 116 ++- .../namespaces/sdkgrocerystore/Receipt.java | 311 ++++--- .../namespaces/sdkgrocerystore/Shelf.java | 305 +++--- .../namespaces/sdkgrocerystore/Vendor.java | 208 +++-- .../DefaultSdkGroceryStoreService.java | 229 ++--- .../services/SdkGroceryStoreService.java | 869 +++++++++++------- .../namespaces/sdkgrocerystore/Address.java | 382 ++++---- .../AddressByKeyFluentHelper.java | 39 +- .../AddressCreateFluentHelper.java | 42 +- .../AddressDeleteFluentHelper.java | 43 +- .../sdkgrocerystore/AddressFluentHelper.java | 28 +- .../AddressUpdateFluentHelper.java | 41 +- .../namespaces/sdkgrocerystore/Customer.java | 377 ++++---- .../CustomerByKeyFluentHelper.java | 42 +- .../CustomerCreateFluentHelper.java | 42 +- .../sdkgrocerystore/CustomerFluentHelper.java | 28 +- .../namespaces/sdkgrocerystore/FloorPlan.java | 166 ++-- .../FloorPlanByKeyFluentHelper.java | 39 +- .../FloorPlanFluentHelper.java | 28 +- .../GetProductQuantitiesFluentHelper.java | 69 +- .../IsStoreOpenFluentHelper.java | 61 +- .../sdkgrocerystore/OpeningHours.java | 254 ++--- .../OpeningHoursByKeyFluentHelper.java | 40 +- .../OpeningHoursFluentHelper.java | 28 +- .../OpeningHoursUpdateFluentHelper.java | 41 +- .../OrderProductFluentHelper.java | 77 +- .../PrintReceiptFluentHelper.java | 61 +- .../namespaces/sdkgrocerystore/Product.java | 566 +++++++----- .../ProductByKeyFluentHelper.java | 39 +- .../sdkgrocerystore/ProductCount.java | 97 +- .../ProductCreateFluentHelper.java | 42 +- .../sdkgrocerystore/ProductFluentHelper.java | 28 +- .../ProductUpdateFluentHelper.java | 41 +- .../namespaces/sdkgrocerystore/Receipt.java | 734 ++++++++------- .../ReceiptByKeyFluentHelper.java | 39 +- .../ReceiptCreateFluentHelper.java | 42 +- .../sdkgrocerystore/ReceiptFluentHelper.java | 28 +- .../RevokeReceiptFluentHelper.java | 61 +- .../namespaces/sdkgrocerystore/Shelf.java | 421 +++++---- .../ShelfByKeyFluentHelper.java | 39 +- .../ShelfCreateFluentHelper.java | 42 +- .../ShelfDeleteFluentHelper.java | 42 +- .../sdkgrocerystore/ShelfFluentHelper.java | 28 +- .../ShelfUpdateFluentHelper.java | 40 +- .../namespaces/sdkgrocerystore/Vendor.java | 314 ++++--- .../VendorByKeyFluentHelper.java | 39 +- .../sdkgrocerystore/VendorFluentHelper.java | 28 +- .../DefaultSdkGroceryStoreServiceBatch.java | 44 +- ...tSdkGroceryStoreServiceBatchChangeSet.java | 79 +- .../batch/SdkGroceryStoreServiceBatch.java | 10 +- .../SdkGroceryStoreServiceBatchChangeSet.java | 188 ++-- .../sdkgrocerystore/field/AddressField.java | 45 +- .../sdkgrocerystore/field/CustomerField.java | 45 +- .../sdkgrocerystore/field/FloorPlanField.java | 45 +- .../field/OpeningHoursField.java | 45 +- .../sdkgrocerystore/field/ProductField.java | 45 +- .../sdkgrocerystore/field/ReceiptField.java | 45 +- .../sdkgrocerystore/field/ShelfField.java | 45 +- .../sdkgrocerystore/field/VendorField.java | 45 +- .../sdkgrocerystore/link/AddressLink.java | 39 +- .../link/AddressOneToOneLink.java | 46 +- .../sdkgrocerystore/link/CustomerLink.java | 39 +- .../link/CustomerOneToOneLink.java | 46 +- .../sdkgrocerystore/link/FloorPlanLink.java | 40 +- .../link/FloorPlanOneToOneLink.java | 46 +- .../link/OpeningHoursLink.java | 42 +- .../link/OpeningHoursOneToOneLink.java | 45 +- .../sdkgrocerystore/link/ProductLink.java | 39 +- .../link/ProductOneToOneLink.java | 46 +- .../sdkgrocerystore/link/ReceiptLink.java | 39 +- .../link/ReceiptOneToOneLink.java | 46 +- .../sdkgrocerystore/link/ShelfLink.java | 39 +- .../link/ShelfOneToOneLink.java | 46 +- .../sdkgrocerystore/link/VendorLink.java | 39 +- .../link/VendorOneToOneLink.java | 46 +- .../selectable/AddressSelectable.java | 17 +- .../selectable/CustomerSelectable.java | 17 +- .../selectable/FloorPlanSelectable.java | 18 +- .../selectable/OpeningHoursSelectable.java | 24 +- .../selectable/ProductSelectable.java | 17 +- .../selectable/ReceiptSelectable.java | 20 +- .../selectable/ShelfSelectable.java | 23 +- .../selectable/VendorSelectable.java | 17 +- .../DefaultSdkGroceryStoreService.java | 173 ++-- .../services/SdkGroceryStoreService.java | 659 ++++++++----- datamodel/openapi/openapi-generator/pom.xml | 382 ++++---- .../openapi/openapi-generator/pom.xml.bak | 194 ++++ 95 files changed, 6425 insertions(+), 4760 deletions(-) create mode 100644 datamodel/openapi/openapi-generator/pom.xml.bak diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java index 083f397af..a62b0b30d 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Address.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -17,6 +19,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,231 +28,272 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Address

- * + *

+ * Original entity name from the Odata EDM: Address + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class Address - extends VdmEntity
- implements VdmEntitySet +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class Address extends VdmEntity
implements VdmEntitySet { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Address"; /** * Selector for all available fields of Address. - * + * */ public final static SimpleProperty
ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * ID of the address. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return ID of the address. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger
ID = new SimpleProperty.NumericInteger
(Address.class, "Id"); + public final static SimpleProperty.NumericInteger
ID = + new SimpleProperty.NumericInteger
(Address.class, "Id"); /** - * Constraints: Nullable

Original property name from the Odata EDM: Street

- * - * @return - * Street of the address. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Street + *

+ * + * @return Street of the address. */ @Nullable - @ElementName("Street") + @ElementName( "Street" ) private java.lang.String street; - public final static SimpleProperty.String
STREET = new SimpleProperty.String
(Address.class, "Street"); + public final static SimpleProperty.String
STREET = + new SimpleProperty.String
(Address.class, "Street"); /** - * Constraints: Nullable

Original property name from the Odata EDM: City

- * - * @return - * City of the address. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: City + *

+ * + * @return City of the address. */ @Nullable - @ElementName("City") + @ElementName( "City" ) private java.lang.String city; public final static SimpleProperty.String
CITY = new SimpleProperty.String
(Address.class, "City"); /** - * Constraints: Nullable

Original property name from the Odata EDM: State

- * - * @return - * State of the address. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: State + *

+ * + * @return State of the address. */ @Nullable - @ElementName("State") + @ElementName( "State" ) private java.lang.String state; - public final static SimpleProperty.String
STATE = new SimpleProperty.String
(Address.class, "State"); + public final static SimpleProperty.String
STATE = + new SimpleProperty.String
(Address.class, "State"); /** - * Constraints: Nullable

Original property name from the Odata EDM: Country

- * - * @return - * The country contained in this {@link VdmEntity}. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Country + *

+ * + * @return The country contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Country") + @ElementName( "Country" ) private java.lang.String country; - public final static SimpleProperty.String
COUNTRY = new SimpleProperty.String
(Address.class, "Country"); + public final static SimpleProperty.String
COUNTRY = + new SimpleProperty.String
(Address.class, "Country"); /** - * Constraints: Nullable

Original property name from the Odata EDM: PostalCode

- * - * @return - * The postalCode contained in this {@link VdmEntity}. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: PostalCode + *

+ * + * @return The postalCode contained in this {@link VdmEntity}. */ @Nullable - @ElementName("PostalCode") + @ElementName( "PostalCode" ) private java.lang.String postalCode; - public final static SimpleProperty.String
POSTAL_CODE = new SimpleProperty.String
(Address.class, "PostalCode"); + public final static SimpleProperty.String
POSTAL_CODE = + new SimpleProperty.String
(Address.class, "PostalCode"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

- * - * @return - * The latitude contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Latitude + *

+ * + * @return The latitude contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Latitude") + @ElementName( "Latitude" ) private Double latitude; - public final static SimpleProperty.NumericDecimal
LATITUDE = new SimpleProperty.NumericDecimal
(Address.class, "Latitude"); + public final static SimpleProperty.NumericDecimal
LATITUDE = + new SimpleProperty.NumericDecimal
(Address.class, "Latitude"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

- * - * @return - * The longitude contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Longitude + *

+ * + * @return The longitude contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Longitude") + @ElementName( "Longitude" ) private Double longitude; - public final static SimpleProperty.NumericDecimal
LONGITUDE = new SimpleProperty.NumericDecimal
(Address.class, "Longitude"); + public final static SimpleProperty.NumericDecimal
LONGITUDE = + new SimpleProperty.NumericDecimal
(Address.class, "Longitude"); @Nonnull @Override - public Class
getType() { + public Class
getType() + { return Address.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * ID of the address. + * ID of the address. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable

Original property name from the Odata EDM: Street

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Street + *

+ * * @param street - * Street of the address. + * Street of the address. */ - public void setStreet( - @Nullable - final java.lang.String street) { + public void setStreet( @Nullable final java.lang.String street ) + { rememberChangedField("Street", this.street); this.street = street; } /** - * Constraints: Nullable

Original property name from the Odata EDM: City

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: City + *

+ * * @param city - * City of the address. + * City of the address. */ - public void setCity( - @Nullable - final java.lang.String city) { + public void setCity( @Nullable final java.lang.String city ) + { rememberChangedField("City", this.city); this.city = city; } /** - * Constraints: Nullable

Original property name from the Odata EDM: State

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: State + *

+ * * @param state - * State of the address. + * State of the address. */ - public void setState( - @Nullable - final java.lang.String state) { + public void setState( @Nullable final java.lang.String state ) + { rememberChangedField("State", this.state); this.state = state; } /** - * Constraints: Nullable

Original property name from the Odata EDM: Country

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Country + *

+ * * @param country - * The country to set. + * The country to set. */ - public void setCountry( - @Nullable - final java.lang.String country) { + public void setCountry( @Nullable final java.lang.String country ) + { rememberChangedField("Country", this.country); this.country = country; } /** - * Constraints: Nullable

Original property name from the Odata EDM: PostalCode

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: PostalCode + *

+ * * @param postalCode - * The postalCode to set. + * The postalCode to set. */ - public void setPostalCode( - @Nullable - final java.lang.String postalCode) { + public void setPostalCode( @Nullable final java.lang.String postalCode ) + { rememberChangedField("PostalCode", this.postalCode); this.postalCode = postalCode; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Latitude + *

+ * * @param latitude - * The latitude to set. + * The latitude to set. */ - public void setLatitude( - @Nullable - final Double latitude) { + public void setLatitude( @Nullable final Double latitude ) + { rememberChangedField("Latitude", this.latitude); this.latitude = latitude; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Longitude + *

+ * * @param longitude - * The longitude to set. + * The longitude to set. */ - public void setLongitude( - @Nullable - final Double longitude) { + public void setLongitude( @Nullable final Double longitude ) + { rememberChangedField("Longitude", this.longitude); this.longitude = longitude; } @Override - protected java.lang.String getEntityCollection() { + protected java.lang.String getEntityCollection() + { return "Addresses"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -257,7 +301,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Street", getStreet()); @@ -271,55 +316,56 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Street")) { + if( cloudSdkValues.containsKey("Street") ) { final Object cloudSdkValue = cloudSdkValues.remove("Street"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getStreet()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getStreet())) ) { setStreet(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("City")) { + if( cloudSdkValues.containsKey("City") ) { final Object cloudSdkValue = cloudSdkValues.remove("City"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCity()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCity())) ) { setCity(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("State")) { + if( cloudSdkValues.containsKey("State") ) { final Object cloudSdkValue = cloudSdkValues.remove("State"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getState()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getState())) ) { setState(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Country")) { + if( cloudSdkValues.containsKey("Country") ) { final Object cloudSdkValue = cloudSdkValues.remove("Country"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCountry()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCountry())) ) { setCountry(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("PostalCode")) { + if( cloudSdkValues.containsKey("PostalCode") ) { final Object cloudSdkValue = cloudSdkValues.remove("PostalCode"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getPostalCode()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getPostalCode())) ) { setPostalCode(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Latitude")) { + if( cloudSdkValues.containsKey("Latitude") ) { final Object cloudSdkValue = cloudSdkValues.remove("Latitude"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getLatitude()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getLatitude())) ) { setLatitude(((Double) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Longitude")) { + if( cloudSdkValues.containsKey("Longitude") ) { final Object cloudSdkValue = cloudSdkValues.remove("Longitude"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getLongitude()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getLongitude())) ) { setLongitude(((Double) cloudSdkValue)); } } @@ -334,7 +380,8 @@ protected void fromMap(final Map inputValues) { } @Override - protected java.lang.String getDefaultServicePath() { + protected java.lang.String getDefaultServicePath() + { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java index 51b14ece7..9811f9033 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Customer.java @@ -7,8 +7,10 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -19,6 +21,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -30,153 +33,179 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Customer

- * + *

+ * Original entity name from the Odata EDM: Customer + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class Customer - extends VdmEntity - implements VdmEntitySet +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class Customer extends VdmEntity implements VdmEntitySet { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Customer"; /** * Selector for all available fields of Customer. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * ID of the customer. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return ID of the customer. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Customer.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(Customer.class, "Id"); /** - * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

- * - * @return - * Name of the customer. + * Constraints: Not nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ * + * @return Name of the customer. */ @Nullable - @ElementName("Name") + @ElementName( "Name" ) private java.lang.String name; - public final static SimpleProperty.String NAME = new SimpleProperty.String(Customer.class, "Name"); + public final static SimpleProperty.String NAME = + new SimpleProperty.String(Customer.class, "Name"); /** - * Constraints: Nullable

Original property name from the Odata EDM: Email

- * - * @return - * Email address of the customer. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Email + *

+ * + * @return Email address of the customer. */ @Nullable - @ElementName("Email") + @ElementName( "Email" ) private java.lang.String email; - public final static SimpleProperty.String EMAIL = new SimpleProperty.String(Customer.class, "Email"); + public final static SimpleProperty.String EMAIL = + new SimpleProperty.String(Customer.class, "Email"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

- * - * @return - * ID of the customer's address. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ * + * @return ID of the customer's address. */ @Nullable - @ElementName("AddressId") + @ElementName( "AddressId" ) private Integer addressId; - public final static SimpleProperty.NumericInteger ADDRESS_ID = new SimpleProperty.NumericInteger(Customer.class, "AddressId"); + public final static SimpleProperty.NumericInteger ADDRESS_ID = + new SimpleProperty.NumericInteger(Customer.class, "AddressId"); /** * Navigation property Address for Customer to single Address. - * + * */ - @ElementName("Address") + @ElementName( "Address" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Address toAddress; /** * Use with available request builders to apply the Address navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Customer.class, "Address", Address.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( + Customer.class, + "Address", + Address.class); @Nonnull @Override - public Class getType() { + public Class getType() + { return Customer.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * ID of the customer. + * ID of the customer. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

- * + * Constraints: Not nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ * * @param name - * Name of the customer. + * Name of the customer. */ - public void setName( - @Nullable - final java.lang.String name) { + public void setName( @Nullable final java.lang.String name ) + { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Nullable

Original property name from the Odata EDM: Email

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Email + *

+ * * @param email - * Email address of the customer. + * Email address of the customer. */ - public void setEmail( - @Nullable - final java.lang.String email) { + public void setEmail( @Nullable final java.lang.String email ) + { rememberChangedField("Email", this.email); this.email = email; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ * * @param addressId - * ID of the customer's address. + * ID of the customer's address. */ - public void setAddressId( - @Nullable - final Integer addressId) { + public void setAddressId( @Nullable final Integer addressId ) + { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected java.lang.String getEntityCollection() { + protected java.lang.String getEntityCollection() + { return "Customers"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -184,7 +213,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -194,31 +224,32 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Name")) { + if( cloudSdkValues.containsKey("Name") ) { final Object cloudSdkValue = cloudSdkValues.remove("Name"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getName()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getName())) ) { setName(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Email")) { + if( cloudSdkValues.containsKey("Email") ) { final Object cloudSdkValue = cloudSdkValues.remove("Email"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getEmail()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getEmail())) ) { setEmail(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("AddressId")) { + if( cloudSdkValues.containsKey("AddressId") ) { final Object cloudSdkValue = cloudSdkValues.remove("AddressId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getAddressId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getAddressId())) ) { setAddressId(((Integer) cloudSdkValue)); } } @@ -228,14 +259,14 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("Address")) { + if( (cloudSdkValues).containsKey("Address") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if (cloudSdkValue instanceof Map) { - if (toAddress == null) { + if( cloudSdkValue instanceof Map ) { + if( toAddress == null ) { toAddress = new Address(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -244,121 +275,156 @@ protected void fromMap(final Map inputValues) { } @Override - protected java.lang.String getDefaultServicePath() { + protected java.lang.String getDefaultServicePath() + { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toAddress!= null) { + if( toAddress != null ) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property + * Address. *

- * If the navigation property for an entity Customer has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Customer has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Address is already loaded, the result will contain the + * Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() { + public Option
getAddressIfPresent() + { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress(final Address cloudSdkValue) { + public void setAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; } /** - * Action that can be applied to any entity object of this class.

- * + * Action that can be applied to any entity object of this class. + *

+ * * @param quantity - * Constraints: Not nullable

Original parameter name from the Odata EDM: Quantity

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: Quantity + *

* @param productId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

- * @return - * Action object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ProductId + *

+ * @return Action object prepared with the given parameters to be applied to any entity object of this class. + *

+ * To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. */ @Nonnull - public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle orderProduct( - @Nonnull - final Integer productId, - @Nonnull - final Integer quantity) { + public static + com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle + orderProduct( @Nonnull final Integer productId, @Nonnull final Integer quantity ) + { final Map parameters = new HashMap(); parameters.put("ProductId", productId); parameters.put("Quantity", quantity); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle(Customer.class, Void.class, "com.sap.cloud.sdk.store.grocery.OrderProduct", parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToSingle( + Customer.class, + Void.class, + "com.sap.cloud.sdk.store.grocery.OrderProduct", + parameters); } /** - * Action that can be applied to any entity object of this class.

- * + * Action that can be applied to any entity object of this class. + *

+ * * @param receipts - * Constraints: Nullable

Original parameter name from the Odata EDM: Receipts

+ * Constraints: Nullable + *

+ * Original parameter name from the Odata EDM: Receipts + *

* @param productCategories - * Constraints: Nullable

Original parameter name from the Odata EDM: ProductCategories

+ * Constraints: Nullable + *

+ * Original parameter name from the Odata EDM: ProductCategories + *

* @param dateRange - * Constraints: Nullable

Original parameter name from the Odata EDM: DateRange

+ * Constraints: Nullable + *

+ * Original parameter name from the Odata EDM: DateRange + *

* @param productNames - * Constraints: Nullable

Original parameter name from the Odata EDM: ProductNames

- * @return - * Action object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. + * Constraints: Nullable + *

+ * Original parameter name from the Odata EDM: ProductNames + *

+ * @return Action object prepared with the given parameters to be applied to any entity object of this class. + *

+ * To execute it use the {@code service.forEntity(entity).applyAction(thisAction)} API. */ @Nonnull - public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection filterPurchaseHistory( - @Nullable - final Collection receipts, - @Nullable - final Collection productNames, - @Nullable - final Collection productCategories, - @Nullable - final DateRange dateRange) { + public static + com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection + filterPurchaseHistory( + @Nullable final Collection receipts, + @Nullable final Collection productNames, + @Nullable final Collection productCategories, + @Nullable final DateRange dateRange ) + { final Map parameters = new HashMap(); parameters.put("Receipts", receipts); parameters.put("ProductNames", productNames); parameters.put("ProductCategories", productCategories); parameters.put("DateRange", dateRange); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection(Customer.class, PurchaseHistoryItem.class, "com.sap.cloud.sdk.store.grocery.FilterPurchaseHistory", parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundAction.SingleToCollection( + Customer.class, + PurchaseHistoryItem.class, + "com.sap.cloud.sdk.store.grocery.FilterPurchaseHistory", + parameters); } - /** * Helper class to allow for fluent creation of Customer instances. - * + * */ - public final static class CustomerBuilder { + public final static class CustomerBuilder + { private Address toAddress; - private Customer.CustomerBuilder toAddress(final Address cloudSdkValue) { + private Customer.CustomerBuilder toAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Customer to single Address. - * + * * @param cloudSdkValue - * The Address to build this Customer with. - * @return - * This Builder to allow for a fluent interface. + * The Address to build this Customer with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Customer.CustomerBuilder address(final Address cloudSdkValue) { + public Customer.CustomerBuilder address( final Address cloudSdkValue ) + { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java index bd2392112..22dcc966c 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/DateRange.java @@ -6,8 +6,10 @@ import java.time.OffsetDateTime; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -15,6 +17,7 @@ import com.sap.cloud.sdk.datamodel.odata.client.request.ODataEntityKey; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmComplex; import com.sap.cloud.sdk.result.ElementName; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -23,56 +26,64 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original complex type name from the Odata EDM: DateRange

- * + *

+ * Original complex type name from the Odata EDM: DateRange + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class DateRange - extends VdmComplex +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class DateRange extends VdmComplex { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.DateRange"; /** - * Constraints: Not nullable

Original property name from the Odata EDM: Start

- * - * @return - * The start contained in this {@link VdmComplex}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Start + *

+ * + * @return The start contained in this {@link VdmComplex}. */ @Nullable - @ElementName("Start") + @ElementName( "Start" ) private OffsetDateTime start; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime START = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "Start"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime START = + new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "Start"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: End

- * - * @return - * The end contained in this {@link VdmComplex}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: End + *

+ * + * @return The end contained in this {@link VdmComplex}. */ @Nullable - @ElementName("End") + @ElementName( "End" ) private OffsetDateTime end; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime END = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "End"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime END = + new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.DateTime(DateRange.class, "End"); @Nonnull @Override - public Class getType() { + public Class getType() + { return DateRange.class; } @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Start", getStart()); cloudSdkValues.put("End", getEnd()); @@ -80,19 +91,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Start")) { + if( cloudSdkValues.containsKey("Start") ) { final Object cloudSdkValue = cloudSdkValues.remove("Start"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getStart()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getStart())) ) { setStart(((OffsetDateTime) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("End")) { + if( cloudSdkValues.containsKey("End") ) { final Object cloudSdkValue = cloudSdkValues.remove("End"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getEnd()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getEnd())) ) { setEnd(((OffsetDateTime) cloudSdkValue)); } } @@ -108,33 +120,38 @@ protected void fromMap(final Map inputValues) { @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); return entityKey; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Start

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Start + *

+ * * @param start - * The start to set. + * The start to set. */ - public void setStart( - @Nullable - final OffsetDateTime start) { + public void setStart( @Nullable final OffsetDateTime start ) + { rememberChangedField("Start", this.start); this.start = start; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: End

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: End + *

+ * * @param end - * The end to set. + * The end to set. */ - public void setEnd( - @Nullable - final OffsetDateTime end) { + public void setEnd( @Nullable final OffsetDateTime end ) + { rememberChangedField("End", this.end); this.end = end; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java index 6f1e02def..83462ab21 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/FloorPlan.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -15,6 +17,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntity; import com.sap.cloud.sdk.result.ElementName; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -23,92 +26,105 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: FloorPlan

- * + *

+ * Original entity name from the Odata EDM: FloorPlan + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class FloorPlan - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class FloorPlan extends VdmEntity { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.FloorPlan"; /** * Selector for all available fields of FloorPlan. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(FloorPlan.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(FloorPlan.class, "Id"); /** - * Constraints: Nullable

Original property name from the Odata EDM: ImageUri

- * - * @return - * The imageUri contained in this {@link VdmEntity}. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ImageUri + *

+ * + * @return The imageUri contained in this {@link VdmEntity}. */ @Nullable - @ElementName("ImageUri") + @ElementName( "ImageUri" ) private java.lang.String imageUri; - public final static SimpleProperty.String IMAGE_URI = new SimpleProperty.String(FloorPlan.class, "ImageUri"); + public final static SimpleProperty.String IMAGE_URI = + new SimpleProperty.String(FloorPlan.class, "ImageUri"); @Nonnull @Override - public Class getType() { + public Class getType() + { return FloorPlan.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ImageUri

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ImageUri + *

+ * * @param imageUri - * The imageUri to set. + * The imageUri to set. */ - public void setImageUri( - @Nullable - final java.lang.String imageUri) { + public void setImageUri( @Nullable final java.lang.String imageUri ) + { rememberChangedField("ImageUri", this.imageUri); this.imageUri = imageUri; } @Override - protected java.lang.String getEntityCollection() { + protected java.lang.String getEntityCollection() + { return "FloorPlan"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -116,7 +132,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("ImageUri", getImageUri()); @@ -124,19 +141,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("ImageUri")) { + if( cloudSdkValues.containsKey("ImageUri") ) { final Object cloudSdkValue = cloudSdkValues.remove("ImageUri"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getImageUri()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getImageUri())) ) { setImageUri(((java.lang.String) cloudSdkValue)); } } @@ -152,7 +170,8 @@ protected void fromMap(final Map inputValues) { @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); return cloudSdkValues; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java index c31bb69d6..dd6fd2c42 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/OpeningHours.java @@ -8,8 +8,10 @@ import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -20,6 +22,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,139 +31,161 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: OpeningHours

- * + *

+ * Original entity name from the Odata EDM: OpeningHours + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class OpeningHours - extends VdmEntity - implements VdmEntitySet +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class OpeningHours extends VdmEntity implements VdmEntitySet { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.OpeningHours"; /** * Selector for all available fields of OpeningHours. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(OpeningHours.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(OpeningHours.class, "Id"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

- * - * @return - * The dayOfWeek contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: DayOfWeek + *

+ * + * @return The dayOfWeek contained in this {@link VdmEntity}. */ @Nullable - @ElementName("DayOfWeek") + @ElementName( "DayOfWeek" ) private Integer dayOfWeek; - public final static SimpleProperty.NumericInteger DAY_OF_WEEK = new SimpleProperty.NumericInteger(OpeningHours.class, "DayOfWeek"); + public final static SimpleProperty.NumericInteger DAY_OF_WEEK = + new SimpleProperty.NumericInteger(OpeningHours.class, "DayOfWeek"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

- * - * @return - * The openTime contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: OpenTime + *

+ * + * @return The openTime contained in this {@link VdmEntity}. */ @Nullable - @ElementName("OpenTime") + @ElementName( "OpenTime" ) private LocalTime openTime; - public final static SimpleProperty.Time OPEN_TIME = new SimpleProperty.Time(OpeningHours.class, "OpenTime"); + public final static SimpleProperty.Time OPEN_TIME = + new SimpleProperty.Time(OpeningHours.class, "OpenTime"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

- * - * @return - * The closeTime contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CloseTime + *

+ * + * @return The closeTime contained in this {@link VdmEntity}. */ @Nullable - @ElementName("CloseTime") + @ElementName( "CloseTime" ) private LocalTime closeTime; - public final static SimpleProperty.Time CLOSE_TIME = new SimpleProperty.Time(OpeningHours.class, "CloseTime"); + public final static SimpleProperty.Time CLOSE_TIME = + new SimpleProperty.Time(OpeningHours.class, "CloseTime"); @Nonnull @Override - public Class getType() { + public Class getType() + { return OpeningHours.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: DayOfWeek + *

+ * * @param dayOfWeek - * The dayOfWeek to set. + * The dayOfWeek to set. */ - public void setDayOfWeek( - @Nullable - final Integer dayOfWeek) { + public void setDayOfWeek( @Nullable final Integer dayOfWeek ) + { rememberChangedField("DayOfWeek", this.dayOfWeek); this.dayOfWeek = dayOfWeek; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: OpenTime + *

+ * * @param openTime - * The openTime to set. + * The openTime to set. */ - public void setOpenTime( - @Nullable - final LocalTime openTime) { + public void setOpenTime( @Nullable final LocalTime openTime ) + { rememberChangedField("OpenTime", this.openTime); this.openTime = openTime; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CloseTime + *

+ * * @param closeTime - * The closeTime to set. + * The closeTime to set. */ - public void setCloseTime( - @Nullable - final LocalTime closeTime) { + public void setCloseTime( @Nullable final LocalTime closeTime ) + { rememberChangedField("CloseTime", this.closeTime); this.closeTime = closeTime; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "OpeningHours"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -168,7 +193,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("DayOfWeek", getDayOfWeek()); @@ -178,31 +204,32 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("DayOfWeek")) { + if( cloudSdkValues.containsKey("DayOfWeek") ) { final Object cloudSdkValue = cloudSdkValues.remove("DayOfWeek"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getDayOfWeek()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getDayOfWeek())) ) { setDayOfWeek(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("OpenTime")) { + if( cloudSdkValues.containsKey("OpenTime") ) { final Object cloudSdkValue = cloudSdkValues.remove("OpenTime"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getOpenTime()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getOpenTime())) ) { setOpenTime(((LocalTime) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("CloseTime")) { + if( cloudSdkValues.containsKey("CloseTime") ) { final Object cloudSdkValue = cloudSdkValues.remove("CloseTime"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCloseTime()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCloseTime())) ) { setCloseTime(((LocalTime) cloudSdkValue)); } } @@ -217,25 +244,36 @@ protected void fromMap(final Map inputValues) { } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } /** - * Function that can be applied to any entity object of this class.

- * + * Function that can be applied to any entity object of this class. + *

+ * * @param dateTime - * Constraints: Not nullable

Original parameter name from the Odata EDM: DateTime

- * @return - * Function object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: DateTime + *

+ * @return Function object prepared with the given parameters to be applied to any entity object of this class. + *

+ * To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. */ @Nonnull - public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle isStoreOpen( - @Nonnull - final OffsetDateTime dateTime) { + public static + com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle + isStoreOpen( @Nonnull final OffsetDateTime dateTime ) + { final Map parameters = new HashMap(); parameters.put("DateTime", dateTime); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle(OpeningHours.class, Boolean.class, "com.sap.cloud.sdk.store.grocery.IsStoreOpen", parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToSingle( + OpeningHours.class, + Boolean.class, + "com.sap.cloud.sdk.store.grocery.IsStoreOpen", + parameters); } } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java index 0ff2a903b..0ca452578 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Product.java @@ -8,8 +8,10 @@ import java.util.LinkedList; import java.util.Map; import java.util.Objects; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -21,6 +23,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEnum; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -32,213 +35,252 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Product

- * + *

+ * Original entity name from the Odata EDM: Product + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class Product - extends VdmEntity - implements VdmEntitySet +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class Product extends VdmEntity implements VdmEntitySet { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Product"; /** * Selector for all available fields of Product. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * ID of the product. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return ID of the product. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Product.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(Product.class, "Id"); /** - * Constraints: Nullable

Original property name from the Odata EDM: Name

- * - * @return - * Name of the product. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Name + *

+ * + * @return Name of the product. */ @Nullable - @ElementName("Name") + @ElementName( "Name" ) private java.lang.String name; public final static SimpleProperty.String NAME = new SimpleProperty.String(Product.class, "Name"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

- * - * @return - * The shelfId contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ShelfId + *

+ * + * @return The shelfId contained in this {@link VdmEntity}. */ @Nullable - @ElementName("ShelfId") + @ElementName( "ShelfId" ) private Integer shelfId; - public final static SimpleProperty.NumericInteger SHELF_ID = new SimpleProperty.NumericInteger(Product.class, "ShelfId"); + public final static SimpleProperty.NumericInteger SHELF_ID = + new SimpleProperty.NumericInteger(Product.class, "ShelfId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

- * - * @return - * ID of the vendor. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: VendorId + *

+ * + * @return ID of the vendor. */ @Nullable - @ElementName("VendorId") + @ElementName( "VendorId" ) private Integer vendorId; - public final static SimpleProperty.NumericInteger VENDOR_ID = new SimpleProperty.NumericInteger(Product.class, "VendorId"); + public final static SimpleProperty.NumericInteger VENDOR_ID = + new SimpleProperty.NumericInteger(Product.class, "VendorId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Price

- * - * @return - * Price of the product. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Price + *

+ * + * @return Price of the product. */ @Nullable - @ElementName("Price") + @ElementName( "Price" ) private BigDecimal price; - public final static SimpleProperty.NumericDecimal PRICE = new SimpleProperty.NumericDecimal(Product.class, "Price"); + public final static SimpleProperty.NumericDecimal PRICE = + new SimpleProperty.NumericDecimal(Product.class, "Price"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Categories

- * - * @return - * The categories contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Categories + *

+ * + * @return The categories contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Categories") + @ElementName( "Categories" ) private java.util.Collection categories; - public final static SimpleProperty.Collection CATEGORIES = new SimpleProperty.Collection(Product.class, "Categories", ProductCategory.class); + public final static SimpleProperty.Collection CATEGORIES = + new SimpleProperty.Collection(Product.class, "Categories", ProductCategory.class); /** * Navigation property Vendor for Product to single Vendor. - * + * */ - @ElementName("Vendor") + @ElementName( "Vendor" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Vendor toVendor; /** * Navigation property Shelf for Product to single Shelf. - * + * */ - @ElementName("Shelf") + @ElementName( "Shelf" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Shelf toShelf; /** * Use with available request builders to apply the Vendor navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_VENDOR = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Product.class, "Vendor", Vendor.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_VENDOR = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( + Product.class, + "Vendor", + Vendor.class); /** * Use with available request builders to apply the Shelf navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_SHELF = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Product.class, "Shelf", Shelf.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_SHELF = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( + Product.class, + "Shelf", + Shelf.class); @Nonnull @Override - public Class getType() { + public Class getType() + { return Product.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * ID of the product. + * ID of the product. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable

Original property name from the Odata EDM: Name

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: Name + *

+ * * @param name - * Name of the product. + * Name of the product. */ - public void setName( - @Nullable - final java.lang.String name) { + public void setName( @Nullable final java.lang.String name ) + { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ShelfId + *

+ * * @param shelfId - * The shelfId to set. + * The shelfId to set. */ - public void setShelfId( - @Nullable - final Integer shelfId) { + public void setShelfId( @Nullable final Integer shelfId ) + { rememberChangedField("ShelfId", this.shelfId); this.shelfId = shelfId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: VendorId + *

+ * * @param vendorId - * ID of the vendor. + * ID of the vendor. */ - public void setVendorId( - @Nullable - final Integer vendorId) { + public void setVendorId( @Nullable final Integer vendorId ) + { rememberChangedField("VendorId", this.vendorId); this.vendorId = vendorId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Price

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Price + *

+ * * @param price - * Price of the product. + * Price of the product. */ - public void setPrice( - @Nullable - final BigDecimal price) { + public void setPrice( @Nullable final BigDecimal price ) + { rememberChangedField("Price", this.price); this.price = price; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Categories

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Categories + *

+ * * @param categories - * The categories to set. + * The categories to set. */ - public void setCategories( - @Nullable - final java.util.Collection categories) { + public void setCategories( @Nullable final java.util.Collection categories ) + { rememberChangedField("Categories", this.categories); this.categories = categories; } @Override - protected java.lang.String getEntityCollection() { + protected java.lang.String getEntityCollection() + { return "Products"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -246,7 +288,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -258,54 +301,56 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Name")) { + if( cloudSdkValues.containsKey("Name") ) { final Object cloudSdkValue = cloudSdkValues.remove("Name"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getName()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getName())) ) { setName(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("ShelfId")) { + if( cloudSdkValues.containsKey("ShelfId") ) { final Object cloudSdkValue = cloudSdkValues.remove("ShelfId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getShelfId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getShelfId())) ) { setShelfId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("VendorId")) { + if( cloudSdkValues.containsKey("VendorId") ) { final Object cloudSdkValue = cloudSdkValues.remove("VendorId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getVendorId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getVendorId())) ) { setVendorId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Price")) { + if( cloudSdkValues.containsKey("Price") ) { final Object cloudSdkValue = cloudSdkValues.remove("Price"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getPrice()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getPrice())) ) { setPrice(((BigDecimal) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Categories")) { + if( cloudSdkValues.containsKey("Categories") ) { final Object cloudSdkValue = cloudSdkValues.remove("Categories"); - if ((cloudSdkValue == null)&&(getCategories()!= null)) { + if( (cloudSdkValue == null) && (getCategories() != null) ) { setCategories(null); } - if (cloudSdkValue instanceof Iterable) { + if( cloudSdkValue instanceof Iterable ) { final LinkedList categories = new LinkedList(); - for (Object cloudSdkItem: ((Iterable ) cloudSdkValue)) { - if (cloudSdkItem instanceof java.lang.String) { - final ProductCategory enumConstant = VdmEnum.getConstant(ProductCategory.class, ((java.lang.String) cloudSdkItem)); + for( Object cloudSdkItem : ((Iterable) cloudSdkValue) ) { + if( cloudSdkItem instanceof java.lang.String ) { + final ProductCategory enumConstant = + VdmEnum.getConstant(ProductCategory.class, ((java.lang.String) cloudSdkItem)); categories.add(enumConstant); } } - if (!Objects.equals(categories, getCategories())) { + if( !Objects.equals(categories, getCategories()) ) { setCategories(categories); } } @@ -316,25 +361,25 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("Vendor")) { + if( (cloudSdkValues).containsKey("Vendor") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Vendor"); - if (cloudSdkValue instanceof Map) { - if (toVendor == null) { + if( cloudSdkValue instanceof Map ) { + if( toVendor == null ) { toVendor = new Vendor(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toVendor.fromMap(inputMap); } } - if ((cloudSdkValues).containsKey("Shelf")) { + if( (cloudSdkValues).containsKey("Shelf") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Shelf"); - if (cloudSdkValue instanceof Map) { - if (toShelf == null) { + if( cloudSdkValue instanceof Map ) { + if( toShelf == null ) { toShelf = new Shelf(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toShelf.fromMap(inputMap); } } @@ -343,112 +388,124 @@ protected void fromMap(final Map inputValues) { } @Override - protected java.lang.String getDefaultServicePath() { + protected java.lang.String getDefaultServicePath() + { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toVendor!= null) { + if( toVendor != null ) { (cloudSdkValues).put("Vendor", toVendor); } - if (toShelf!= null) { + if( toShelf != null ) { (cloudSdkValues).put("Shelf", toShelf); } return cloudSdkValues; } /** - * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property Vendor. + * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property + * Vendor. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Vendor is already loaded, the result will contain the Vendor entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Vendor is already loaded, the result will contain the + * Vendor entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getVendorIfPresent() { + public Option getVendorIfPresent() + { return Option.of(toVendor); } /** * Overwrites the associated Vendor entity for the loaded navigation property Vendor. - * + * * @param cloudSdkValue - * New Vendor entity. + * New Vendor entity. */ - public void setVendor(final Vendor cloudSdkValue) { + public void setVendor( final Vendor cloudSdkValue ) + { toVendor = cloudSdkValue; } /** - * Retrieval of associated Shelf entity (one to one). This corresponds to the OData navigation property Shelf. + * Retrieval of associated Shelf entity (one to one). This corresponds to the OData navigation property + * Shelf. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Shelf is already loaded, the result will contain the Shelf entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Shelf is already loaded, the result will contain the + * Shelf entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getShelfIfPresent() { + public Option getShelfIfPresent() + { return Option.of(toShelf); } /** * Overwrites the associated Shelf entity for the loaded navigation property Shelf. - * + * * @param cloudSdkValue - * New Shelf entity. + * New Shelf entity. */ - public void setShelf(final Shelf cloudSdkValue) { + public void setShelf( final Shelf cloudSdkValue ) + { toShelf = cloudSdkValue; } - /** * Helper class to allow for fluent creation of Product instances. - * + * */ - public final static class ProductBuilder { + public final static class ProductBuilder + { private Vendor toVendor; private Shelf toShelf; - private Product.ProductBuilder toVendor(final Vendor cloudSdkValue) { + private Product.ProductBuilder toVendor( final Vendor cloudSdkValue ) + { toVendor = cloudSdkValue; return this; } /** * Navigation property Vendor for Product to single Vendor. - * + * * @param cloudSdkValue - * The Vendor to build this Product with. - * @return - * This Builder to allow for a fluent interface. + * The Vendor to build this Product with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder vendor(final Vendor cloudSdkValue) { + public Product.ProductBuilder vendor( final Vendor cloudSdkValue ) + { return toVendor(cloudSdkValue); } - private Product.ProductBuilder toShelf(final Shelf cloudSdkValue) { + private Product.ProductBuilder toShelf( final Shelf cloudSdkValue ) + { toShelf = cloudSdkValue; return this; } /** * Navigation property Shelf for Product to single Shelf. - * + * * @param cloudSdkValue - * The Shelf to build this Product with. - * @return - * This Builder to allow for a fluent interface. + * The Shelf to build this Product with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder shelf(final Shelf cloudSdkValue) { + public Product.ProductBuilder shelf( final Shelf cloudSdkValue ) + { return toShelf(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java index c49af28dd..e02d5b370 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCategory.java @@ -12,69 +12,72 @@ import com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmEnumSerializer; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEnum; - /** - *

Original enum type name from the Odata EDM: ProductCategory

- * + *

+ * Original enum type name from the Odata EDM: ProductCategory + *

+ * */ -@JsonAdapter(GsonVdmAdapterFactory.class) -@JsonSerialize(using = JacksonVdmEnumSerializer.class) -@JsonDeserialize(using = JacksonVdmEnumDeserializer.class) -public enum ProductCategory - implements VdmEnum +@JsonAdapter( GsonVdmAdapterFactory.class ) +@JsonSerialize( using = JacksonVdmEnumSerializer.class ) +@JsonDeserialize( using = JacksonVdmEnumDeserializer.class ) +public enum ProductCategory implements VdmEnum { - /** * Vegetables - * + * */ VEGETABLES("Vegetables", 1L), /** * Fruits - * + * */ FRUITS("Fruits", 2L), /** * Meat - * + * */ MEAT("Meat", 3L), /** * Fish - * + * */ FISH("Fish", 4L), /** * Dairy - * + * */ DAIRY("Dairy", 5L), /** * Beverages - * + * */ BEVERAGES("Beverages", 6L); + private final String name; private final Long value; - private ProductCategory(final String enumName, final Long enumValue) { + private ProductCategory( final String enumName, final Long enumValue ) + { name = enumName; value = enumValue; } @Override - public String getName() { + public String getName() + { return name; } @Override - public Long getValue() { + public Long getValue() + { return value; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java index 68dfe2adc..426342589 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/ProductCount.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -14,6 +16,7 @@ import com.sap.cloud.sdk.datamodel.odata.client.request.ODataEntityKey; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmComplex; import com.sap.cloud.sdk.result.ElementName; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -22,56 +25,68 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original complex type name from the Odata EDM: ProductCount

- * + *

+ * Original complex type name from the Odata EDM: ProductCount + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class ProductCount - extends VdmComplex +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class ProductCount extends VdmComplex { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.ProductCount"; /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductId

- * - * @return - * The productId contained in this {@link VdmComplex}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductId + *

+ * + * @return The productId contained in this {@link VdmComplex}. */ @Nullable - @ElementName("ProductId") + @ElementName( "ProductId" ) private Integer productId; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger PRODUCT_ID = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger(ProductCount.class, "ProductId"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger PRODUCT_ID = + new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger( + ProductCount.class, + "ProductId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Quantity

- * - * @return - * The quantity contained in this {@link VdmComplex}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Quantity + *

+ * + * @return The quantity contained in this {@link VdmComplex}. */ @Nullable - @ElementName("Quantity") + @ElementName( "Quantity" ) private Integer quantity; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger QUANTITY = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger(ProductCount.class, "Quantity"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger QUANTITY = + new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger( + ProductCount.class, + "Quantity"); @Nonnull @Override - public Class getType() { + public Class getType() + { return ProductCount.class; } @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("ProductId", getProductId()); cloudSdkValues.put("Quantity", getQuantity()); @@ -79,19 +94,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("ProductId")) { + if( cloudSdkValues.containsKey("ProductId") ) { final Object cloudSdkValue = cloudSdkValues.remove("ProductId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getProductId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getProductId())) ) { setProductId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Quantity")) { + if( cloudSdkValues.containsKey("Quantity") ) { final Object cloudSdkValue = cloudSdkValues.remove("Quantity"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getQuantity()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getQuantity())) ) { setQuantity(((Integer) cloudSdkValue)); } } @@ -107,33 +123,38 @@ protected void fromMap(final Map inputValues) { @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); return entityKey; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductId + *

+ * * @param productId - * The productId to set. + * The productId to set. */ - public void setProductId( - @Nullable - final Integer productId) { + public void setProductId( @Nullable final Integer productId ) + { rememberChangedField("ProductId", this.productId); this.productId = productId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Quantity

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Quantity + *

+ * * @param quantity - * The quantity to set. + * The quantity to set. */ - public void setQuantity( - @Nullable - final Integer quantity) { + public void setQuantity( @Nullable final Integer quantity ) + { rememberChangedField("Quantity", this.quantity); this.quantity = quantity; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java index ee96a9eae..40442d901 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/PurchaseHistoryItem.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -14,6 +16,7 @@ import com.sap.cloud.sdk.datamodel.odata.client.request.ODataEntityKey; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmComplex; import com.sap.cloud.sdk.result.ElementName; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -22,60 +25,73 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original complex type name from the Odata EDM: PurchaseHistoryItem

- * + *

+ * Original complex type name from the Odata EDM: PurchaseHistoryItem + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class PurchaseHistoryItem - extends VdmComplex +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class PurchaseHistoryItem extends VdmComplex { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.PurchaseHistoryItem"; /** - * Constraints: Not nullable

Original property name from the Odata EDM: ReceiptId

- * - * @return - * The receiptId contained in this {@link VdmComplex}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ReceiptId + *

+ * + * @return The receiptId contained in this {@link VdmComplex}. */ @Nullable - @ElementName("ReceiptId") + @ElementName( "ReceiptId" ) private Integer receiptId; - public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger RECEIPT_ID = new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger(PurchaseHistoryItem.class, "ReceiptId"); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger RECEIPT_ID = + new com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty.NumericInteger( + PurchaseHistoryItem.class, + "ReceiptId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount

- * - * @return - * The productCount contained in this {@link VdmComplex}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductCount + *

+ * + * @return The productCount contained in this {@link VdmComplex}. */ @Nullable - @ElementName("ProductCount") + @ElementName( "ProductCount" ) private ProductCount productCount; /** * Use with available request builders to apply the ProductCount complex property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single PRODUCT_COUNT = new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single(PurchaseHistoryItem.class, "ProductCount", ProductCount.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single PRODUCT_COUNT = + new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Single( + PurchaseHistoryItem.class, + "ProductCount", + ProductCount.class); @Nonnull @Override - public Class getType() { + public Class getType() + { return PurchaseHistoryItem.class; } @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("ReceiptId", getReceiptId()); cloudSdkValues.put("ProductCount", getProductCount()); @@ -83,30 +99,31 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("ReceiptId")) { + if( cloudSdkValues.containsKey("ReceiptId") ) { final Object cloudSdkValue = cloudSdkValues.remove("ReceiptId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getReceiptId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getReceiptId())) ) { setReceiptId(((Integer) cloudSdkValue)); } } } // structured properties { - if (cloudSdkValues.containsKey("ProductCount")) { + if( cloudSdkValues.containsKey("ProductCount") ) { final Object cloudSdkValue = cloudSdkValues.remove("ProductCount"); - if (cloudSdkValue instanceof Map) { - if (getProductCount() == null) { + if( cloudSdkValue instanceof Map ) { + if( getProductCount() == null ) { setProductCount(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); getProductCount().fromMap(inputMap); } - if ((cloudSdkValue == null)&&(getProductCount()!= null)) { + if( (cloudSdkValue == null) && (getProductCount() != null) ) { setProductCount(null); } } @@ -119,33 +136,38 @@ protected void fromMap(final Map inputValues) { @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); return entityKey; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ReceiptId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ReceiptId + *

+ * * @param receiptId - * The receiptId to set. + * The receiptId to set. */ - public void setReceiptId( - @Nullable - final Integer receiptId) { + public void setReceiptId( @Nullable final Integer receiptId ) + { rememberChangedField("ReceiptId", this.receiptId); this.receiptId = receiptId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductCount + *

+ * * @param productCount - * The productCount to set. + * The productCount to set. */ - public void setProductCount( - @Nullable - final ProductCount productCount) { + public void setProductCount( @Nullable final ProductCount productCount ) + { rememberChangedField("ProductCount", this.productCount); this.productCount = productCount; } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java index b10b79009..4f3566d6d 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Receipt.java @@ -7,8 +7,10 @@ import java.math.BigDecimal; import java.util.LinkedList; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -19,6 +21,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -30,184 +33,221 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Receipt

- * + *

+ * Original entity name from the Odata EDM: Receipt + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class Receipt - extends VdmEntity - implements VdmEntitySet +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class Receipt extends VdmEntity implements VdmEntitySet { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.Receipt"; /** * Selector for all available fields of Receipt. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * ID of the receipt. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return ID of the receipt. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Receipt.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(Receipt.class, "Id"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

- * - * @return - * ID of the customer. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CustomerId + *

+ * + * @return ID of the customer. */ @Nullable - @ElementName("CustomerId") + @ElementName( "CustomerId" ) private Integer customerId; - public final static SimpleProperty.NumericInteger CUSTOMER_ID = new SimpleProperty.NumericInteger(Receipt.class, "CustomerId"); + public final static SimpleProperty.NumericInteger CUSTOMER_ID = + new SimpleProperty.NumericInteger(Receipt.class, "CustomerId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

- * - * @return - * Total amount of the receipt. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: TotalAmount + *

+ * + * @return Total amount of the receipt. */ @Nullable - @ElementName("TotalAmount") + @ElementName( "TotalAmount" ) private BigDecimal totalAmount; - public final static SimpleProperty.NumericDecimal TOTAL_AMOUNT = new SimpleProperty.NumericDecimal(Receipt.class, "TotalAmount"); + public final static SimpleProperty.NumericDecimal TOTAL_AMOUNT = + new SimpleProperty.NumericDecimal(Receipt.class, "TotalAmount"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductCounts

- * - * @return - * List of products and quantities associated with the receipt. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductCounts + *

+ * + * @return List of products and quantities associated with the receipt. */ @Nullable - @ElementName("ProductCounts") + @ElementName( "ProductCounts" ) private java.util.Collection productCounts; /** * Use with available request builders to apply the ProductCounts complex property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PRODUCT_COUNTS = new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection(Receipt.class, "ProductCounts", ProductCount.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PRODUCT_COUNTS = + new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection( + Receipt.class, + "ProductCounts", + ProductCount.class); /** - * Constraints: Nullable

Original property name from the Odata EDM: properties

- * - * @return - * The properties contained in this {@link VdmEntity}. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: properties + *

+ * + * @return The properties contained in this {@link VdmEntity}. */ @Nullable - @ElementName("properties") + @ElementName( "properties" ) private java.util.Collection properties; /** * Use with available request builders to apply the properties complex property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PROPERTIES = new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection(Receipt.class, "properties", ProductCount.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection PROPERTIES = + new com.sap.cloud.sdk.datamodel.odatav4.core.ComplexProperty.Collection( + Receipt.class, + "properties", + ProductCount.class); /** * Navigation property Customer for Receipt to single Customer. - * + * */ - @ElementName("Customer") + @ElementName( "Customer" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Customer toCustomer; /** * Use with available request builders to apply the Customer navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_CUSTOMER = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Receipt.class, "Customer", Customer.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_CUSTOMER = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( + Receipt.class, + "Customer", + Customer.class); @Nonnull @Override - public Class getType() { + public Class getType() + { return Receipt.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * ID of the receipt. + * ID of the receipt. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CustomerId + *

+ * * @param customerId - * ID of the customer. + * ID of the customer. */ - public void setCustomerId( - @Nullable - final Integer customerId) { + public void setCustomerId( @Nullable final Integer customerId ) + { rememberChangedField("CustomerId", this.customerId); this.customerId = customerId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: TotalAmount + *

+ * * @param totalAmount - * Total amount of the receipt. + * Total amount of the receipt. */ - public void setTotalAmount( - @Nullable - final BigDecimal totalAmount) { + public void setTotalAmount( @Nullable final BigDecimal totalAmount ) + { rememberChangedField("TotalAmount", this.totalAmount); this.totalAmount = totalAmount; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductCounts

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductCounts + *

+ * * @param productCounts - * List of products and quantities associated with the receipt. + * List of products and quantities associated with the receipt. */ - public void setProductCounts( - @Nullable - final java.util.Collection productCounts) { + public void setProductCounts( @Nullable final java.util.Collection productCounts ) + { rememberChangedField("ProductCounts", this.productCounts); this.productCounts = productCounts; } /** - * Constraints: Nullable

Original property name from the Odata EDM: properties

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: properties + *

+ * * @param properties - * The properties to set. + * The properties to set. */ - public void setProperties( - @Nullable - final java.util.Collection properties) { + public void setProperties( @Nullable final java.util.Collection properties ) + { rememberChangedField("properties", this.properties); this.properties = properties; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Receipts"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -215,7 +255,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("CustomerId", getCustomerId()); @@ -226,80 +267,81 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("CustomerId")) { + if( cloudSdkValues.containsKey("CustomerId") ) { final Object cloudSdkValue = cloudSdkValues.remove("CustomerId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getCustomerId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getCustomerId())) ) { setCustomerId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("TotalAmount")) { + if( cloudSdkValues.containsKey("TotalAmount") ) { final Object cloudSdkValue = cloudSdkValues.remove("TotalAmount"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getTotalAmount()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getTotalAmount())) ) { setTotalAmount(((BigDecimal) cloudSdkValue)); } } } // structured properties { - if (cloudSdkValues.containsKey("ProductCounts")) { + if( cloudSdkValues.containsKey("ProductCounts") ) { final Object cloudSdkValue = cloudSdkValues.remove("ProductCounts"); - if (cloudSdkValue instanceof Iterable) { + if( cloudSdkValue instanceof Iterable ) { final LinkedList productCounts = new LinkedList(); - for (Object cloudSdkProperties: ((Iterable ) cloudSdkValue)) { - if (cloudSdkProperties instanceof Map) { + for( Object cloudSdkProperties : ((Iterable) cloudSdkValue) ) { + if( cloudSdkProperties instanceof Map ) { final ProductCount cloudSdkItem = new ProductCount(); - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); cloudSdkItem.fromMap(inputMap); productCounts.add(cloudSdkItem); } } setProductCounts(productCounts); } - if ((cloudSdkValue == null)&&(getProductCounts()!= null)) { + if( (cloudSdkValue == null) && (getProductCounts() != null) ) { setProductCounts(null); } } - if (cloudSdkValues.containsKey("properties")) { + if( cloudSdkValues.containsKey("properties") ) { final Object cloudSdkValue = cloudSdkValues.remove("properties"); - if (cloudSdkValue instanceof Iterable) { + if( cloudSdkValue instanceof Iterable ) { final LinkedList properties = new LinkedList(); - for (Object cloudSdkProperties: ((Iterable ) cloudSdkValue)) { - if (cloudSdkProperties instanceof Map) { + for( Object cloudSdkProperties : ((Iterable) cloudSdkValue) ) { + if( cloudSdkProperties instanceof Map ) { final ProductCount cloudSdkItem = new ProductCount(); - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); cloudSdkItem.fromMap(inputMap); properties.add(cloudSdkItem); } } setProperties(properties); } - if ((cloudSdkValue == null)&&(getProperties()!= null)) { + if( (cloudSdkValue == null) && (getProperties() != null) ) { setProperties(null); } } } // navigation properties { - if ((cloudSdkValues).containsKey("Customer")) { + if( (cloudSdkValues).containsKey("Customer") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Customer"); - if (cloudSdkValue instanceof Map) { - if (toCustomer == null) { + if( cloudSdkValue instanceof Map ) { + if( toCustomer == null ) { toCustomer = new Customer(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toCustomer.fromMap(inputMap); } } @@ -308,67 +350,74 @@ protected void fromMap(final Map inputValues) { } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toCustomer!= null) { + if( toCustomer != null ) { (cloudSdkValues).put("Customer", toCustomer); } return cloudSdkValues; } /** - * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property Customer. + * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property + * Customer. *

- * If the navigation property for an entity Receipt has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Customer is already loaded, the result will contain the Customer entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Receipt has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Customer is already loaded, the result will contain the + * Customer entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getCustomerIfPresent() { + public Option getCustomerIfPresent() + { return Option.of(toCustomer); } /** * Overwrites the associated Customer entity for the loaded navigation property Customer. - * + * * @param cloudSdkValue - * New Customer entity. + * New Customer entity. */ - public void setCustomer(final Customer cloudSdkValue) { + public void setCustomer( final Customer cloudSdkValue ) + { toCustomer = cloudSdkValue; } - /** * Helper class to allow for fluent creation of Receipt instances. - * + * */ - public final static class ReceiptBuilder { + public final static class ReceiptBuilder + { private Customer toCustomer; - private Receipt.ReceiptBuilder toCustomer(final Customer cloudSdkValue) { + private Receipt.ReceiptBuilder toCustomer( final Customer cloudSdkValue ) + { toCustomer = cloudSdkValue; return this; } /** * Navigation property Customer for Receipt to single Customer. - * + * * @param cloudSdkValue - * The Customer to build this Receipt with. - * @return - * This Builder to allow for a fluent interface. + * The Customer to build this Receipt with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Receipt.ReceiptBuilder customer(final Customer cloudSdkValue) { + public Receipt.ReceiptBuilder customer( final Customer cloudSdkValue ) + { return toCustomer(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java index 3eb3529b8..50371621a 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Shelf.java @@ -7,8 +7,10 @@ import java.util.Collections; import java.util.List; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Lists; @@ -20,6 +22,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntitySet; import com.sap.cloud.sdk.datamodel.odatav4.sample.services.SdkGroceryStoreService; import com.sap.cloud.sdk.result.ElementName; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -31,120 +34,140 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Shelf

- * + *

+ * Original entity name from the Odata EDM: Shelf + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class Shelf - extends VdmEntity - implements VdmEntitySet +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class Shelf extends VdmEntity implements VdmEntitySet { @Getter private final String odataType = "com.sap.cloud.sdk.store.grocery.Shelf"; /** * Selector for all available fields of Shelf. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Shelf.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(Shelf.class, "Id"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

- * - * @return - * The floorPlanId contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: FloorPlanId + *

+ * + * @return The floorPlanId contained in this {@link VdmEntity}. */ @Nullable - @ElementName("FloorPlanId") + @ElementName( "FloorPlanId" ) private Integer floorPlanId; - public final static SimpleProperty.NumericInteger FLOOR_PLAN_ID = new SimpleProperty.NumericInteger(Shelf.class, "FloorPlanId"); + public final static SimpleProperty.NumericInteger FLOOR_PLAN_ID = + new SimpleProperty.NumericInteger(Shelf.class, "FloorPlanId"); /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * */ - @ElementName("FloorPlan") + @ElementName( "FloorPlan" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private FloorPlan toFloorPlan; /** * Navigation property Products for Shelf to multiple Product. - * + * */ - @ElementName("Products") - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @ElementName( "Products" ) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private List toProducts; /** * Use with available request builders to apply the FloorPlan navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_FLOOR_PLAN = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Shelf.class, "FloorPlan", FloorPlan.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_FLOOR_PLAN = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( + Shelf.class, + "FloorPlan", + FloorPlan.class); /** * Use with available request builders to apply the Products navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection TO_PRODUCTS = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection(Shelf.class, "Products", Product.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection TO_PRODUCTS = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Collection( + Shelf.class, + "Products", + Product.class); @Nonnull @Override - public Class getType() { + public Class getType() + { return Shelf.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: FloorPlanId + *

+ * * @param floorPlanId - * The floorPlanId to set. + * The floorPlanId to set. */ - public void setFloorPlanId( - @Nullable - final Integer floorPlanId) { + public void setFloorPlanId( @Nullable final Integer floorPlanId ) + { rememberChangedField("FloorPlanId", this.floorPlanId); this.floorPlanId = floorPlanId; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Shelves"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -152,7 +175,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("FloorPlanId", getFloorPlanId()); @@ -160,19 +184,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("FloorPlanId")) { + if( cloudSdkValues.containsKey("FloorPlanId") ) { final Object cloudSdkValue = cloudSdkValues.remove("FloorPlanId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getFloorPlanId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getFloorPlanId())) ) { setFloorPlanId(((Integer) cloudSdkValue)); } } @@ -182,40 +207,40 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("FloorPlan")) { + if( (cloudSdkValues).containsKey("FloorPlan") ) { final Object cloudSdkValue = (cloudSdkValues).remove("FloorPlan"); - if (cloudSdkValue instanceof Map) { - if (toFloorPlan == null) { + if( cloudSdkValue instanceof Map ) { + if( toFloorPlan == null ) { toFloorPlan = new FloorPlan(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toFloorPlan.fromMap(inputMap); } } - if ((cloudSdkValues).containsKey("Products")) { + if( (cloudSdkValues).containsKey("Products") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Products"); - if (cloudSdkValue instanceof Iterable) { - if (toProducts == null) { + if( cloudSdkValue instanceof Iterable ) { + if( toProducts == null ) { toProducts = Lists.newArrayList(); } else { toProducts = Lists.newArrayList(toProducts); } int i = 0; - for (Object item: ((Iterable ) cloudSdkValue)) { - if (!(item instanceof Map)) { + for( Object item : ((Iterable) cloudSdkValue) ) { + if( !(item instanceof Map) ) { continue; } Product entity; - if (toProducts.size()>i) { + if( toProducts.size() > i ) { entity = toProducts.get(i); } else { entity = new Product(); toProducts.add(entity); } i = (i + 1); - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) item); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) item); entity.fromMap(inputMap); } } @@ -225,73 +250,86 @@ protected void fromMap(final Map inputValues) { } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toFloorPlan!= null) { + if( toFloorPlan != null ) { (cloudSdkValues).put("FloorPlan", toFloorPlan); } - if (toProducts!= null) { + if( toProducts != null ) { (cloudSdkValues).put("Products", toProducts); } return cloudSdkValues; } /** - * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property FloorPlan. + * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property + * FloorPlan. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property FloorPlan is already loaded, the result will contain the FloorPlan entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property FloorPlan is already loaded, the result will contain + * the FloorPlan entity. If not, an Option with result state empty is + * returned. */ @Nonnull - public Option getFloorPlanIfPresent() { + public Option getFloorPlanIfPresent() + { return Option.of(toFloorPlan); } /** * Overwrites the associated FloorPlan entity for the loaded navigation property FloorPlan. - * + * * @param cloudSdkValue - * New FloorPlan entity. + * New FloorPlan entity. */ - public void setFloorPlan(final FloorPlan cloudSdkValue) { + public void setFloorPlan( final FloorPlan cloudSdkValue ) + { toFloorPlan = cloudSdkValue; } /** - * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property Products. + * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property + * Products. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Products is already loaded, the result will contain the Product entities. If not, an Option with result state empty is returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Products is already loaded, the result will contain the + * Product entities. If not, an Option with result state empty is returned. */ @Nonnull - public Option> getProductsIfPresent() { + public Option> getProductsIfPresent() + { return Option.of(toProducts); } /** * Overwrites the list of associated Product entities for the loaded navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * * @param cloudSdkValue - * List of Product entities. + * List of Product entities. */ - public void setProducts( - @Nonnull - final List cloudSdkValue) { - if (toProducts == null) { + public void setProducts( @Nonnull final List cloudSdkValue ) + { + if( toProducts == null ) { toProducts = Lists.newArrayList(); } toProducts.clear(); @@ -299,77 +337,94 @@ public void setProducts( } /** - * Adds elements to the list of associated Product entities. This corresponds to the OData navigation property Products. + * Adds elements to the list of associated Product entities. This corresponds to the OData navigation + * property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * * @param entity - * Array of Product entities. + * Array of Product entities. */ - public void addProducts(Product... entity) { - if (toProducts == null) { + public void addProducts( Product... entity ) + { + if( toProducts == null ) { toProducts = Lists.newArrayList(); } toProducts.addAll(Lists.newArrayList(entity)); } /** - * Function that can be applied to any entity object of this class.

- * - * @return - * Function object prepared with the given parameters to be applied to any entity object of this class.

To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. + * Function that can be applied to any entity object of this class. + *

+ * + * @return Function object prepared with the given parameters to be applied to any entity object of this class. + *

+ * To execute it use the {@code service.forEntity(entity).applyFunction(thisFunction)} API. */ @Nonnull - public static com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection getProductQuantities() { + public static + com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection + getProductQuantities() + { final Map parameters = Collections.emptyMap(); - return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection(Shelf.class, ProductCount.class, "com.sap.cloud.sdk.store.grocery.GetProductQuantities", parameters); + return new com.sap.cloud.sdk.datamodel.odatav4.core.BoundFunction.SingleToCollection( + Shelf.class, + ProductCount.class, + "com.sap.cloud.sdk.store.grocery.GetProductQuantities", + parameters); } - /** * Helper class to allow for fluent creation of Shelf instances. - * + * */ - public final static class ShelfBuilder { + public final static class ShelfBuilder + { private FloorPlan toFloorPlan; private List toProducts = Lists.newArrayList(); - private Shelf.ShelfBuilder toFloorPlan(final FloorPlan cloudSdkValue) { + private Shelf.ShelfBuilder toFloorPlan( final FloorPlan cloudSdkValue ) + { toFloorPlan = cloudSdkValue; return this; } /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * * @param cloudSdkValue - * The FloorPlan to build this Shelf with. - * @return - * This Builder to allow for a fluent interface. + * The FloorPlan to build this Shelf with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder floorPlan(final FloorPlan cloudSdkValue) { + public Shelf.ShelfBuilder floorPlan( final FloorPlan cloudSdkValue ) + { return toFloorPlan(cloudSdkValue); } - private Shelf.ShelfBuilder toProducts(final List cloudSdkValue) { + private Shelf.ShelfBuilder toProducts( final List cloudSdkValue ) + { toProducts.addAll(cloudSdkValue); return this; } /** * Navigation property Products for Shelf to multiple Product. - * + * * @param cloudSdkValue - * The Products to build this Shelf with. - * @return - * This Builder to allow for a fluent interface. + * The Products to build this Shelf with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder products(Product... cloudSdkValue) { + public Shelf.ShelfBuilder products( Product... cloudSdkValue ) + { return toProducts(Lists.newArrayList(cloudSdkValue)); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java index 0ef0878d2..824e55787 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/namespaces/sdkgrocerystore/Vendor.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Maps; @@ -15,6 +17,7 @@ import com.sap.cloud.sdk.datamodel.odatav4.core.SimpleProperty; import com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntity; import com.sap.cloud.sdk.result.ElementName; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -26,129 +29,150 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Vendor

- * + *

+ * Original entity name from the Odata EDM: Vendor + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class) -@JsonSerialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class) -@JsonDeserialize(using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class) -public class Vendor - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmAdapterFactory.class ) +@JsonSerialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectSerializer.class ) +@JsonDeserialize( using = com.sap.cloud.sdk.datamodel.odatav4.adapter.JacksonVdmObjectDeserializer.class ) +public class Vendor extends VdmEntity { @Getter private final java.lang.String odataType = "com.sap.cloud.sdk.store.grocery.Vendor"; /** * Selector for all available fields of Vendor. - * + * */ public final static SimpleProperty ALL_FIELDS = all(); /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this {@link VdmEntity}. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Id") + @ElementName( "Id" ) private Integer id; - public final static SimpleProperty.NumericInteger ID = new SimpleProperty.NumericInteger(Vendor.class, "Id"); + public final static SimpleProperty.NumericInteger ID = + new SimpleProperty.NumericInteger(Vendor.class, "Id"); /** - * Constraints: Nullable, Maximum length: 100

Original property name from the Odata EDM: Name

- * - * @return - * The name contained in this {@link VdmEntity}. + * Constraints: Nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ * + * @return The name contained in this {@link VdmEntity}. */ @Nullable - @ElementName("Name") + @ElementName( "Name" ) private java.lang.String name; public final static SimpleProperty.String NAME = new SimpleProperty.String(Vendor.class, "Name"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

- * - * @return - * The addressId contained in this {@link VdmEntity}. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ * + * @return The addressId contained in this {@link VdmEntity}. */ @Nullable - @ElementName("AddressId") + @ElementName( "AddressId" ) private Integer addressId; - public final static SimpleProperty.NumericInteger ADDRESS_ID = new SimpleProperty.NumericInteger(Vendor.class, "AddressId"); + public final static SimpleProperty.NumericInteger ADDRESS_ID = + new SimpleProperty.NumericInteger(Vendor.class, "AddressId"); /** * Navigation property Address for Vendor to single Address. - * + * */ - @ElementName("Address") + @ElementName( "Address" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Address toAddress; /** * Use with available request builders to apply the Address navigation property to query operations. - * + * */ - public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single(Vendor.class, "Address", Address.class); + public final static com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single TO_ADDRESS = + new com.sap.cloud.sdk.datamodel.odatav4.core.NavigationProperty.Single( + Vendor.class, + "Address", + Address.class); @Nonnull @Override - public Class getType() { + public Class getType() + { return Vendor.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Nullable, Maximum length: 100

Original property name from the Odata EDM: Name

- * + * Constraints: Nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ * * @param name - * The name to set. + * The name to set. */ - public void setName( - @Nullable - final java.lang.String name) { + public void setName( @Nullable final java.lang.String name ) + { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: AddressId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ * * @param addressId - * The addressId to set. + * The addressId to set. */ - public void setAddressId( - @Nullable - final Integer addressId) { + public void setAddressId( @Nullable final Integer addressId ) + { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected java.lang.String getEntityCollection() { + protected java.lang.String getEntityCollection() + { return "Vendor"; } @Nonnull @Override - protected ODataEntityKey getKey() { + protected ODataEntityKey getKey() + { final ODataEntityKey entityKey = super.getKey(); entityKey.addKeyProperty("Id", getId()); return entityKey; @@ -156,7 +180,8 @@ protected ODataEntityKey getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -165,25 +190,26 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object cloudSdkValue = cloudSdkValues.remove("Id"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getId())) ) { setId(((Integer) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("Name")) { + if( cloudSdkValues.containsKey("Name") ) { final Object cloudSdkValue = cloudSdkValues.remove("Name"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getName()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getName())) ) { setName(((java.lang.String) cloudSdkValue)); } } - if (cloudSdkValues.containsKey("AddressId")) { + if( cloudSdkValues.containsKey("AddressId") ) { final Object cloudSdkValue = cloudSdkValues.remove("AddressId"); - if ((cloudSdkValue == null)||(!cloudSdkValue.equals(getAddressId()))) { + if( (cloudSdkValue == null) || (!cloudSdkValue.equals(getAddressId())) ) { setAddressId(((Integer) cloudSdkValue)); } } @@ -193,14 +219,14 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("Address")) { + if( (cloudSdkValues).containsKey("Address") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if (cloudSdkValue instanceof Map) { - if (toAddress == null) { + if( cloudSdkValue instanceof Map ) { + if( toAddress == null ) { toAddress = new Address(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -210,61 +236,67 @@ protected void fromMap(final Map inputValues) { @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toAddress!= null) { + if( toAddress != null ) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property + * Address. *

- * If the navigation property for an entity Vendor has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Vendor has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Address is already loaded, the result will contain the + * Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() { + public Option
getAddressIfPresent() + { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress(final Address cloudSdkValue) { + public void setAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; } - /** * Helper class to allow for fluent creation of Vendor instances. - * + * */ - public final static class VendorBuilder { + public final static class VendorBuilder + { private Address toAddress; - private Vendor.VendorBuilder toAddress(final Address cloudSdkValue) { + private Vendor.VendorBuilder toAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Vendor to single Address. - * + * * @param cloudSdkValue - * The Address to build this Vendor with. - * @return - * This Builder to allow for a fluent interface. + * The Address to build this Vendor with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Vendor.VendorBuilder address(final Address cloudSdkValue) { + public Vendor.VendorBuilder address( final Address cloudSdkValue ) + { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java index 4dc96381f..caee3d90b 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/DefaultSdkGroceryStoreService.java @@ -6,7 +6,9 @@ import java.util.HashMap; import java.util.Map; + import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder; @@ -21,15 +23,20 @@ import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product; import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf; -import lombok.Getter; +import lombok.Getter; /** - *

Details:

OData Service:SDK_Grocery_Store
- * + *

Details:

+ * + * + * + * + * + *
OData Service:SDK_Grocery_Store
+ * */ -public class DefaultSdkGroceryStoreService - implements ServiceWithNavigableEntities, SdkGroceryStoreService +public class DefaultSdkGroceryStoreService implements ServiceWithNavigableEntities, SdkGroceryStoreService { @Nonnull @@ -38,9 +45,10 @@ public class DefaultSdkGroceryStoreService /** * Creates a service using {@link SdkGroceryStoreService#DEFAULT_SERVICE_PATH} to send the requests. - * + * */ - public DefaultSdkGroceryStoreService() { + public DefaultSdkGroceryStoreService() + { servicePath = SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @@ -48,43 +56,45 @@ public DefaultSdkGroceryStoreService() { * Creates a service using the provided service path to send the requests. *

* Used by the fluent {@link #withServicePath(String)} method. - * + * */ - private DefaultSdkGroceryStoreService( - @Nonnull - final String servicePath) { + private DefaultSdkGroceryStoreService( @Nonnull final String servicePath ) + { this.servicePath = servicePath; } @Override @Nonnull - public DefaultSdkGroceryStoreService withServicePath( - @Nonnull - final String servicePath) { + public DefaultSdkGroceryStoreService withServicePath( @Nonnull final String servicePath ) + { return new DefaultSdkGroceryStoreService(servicePath); } @Override @Nonnull - public BatchRequestBuilder batch() { + public BatchRequestBuilder batch() + { return new BatchRequestBuilder(servicePath); } @Override @Nonnull - public GetAllRequestBuilder getAllCustomers() { + public GetAllRequestBuilder getAllCustomers() + { return new GetAllRequestBuilder(servicePath, Customer.class, "Customers"); } @Override @Nonnull - public CountRequestBuilder countCustomers() { + public CountRequestBuilder countCustomers() + { return new CountRequestBuilder(servicePath, Customer.class, "Customers"); } @Override @Nonnull - public GetByKeyRequestBuilder getCustomersByKey(final Integer id) { + public GetByKeyRequestBuilder getCustomersByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Customer.class, key, "Customers"); @@ -92,43 +102,43 @@ public GetByKeyRequestBuilder getCustomersByKey(final Integer id) { @Override @Nonnull - public CreateRequestBuilder createCustomers( - @Nonnull - final Customer customer) { + public CreateRequestBuilder createCustomers( @Nonnull final Customer customer ) + { return new CreateRequestBuilder(servicePath, customer, "Customers"); } @Override @Nonnull - public UpdateRequestBuilder updateCustomers( - @Nonnull - final Customer customer) { + public UpdateRequestBuilder updateCustomers( @Nonnull final Customer customer ) + { return new UpdateRequestBuilder(servicePath, customer, "Customers"); } @Override @Nonnull - public DeleteRequestBuilder deleteCustomers( - @Nonnull - final Customer customer) { + public DeleteRequestBuilder deleteCustomers( @Nonnull final Customer customer ) + { return new DeleteRequestBuilder(servicePath, customer, "Customers"); } @Override @Nonnull - public GetAllRequestBuilder getAllProducts() { + public GetAllRequestBuilder getAllProducts() + { return new GetAllRequestBuilder(servicePath, Product.class, "Products"); } @Override @Nonnull - public CountRequestBuilder countProducts() { + public CountRequestBuilder countProducts() + { return new CountRequestBuilder(servicePath, Product.class, "Products"); } @Override @Nonnull - public GetByKeyRequestBuilder getProductsByKey(final Integer id) { + public GetByKeyRequestBuilder getProductsByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Product.class, key, "Products"); @@ -136,43 +146,43 @@ public GetByKeyRequestBuilder getProductsByKey(final Integer id) { @Override @Nonnull - public CreateRequestBuilder createProducts( - @Nonnull - final Product product) { + public CreateRequestBuilder createProducts( @Nonnull final Product product ) + { return new CreateRequestBuilder(servicePath, product, "Products"); } @Override @Nonnull - public UpdateRequestBuilder updateProducts( - @Nonnull - final Product product) { + public UpdateRequestBuilder updateProducts( @Nonnull final Product product ) + { return new UpdateRequestBuilder(servicePath, product, "Products"); } @Override @Nonnull - public DeleteRequestBuilder deleteProducts( - @Nonnull - final Product product) { + public DeleteRequestBuilder deleteProducts( @Nonnull final Product product ) + { return new DeleteRequestBuilder(servicePath, product, "Products"); } @Override @Nonnull - public GetAllRequestBuilder getAllReceipts() { + public GetAllRequestBuilder getAllReceipts() + { return new GetAllRequestBuilder(servicePath, Receipt.class, "Receipts"); } @Override @Nonnull - public CountRequestBuilder countReceipts() { + public CountRequestBuilder countReceipts() + { return new CountRequestBuilder(servicePath, Receipt.class, "Receipts"); } @Override @Nonnull - public GetByKeyRequestBuilder getReceiptsByKey(final Integer id) { + public GetByKeyRequestBuilder getReceiptsByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Receipt.class, key, "Receipts"); @@ -180,43 +190,43 @@ public GetByKeyRequestBuilder getReceiptsByKey(final Integer id) { @Override @Nonnull - public CreateRequestBuilder createReceipts( - @Nonnull - final Receipt receipt) { + public CreateRequestBuilder createReceipts( @Nonnull final Receipt receipt ) + { return new CreateRequestBuilder(servicePath, receipt, "Receipts"); } @Override @Nonnull - public UpdateRequestBuilder updateReceipts( - @Nonnull - final Receipt receipt) { + public UpdateRequestBuilder updateReceipts( @Nonnull final Receipt receipt ) + { return new UpdateRequestBuilder(servicePath, receipt, "Receipts"); } @Override @Nonnull - public DeleteRequestBuilder deleteReceipts( - @Nonnull - final Receipt receipt) { + public DeleteRequestBuilder deleteReceipts( @Nonnull final Receipt receipt ) + { return new DeleteRequestBuilder(servicePath, receipt, "Receipts"); } @Override @Nonnull - public GetAllRequestBuilder

getAllAddresses() { + public GetAllRequestBuilder
getAllAddresses() + { return new GetAllRequestBuilder
(servicePath, Address.class, "Addresses"); } @Override @Nonnull - public CountRequestBuilder
countAddresses() { + public CountRequestBuilder
countAddresses() + { return new CountRequestBuilder
(servicePath, Address.class, "Addresses"); } @Override @Nonnull - public GetByKeyRequestBuilder
getAddressesByKey(final Integer id) { + public GetByKeyRequestBuilder
getAddressesByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder
(servicePath, Address.class, key, "Addresses"); @@ -224,43 +234,43 @@ public GetByKeyRequestBuilder
getAddressesByKey(final Integer id) { @Override @Nonnull - public CreateRequestBuilder
createAddresses( - @Nonnull - final Address address) { + public CreateRequestBuilder
createAddresses( @Nonnull final Address address ) + { return new CreateRequestBuilder
(servicePath, address, "Addresses"); } @Override @Nonnull - public UpdateRequestBuilder
updateAddresses( - @Nonnull - final Address address) { + public UpdateRequestBuilder
updateAddresses( @Nonnull final Address address ) + { return new UpdateRequestBuilder
(servicePath, address, "Addresses"); } @Override @Nonnull - public DeleteRequestBuilder
deleteAddresses( - @Nonnull - final Address address) { + public DeleteRequestBuilder
deleteAddresses( @Nonnull final Address address ) + { return new DeleteRequestBuilder
(servicePath, address, "Addresses"); } @Override @Nonnull - public GetAllRequestBuilder getAllShelves() { + public GetAllRequestBuilder getAllShelves() + { return new GetAllRequestBuilder(servicePath, Shelf.class, "Shelves"); } @Override @Nonnull - public CountRequestBuilder countShelves() { + public CountRequestBuilder countShelves() + { return new CountRequestBuilder(servicePath, Shelf.class, "Shelves"); } @Override @Nonnull - public GetByKeyRequestBuilder getShelvesByKey(final Integer id) { + public GetByKeyRequestBuilder getShelvesByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Shelf.class, key, "Shelves"); @@ -268,43 +278,43 @@ public GetByKeyRequestBuilder getShelvesByKey(final Integer id) { @Override @Nonnull - public CreateRequestBuilder createShelves( - @Nonnull - final Shelf shelf) { + public CreateRequestBuilder createShelves( @Nonnull final Shelf shelf ) + { return new CreateRequestBuilder(servicePath, shelf, "Shelves"); } @Override @Nonnull - public UpdateRequestBuilder updateShelves( - @Nonnull - final Shelf shelf) { + public UpdateRequestBuilder updateShelves( @Nonnull final Shelf shelf ) + { return new UpdateRequestBuilder(servicePath, shelf, "Shelves"); } @Override @Nonnull - public DeleteRequestBuilder deleteShelves( - @Nonnull - final Shelf shelf) { + public DeleteRequestBuilder deleteShelves( @Nonnull final Shelf shelf ) + { return new DeleteRequestBuilder(servicePath, shelf, "Shelves"); } @Override @Nonnull - public GetAllRequestBuilder getAllShopFloorShelves() { + public GetAllRequestBuilder getAllShopFloorShelves() + { return new GetAllRequestBuilder(servicePath, Shelf.class, "ShopFloorShelves"); } @Override @Nonnull - public CountRequestBuilder countShopFloorShelves() { + public CountRequestBuilder countShopFloorShelves() + { return new CountRequestBuilder(servicePath, Shelf.class, "ShopFloorShelves"); } @Override @Nonnull - public GetByKeyRequestBuilder getShopFloorShelvesByKey(final Integer id) { + public GetByKeyRequestBuilder getShopFloorShelvesByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Shelf.class, key, "ShopFloorShelves"); @@ -312,43 +322,43 @@ public GetByKeyRequestBuilder getShopFloorShelvesByKey(final Integer id) @Override @Nonnull - public CreateRequestBuilder createShopFloorShelves( - @Nonnull - final Shelf shelf) { + public CreateRequestBuilder createShopFloorShelves( @Nonnull final Shelf shelf ) + { return new CreateRequestBuilder(servicePath, shelf, "ShopFloorShelves"); } @Override @Nonnull - public UpdateRequestBuilder updateShopFloorShelves( - @Nonnull - final Shelf shelf) { + public UpdateRequestBuilder updateShopFloorShelves( @Nonnull final Shelf shelf ) + { return new UpdateRequestBuilder(servicePath, shelf, "ShopFloorShelves"); } @Override @Nonnull - public DeleteRequestBuilder deleteShopFloorShelves( - @Nonnull - final Shelf shelf) { + public DeleteRequestBuilder deleteShopFloorShelves( @Nonnull final Shelf shelf ) + { return new DeleteRequestBuilder(servicePath, shelf, "ShopFloorShelves"); } @Override @Nonnull - public GetAllRequestBuilder getAllStorageShelves() { + public GetAllRequestBuilder getAllStorageShelves() + { return new GetAllRequestBuilder(servicePath, Shelf.class, "StorageShelves"); } @Override @Nonnull - public CountRequestBuilder countStorageShelves() { + public CountRequestBuilder countStorageShelves() + { return new CountRequestBuilder(servicePath, Shelf.class, "StorageShelves"); } @Override @Nonnull - public GetByKeyRequestBuilder getStorageShelvesByKey(final Integer id) { + public GetByKeyRequestBuilder getStorageShelvesByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, Shelf.class, key, "StorageShelves"); @@ -356,43 +366,43 @@ public GetByKeyRequestBuilder getStorageShelvesByKey(final Integer id) { @Override @Nonnull - public CreateRequestBuilder createStorageShelves( - @Nonnull - final Shelf shelf) { + public CreateRequestBuilder createStorageShelves( @Nonnull final Shelf shelf ) + { return new CreateRequestBuilder(servicePath, shelf, "StorageShelves"); } @Override @Nonnull - public UpdateRequestBuilder updateStorageShelves( - @Nonnull - final Shelf shelf) { + public UpdateRequestBuilder updateStorageShelves( @Nonnull final Shelf shelf ) + { return new UpdateRequestBuilder(servicePath, shelf, "StorageShelves"); } @Override @Nonnull - public DeleteRequestBuilder deleteStorageShelves( - @Nonnull - final Shelf shelf) { + public DeleteRequestBuilder deleteStorageShelves( @Nonnull final Shelf shelf ) + { return new DeleteRequestBuilder(servicePath, shelf, "StorageShelves"); } @Override @Nonnull - public GetAllRequestBuilder getAllOpeningHours() { + public GetAllRequestBuilder getAllOpeningHours() + { return new GetAllRequestBuilder(servicePath, OpeningHours.class, "OpeningHours"); } @Override @Nonnull - public CountRequestBuilder countOpeningHours() { + public CountRequestBuilder countOpeningHours() + { return new CountRequestBuilder(servicePath, OpeningHours.class, "OpeningHours"); } @Override @Nonnull - public GetByKeyRequestBuilder getOpeningHoursByKey(final Integer id) { + public GetByKeyRequestBuilder getOpeningHoursByKey( final Integer id ) + { final Map key = new HashMap(); key.put("Id", id); return new GetByKeyRequestBuilder(servicePath, OpeningHours.class, key, "OpeningHours"); @@ -400,25 +410,22 @@ public GetByKeyRequestBuilder getOpeningHoursByKey(final Integer i @Override @Nonnull - public CreateRequestBuilder createOpeningHours( - @Nonnull - final OpeningHours openingHours) { + public CreateRequestBuilder createOpeningHours( @Nonnull final OpeningHours openingHours ) + { return new CreateRequestBuilder(servicePath, openingHours, "OpeningHours"); } @Override @Nonnull - public UpdateRequestBuilder updateOpeningHours( - @Nonnull - final OpeningHours openingHours) { + public UpdateRequestBuilder updateOpeningHours( @Nonnull final OpeningHours openingHours ) + { return new UpdateRequestBuilder(servicePath, openingHours, "OpeningHours"); } @Override @Nonnull - public DeleteRequestBuilder deleteOpeningHours( - @Nonnull - final OpeningHours openingHours) { + public DeleteRequestBuilder deleteOpeningHours( @Nonnull final OpeningHours openingHours ) + { return new DeleteRequestBuilder(servicePath, openingHours, "OpeningHours"); } diff --git a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java index b659a1c63..fc9137011 100644 --- a/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java +++ b/datamodel/odata-v4/odata-v4-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odatav4/sample/services/SdkGroceryStoreService.java @@ -5,6 +5,7 @@ package com.sap.cloud.sdk.datamodel.odatav4.sample.services; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder; import com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder; @@ -19,583 +20,809 @@ import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf; - /** - *

Details:

OData Service:SDK_Grocery_Store
- * + *

Details:

+ * + * + * + * + * + *
OData Service:SDK_Grocery_Store
+ * */ -public interface SdkGroceryStoreService { +public interface SdkGroceryStoreService +{ /** - * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path used to access the endpoint. - * + * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path + * used to access the endpoint. + * */ String DEFAULT_SERVICE_PATH = "/com.sap.cloud.sdk.store.grocery"; /** - * Overrides the default service path and returns a new service instance with the specified service path. Also adjusts the respective entity URLs. - * + * Overrides the default service path and returns a new service instance with the specified service path. Also + * adjusts the respective entity URLs. + * * @param servicePath - * Service path that will override the default. - * @return - * A new service instance with the specified service path. + * Service path that will override the default. + * @return A new service instance with the specified service path. */ @Nonnull - SdkGroceryStoreService withServicePath( - @Nonnull - final String servicePath); + SdkGroceryStoreService withServicePath( @Nonnull final String servicePath ); /** * Creates a batch request builder object. - * - * @return - * A request builder to handle batch operation on this service. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder#execute(Destination) execute} method on the request builder object. + * + * @return A request builder to handle batch operation on this service. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.BatchRequestBuilder#execute(Destination) execute} method + * on the request builder object. */ @Nonnull BatchRequestBuilder batch(); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllCustomers(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countCustomers(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} + * entity using key fields. + * * @param id - * ID of the customer.

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + * ID of the customer. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * using key fields. This request builder allows methods which modify the underlying query to be called + * before executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getCustomersByKey(final Integer id); + GetByKeyRequestBuilder getCustomersByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} + * entity and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. + * To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createCustomers( - @Nonnull - final Customer customer); + CreateRequestBuilder createCustomers( @Nonnull final Customer customer ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer + * Customer} entity and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. + * To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateCustomers( - @Nonnull - final Customer customer); + UpdateRequestBuilder updateCustomers( @Nonnull final Customer customer ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer + * Customer} entity in the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Customer Customer} entity. + * To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteCustomers( - @Nonnull - final Customer customer); + DeleteRequestBuilder deleteCustomers( @Nonnull final Customer customer ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllProducts(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countProducts(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} + * entity using key fields. + * * @param id - * ID of the product.

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + * ID of the product. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity + * using key fields. This request builder allows methods which modify the underlying query to be called + * before executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getProductsByKey(final Integer id); + GetByKeyRequestBuilder getProductsByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity + * and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createProducts( - @Nonnull - final Product product); + CreateRequestBuilder createProducts( @Nonnull final Product product ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} + * entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateProducts( - @Nonnull - final Product product); + UpdateRequestBuilder updateProducts( @Nonnull final Product product ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} + * entity in the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Product Product} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteProducts( - @Nonnull - final Product product); + DeleteRequestBuilder deleteProducts( @Nonnull final Product product ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllReceipts(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countReceipts(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} + * entity using key fields. + * * @param id - * ID of the receipt.

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + * ID of the receipt. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * using key fields. This request builder allows methods which modify the underlying query to be called + * before executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getReceiptsByKey(final Integer id); + GetByKeyRequestBuilder getReceiptsByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createReceipts( - @Nonnull - final Receipt receipt); + CreateRequestBuilder createReceipts( @Nonnull final Receipt receipt ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} + * entity and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateReceipts( - @Nonnull - final Receipt receipt); + UpdateRequestBuilder updateReceipts( @Nonnull final Receipt receipt ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} + * entity in the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteReceipts( - @Nonnull - final Receipt receipt); + DeleteRequestBuilder deleteReceipts( @Nonnull final Receipt receipt ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder
getAllAddresses(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entities. + * This request builder allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder
countAddresses(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} + * entity using key fields. + * * @param id - * ID of the address.

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + * ID of the address. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity + * using key fields. This request builder allows methods which modify the underlying query to be called + * before executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder
getAddressesByKey(final Integer id); + GetByKeyRequestBuilder
getAddressesByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity + * and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder
createAddresses( - @Nonnull - final Address address); + CreateRequestBuilder
createAddresses( @Nonnull final Address address ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} + * entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder
updateAddresses( - @Nonnull - final Address address); + UpdateRequestBuilder
updateAddresses( @Nonnull final Address address ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} + * entity in the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Address Address} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder
deleteAddresses( - @Nonnull - final Address address); + DeleteRequestBuilder
deleteAddresses( @Nonnull final Address address ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * request builder allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllShelves(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * request builder allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countShelves(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * using key fields. + * * @param id - *

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using + * key fields. This request builder allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getShelvesByKey(final Integer id); + GetByKeyRequestBuilder getShelvesByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and + * save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createShelves( - @Nonnull - final Shelf shelf); + CreateRequestBuilder createShelves( @Nonnull final Shelf shelf ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateShelves( - @Nonnull - final Shelf shelf); + UpdateRequestBuilder updateShelves( @Nonnull final Shelf shelf ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteShelves( - @Nonnull - final Shelf shelf); + DeleteRequestBuilder deleteShelves( @Nonnull final Shelf shelf ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * request builder allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllShopFloorShelves(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * request builder allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countShopFloorShelves(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * using key fields. + * * @param id - *

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using + * key fields. This request builder allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getShopFloorShelvesByKey(final Integer id); + GetByKeyRequestBuilder getShopFloorShelvesByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and + * save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createShopFloorShelves( - @Nonnull - final Shelf shelf); + CreateRequestBuilder createShopFloorShelves( @Nonnull final Shelf shelf ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateShopFloorShelves( - @Nonnull - final Shelf shelf); + UpdateRequestBuilder updateShopFloorShelves( @Nonnull final Shelf shelf ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteShopFloorShelves( - @Nonnull - final Shelf shelf); + DeleteRequestBuilder deleteShopFloorShelves( @Nonnull final Shelf shelf ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * request builder allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllStorageShelves(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity collection + * matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * request builder allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countStorageShelves(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * using key fields. + * * @param id - *

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using + * key fields. This request builder allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getStorageShelvesByKey(final Integer id); + GetByKeyRequestBuilder getStorageShelvesByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and + * save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createStorageShelves( - @Nonnull - final Shelf shelf); + CreateRequestBuilder createStorageShelves( @Nonnull final Shelf shelf ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateStorageShelves( - @Nonnull - final Shelf shelf); + UpdateRequestBuilder updateStorageShelves( @Nonnull final Shelf shelf ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteStorageShelves( - @Nonnull - final Shelf shelf); + DeleteRequestBuilder deleteStorageShelves( @Nonnull final Shelf shelf ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. - * - * @return - * A request builder to fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute execute} method on the request builder object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entities. + * + * @return A request builder to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entities. This request builder allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetAllRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull GetAllRequestBuilder getAllOpeningHours(); /** - * Fetch the number of entries from the {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity collection matching the filter and search expressions. - * - * @return - * A request builder to fetch the count of {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute execute} method on the request builder object. + * Fetch the number of entries from the + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity + * collection matching the filter and search expressions. + * + * @return A request builder to fetch the count of + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entities. This request builder allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CountRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull CountRequestBuilder countOpeningHours(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity using key fields. + * * @param id - *

Constraints: Not nullable

- * @return - * A request builder to fetch a single {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. This request builder allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute execute} method on the request builder object. + *

+ * Constraints: Not nullable + *

+ * @return A request builder to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity using key fields. This request builder allows methods which modify the underlying query to be + * called before executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.GetByKeyRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - GetByKeyRequestBuilder getOpeningHoursByKey(final Integer id); + GetByKeyRequestBuilder getOpeningHoursByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be created in the S/4HANA system. - * @return - * A request builder to create a new {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity object that will be created in the S/4HANA system. + * @return A request builder to create a new + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.CreateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - CreateRequestBuilder createOpeningHours( - @Nonnull - final OpeningHours openingHours); + CreateRequestBuilder createOpeningHours( @Nonnull final OpeningHours openingHours ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. - * @return - * A request builder to update an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity object that will be updated in the S/4HANA system. + * @return A request builder to update an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.UpdateRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - UpdateRequestBuilder updateOpeningHours( - @Nonnull - final OpeningHours openingHours); + UpdateRequestBuilder updateOpeningHours( @Nonnull final OpeningHours openingHours ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity in the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be deleted in the S/4HANA system. - * @return - * A request builder to delete an existing {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute execute} method on the request builder object. + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity object that will be deleted in the S/4HANA system. + * @return A request builder to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odatav4.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odatav4.core.DeleteRequestBuilder#execute + * execute} method on the request builder object. */ @Nonnull - DeleteRequestBuilder deleteOpeningHours( - @Nonnull - final OpeningHours openingHours); + DeleteRequestBuilder deleteOpeningHours( @Nonnull final OpeningHours openingHours ); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java index c2e3baab4..60b72c0af 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Address.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -18,6 +20,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,275 +28,310 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Address

- * + *

+ * Original entity name from the Odata EDM: Address + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class Address - extends VdmEntity
+@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class Address extends VdmEntity
{ /** * Selector for all available fields of Address. - * + * */ public final static AddressSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static AddressField ID = new AddressField("Id"); /** - * Constraints: none

Original property name from the Odata EDM: Street

- * - * @return - * The street contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: Street + *

+ * + * @return The street contained in this entity. */ - @SerializedName("Street") - @JsonProperty("Street") + @SerializedName( "Street" ) + @JsonProperty( "Street" ) @Nullable - @ODataField(odataName = "Street") + @ODataField( odataName = "Street" ) private String street; /** * Use with available fluent helpers to apply the Street field to query operations. - * + * */ public final static AddressField STREET = new AddressField("Street"); /** - * Constraints: none

Original property name from the Odata EDM: City

- * - * @return - * The city contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: City + *

+ * + * @return The city contained in this entity. */ - @SerializedName("City") - @JsonProperty("City") + @SerializedName( "City" ) + @JsonProperty( "City" ) @Nullable - @ODataField(odataName = "City") + @ODataField( odataName = "City" ) private String city; /** * Use with available fluent helpers to apply the City field to query operations. - * + * */ public final static AddressField CITY = new AddressField("City"); /** - * Constraints: none

Original property name from the Odata EDM: State

- * - * @return - * The state contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: State + *

+ * + * @return The state contained in this entity. */ - @SerializedName("State") - @JsonProperty("State") + @SerializedName( "State" ) + @JsonProperty( "State" ) @Nullable - @ODataField(odataName = "State") + @ODataField( odataName = "State" ) private String state; /** * Use with available fluent helpers to apply the State field to query operations. - * + * */ public final static AddressField STATE = new AddressField("State"); /** - * Constraints: none

Original property name from the Odata EDM: Country

- * - * @return - * The country contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: Country + *

+ * + * @return The country contained in this entity. */ - @SerializedName("Country") - @JsonProperty("Country") + @SerializedName( "Country" ) + @JsonProperty( "Country" ) @Nullable - @ODataField(odataName = "Country") + @ODataField( odataName = "Country" ) private String country; /** * Use with available fluent helpers to apply the Country field to query operations. - * + * */ public final static AddressField COUNTRY = new AddressField("Country"); /** - * Constraints: none

Original property name from the Odata EDM: PostalCode

- * - * @return - * The postalCode contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: PostalCode + *

+ * + * @return The postalCode contained in this entity. */ - @SerializedName("PostalCode") - @JsonProperty("PostalCode") + @SerializedName( "PostalCode" ) + @JsonProperty( "PostalCode" ) @Nullable - @ODataField(odataName = "PostalCode") + @ODataField( odataName = "PostalCode" ) private String postalCode; /** * Use with available fluent helpers to apply the PostalCode field to query operations. - * + * */ public final static AddressField POSTAL_CODE = new AddressField("PostalCode"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

- * - * @return - * The latitude contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Latitude + *

+ * + * @return The latitude contained in this entity. */ - @SerializedName("Latitude") - @JsonProperty("Latitude") + @SerializedName( "Latitude" ) + @JsonProperty( "Latitude" ) @Nullable - @ODataField(odataName = "Latitude") + @ODataField( odataName = "Latitude" ) private Double latitude; /** * Use with available fluent helpers to apply the Latitude field to query operations. - * + * */ public final static AddressField LATITUDE = new AddressField("Latitude"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

- * - * @return - * The longitude contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Longitude + *

+ * + * @return The longitude contained in this entity. */ - @SerializedName("Longitude") - @JsonProperty("Longitude") + @SerializedName( "Longitude" ) + @JsonProperty( "Longitude" ) @Nullable - @ODataField(odataName = "Longitude") + @ODataField( odataName = "Longitude" ) private Double longitude; /** * Use with available fluent helpers to apply the Longitude field to query operations. - * + * */ public final static AddressField LONGITUDE = new AddressField("Longitude"); @Nonnull @Override - public Class
getType() { + public Class
getType() + { return Address.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: none

Original property name from the Odata EDM: Street

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: Street + *

+ * * @param street - * The street to set. + * The street to set. */ - public void setStreet( - @Nullable - final String street) { + public void setStreet( @Nullable final String street ) + { rememberChangedField("Street", this.street); this.street = street; } /** - * Constraints: none

Original property name from the Odata EDM: City

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: City + *

+ * * @param city - * The city to set. + * The city to set. */ - public void setCity( - @Nullable - final String city) { + public void setCity( @Nullable final String city ) + { rememberChangedField("City", this.city); this.city = city; } /** - * Constraints: none

Original property name from the Odata EDM: State

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: State + *

+ * * @param state - * The state to set. + * The state to set. */ - public void setState( - @Nullable - final String state) { + public void setState( @Nullable final String state ) + { rememberChangedField("State", this.state); this.state = state; } /** - * Constraints: none

Original property name from the Odata EDM: Country

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: Country + *

+ * * @param country - * The country to set. + * The country to set. */ - public void setCountry( - @Nullable - final String country) { + public void setCountry( @Nullable final String country ) + { rememberChangedField("Country", this.country); this.country = country; } /** - * Constraints: none

Original property name from the Odata EDM: PostalCode

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: PostalCode + *

+ * * @param postalCode - * The postalCode to set. + * The postalCode to set. */ - public void setPostalCode( - @Nullable - final String postalCode) { + public void setPostalCode( @Nullable final String postalCode ) + { rememberChangedField("PostalCode", this.postalCode); this.postalCode = postalCode; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Latitude

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Latitude + *

+ * * @param latitude - * The latitude to set. + * The latitude to set. */ - public void setLatitude( - @Nullable - final Double latitude) { + public void setLatitude( @Nullable final Double latitude ) + { rememberChangedField("Latitude", this.latitude); this.latitude = latitude; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Longitude

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Longitude + *

+ * * @param longitude - * The longitude to set. + * The longitude to set. */ - public void setLongitude( - @Nullable - final Double longitude) { + public void setLongitude( @Nullable final Double longitude ) + { rememberChangedField("Longitude", this.longitude); this.longitude = longitude; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Addresses"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -301,7 +339,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Street", getStreet()); @@ -315,55 +354,56 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("Street")) { + if( cloudSdkValues.containsKey("Street") ) { final Object value = cloudSdkValues.remove("Street"); - if ((value == null)||(!value.equals(getStreet()))) { + if( (value == null) || (!value.equals(getStreet())) ) { setStreet(((String) value)); } } - if (cloudSdkValues.containsKey("City")) { + if( cloudSdkValues.containsKey("City") ) { final Object value = cloudSdkValues.remove("City"); - if ((value == null)||(!value.equals(getCity()))) { + if( (value == null) || (!value.equals(getCity())) ) { setCity(((String) value)); } } - if (cloudSdkValues.containsKey("State")) { + if( cloudSdkValues.containsKey("State") ) { final Object value = cloudSdkValues.remove("State"); - if ((value == null)||(!value.equals(getState()))) { + if( (value == null) || (!value.equals(getState())) ) { setState(((String) value)); } } - if (cloudSdkValues.containsKey("Country")) { + if( cloudSdkValues.containsKey("Country") ) { final Object value = cloudSdkValues.remove("Country"); - if ((value == null)||(!value.equals(getCountry()))) { + if( (value == null) || (!value.equals(getCountry())) ) { setCountry(((String) value)); } } - if (cloudSdkValues.containsKey("PostalCode")) { + if( cloudSdkValues.containsKey("PostalCode") ) { final Object value = cloudSdkValues.remove("PostalCode"); - if ((value == null)||(!value.equals(getPostalCode()))) { + if( (value == null) || (!value.equals(getPostalCode())) ) { setPostalCode(((String) value)); } } - if (cloudSdkValues.containsKey("Latitude")) { + if( cloudSdkValues.containsKey("Latitude") ) { final Object value = cloudSdkValues.remove("Latitude"); - if ((value == null)||(!value.equals(getLatitude()))) { + if( (value == null) || (!value.equals(getLatitude())) ) { setLatitude(((Double) value)); } } - if (cloudSdkValues.containsKey("Longitude")) { + if( cloudSdkValues.containsKey("Longitude") ) { final Object value = cloudSdkValues.remove("Longitude"); - if ((value == null)||(!value.equals(getLongitude()))) { + if( (value == null) || (!value.equals(getLongitude())) ) { setLongitude(((Double) value)); } } @@ -379,72 +419,64 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticAddressField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static AddressField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new AddressField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticAddressField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static AddressField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new AddressField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java index fa6787d6d..195ccd485 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressByKeyFluentHelper.java @@ -5,50 +5,57 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address + * Address} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ -public class AddressByKeyFluentHelper - extends FluentHelperByKey +public class AddressByKeyFluentHelper extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity with the + * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the + * fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Address} + * Entity Collection to be used to fetch a single {@code Address} * @param servicePath - * Service path to be used to fetch a single {@code Address} + * Service path to be used to fetch a single {@code Address} * @param id - * + * */ public AddressByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class
getEntityClass() { + protected Class
getEntityClass() + { return Address.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java index 8f2477261..9937d2d8e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressCreateFluentHelper.java @@ -5,48 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system.

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address + * Address} entity and save it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class AddressCreateFluentHelper - extends FluentHelperCreate +public class AddressCreateFluentHelper extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that + * will be created in the S/4HANA system. + * */ private final Address entity; /** - * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will create a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Address to create. + * The Address to create. */ public AddressCreateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Address entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Address entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Address getEntity() { + protected Address getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java index 748d18502..f1c8c725c 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressDeleteFluentHelper.java @@ -5,48 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperDelete; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperDelete; /** - * Fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system.

+ * Fluent helper to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA + * system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class AddressDeleteFluentHelper - extends FluentHelperDelete +public class AddressDeleteFluentHelper extends FluentHelperDelete { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that + * will be deleted in the S/4HANA system. + * */ private final Address entity; /** - * Creates a fluent helper object that will delete a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will delete a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * The entity collection to direct the update requests to. + * The entity collection to direct the update requests to. * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Address to delete from the endpoint. + * The Address to delete from the endpoint. */ public AddressDeleteFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Address entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Address entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Address getEntity() { + protected Address getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java index 9727f1c9e..83ed3e68b 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address + * Address} entities. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. + * */ -public class AddressFluentHelper - extends FluentHelperRead +public class AddressFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public AddressFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public AddressFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class

getEntityClass() { + protected Class
getEntityClass() + { return Address.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java index 96a168607..1f160000e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/AddressUpdateFluentHelper.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; /** - * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system.

+ * Fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the + * S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class AddressUpdateFluentHelper - extends FluentHelperUpdate +public class AddressUpdateFluentHelper extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that + * will be updated in the S/4HANA system. + * */ private final Address entity; /** - * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will update a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Address to take the updated values from. + * The Address to take the updated values from. */ public AddressUpdateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Address entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Address entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Address getEntity() { + protected Address getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java index b5730c242..1e31dff53 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Customer.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -20,6 +22,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -31,175 +34,221 @@ import lombok.Setter; import lombok.ToString; - /** - * OData entity representation of Customer

Original entity name from the Odata EDM: Customer

- * + * OData entity representation of Customer + *

+ *

+ *

+ * Original entity name from the Odata EDM: Customer + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class Customer - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class Customer extends VdmEntity { /** * Selector for all available fields of Customer. - * + * */ public final static CustomerSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

With this numeric identifier it's possible to resolve and manipulate customer information

- * - * @return - * Customer identifier used as entity key value. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ *

+ * With this numeric identifier it's possible to resolve and manipulate customer information + *

+ * + * @return Customer identifier used as entity key value. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static CustomerField ID = new CustomerField("Id"); /** - * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

The mandatory field may contain different combinations of first- and last-name.

- * - * @return - * Customer name. + * Constraints: Not nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ *

+ * The mandatory field may contain different combinations of first- and last-name. + *

+ * + * @return Customer name. */ - @SerializedName("Name") - @JsonProperty("Name") + @SerializedName( "Name" ) + @JsonProperty( "Name" ) @Nullable - @ODataField(odataName = "Name") + @ODataField( odataName = "Name" ) private String name; /** * Use with available fluent helpers to apply the Name field to query operations. - * + * */ public final static CustomerField NAME = new CustomerField("Name"); /** - * Constraints: none

Original property name from the Odata EDM: Email

The optional field for customer email address is checked server-side for validity.

- * - * @return - * Customer email address. + * Constraints: none + *

+ * Original property name from the Odata EDM: Email + *

+ *

+ * The optional field for customer email address is checked server-side for validity. + *

+ * + * @return Customer email address. */ - @SerializedName("Email") - @JsonProperty("Email") + @SerializedName( "Email" ) + @JsonProperty( "Email" ) @Nullable - @ODataField(odataName = "Email") + @ODataField( odataName = "Email" ) private String email; /** * Use with available fluent helpers to apply the Email field to query operations. - * + * */ public final static CustomerField EMAIL = new CustomerField("Email"); /** - * Constraints: Nullable

Original property name from the Odata EDM: AddressId

The optional field can be used to resolve the current customer address id.

- * - * @return - * Customer address identifier. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ *

+ * The optional field can be used to resolve the current customer address id. + *

+ * + * @return Customer address identifier. */ - @SerializedName("AddressId") - @JsonProperty("AddressId") + @SerializedName( "AddressId" ) + @JsonProperty( "AddressId" ) @Nullable - @ODataField(odataName = "AddressId") + @ODataField( odataName = "AddressId" ) private Integer addressId; /** * Use with available fluent helpers to apply the AddressId field to query operations. - * + * */ public final static CustomerField ADDRESS_ID = new CustomerField("AddressId"); /** * Navigation property Address for Customer to single Address. - * + * */ - @SerializedName("Address") - @JsonProperty("Address") - @ODataField(odataName = "Address") + @SerializedName( "Address" ) + @JsonProperty( "Address" ) + @ODataField( odataName = "Address" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Address toAddress; /** * Use with available fluent helpers to apply the Address navigation property to query operations. - * + * */ public final static CustomerOneToOneLink
TO_ADDRESS = new CustomerOneToOneLink
("Address"); @Nonnull @Override - public Class getType() { + public Class getType() + { return Customer.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

With this numeric identifier it's possible to resolve and manipulate customer information

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ *

+ * With this numeric identifier it's possible to resolve and manipulate customer information + *

+ * * @param id - * Customer identifier used as entity key value. + * Customer identifier used as entity key value. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

The mandatory field may contain different combinations of first- and last-name.

- * + * Constraints: Not nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ *

+ * The mandatory field may contain different combinations of first- and last-name. + *

+ * * @param name - * Customer name. + * Customer name. */ - public void setName( - @Nullable - final String name) { + public void setName( @Nullable final String name ) + { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: none

Original property name from the Odata EDM: Email

The optional field for customer email address is checked server-side for validity.

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: Email + *

+ *

+ * The optional field for customer email address is checked server-side for validity. + *

+ * * @param email - * Customer email address. + * Customer email address. */ - public void setEmail( - @Nullable - final String email) { + public void setEmail( @Nullable final String email ) + { rememberChangedField("Email", this.email); this.email = email; } /** - * Constraints: Nullable

Original property name from the Odata EDM: AddressId

The optional field can be used to resolve the current customer address id.

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ *

+ * The optional field can be used to resolve the current customer address id. + *

+ * * @param addressId - * Customer address identifier. + * Customer address identifier. */ - public void setAddressId( - @Nullable - final Integer addressId) { + public void setAddressId( @Nullable final Integer addressId ) + { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Customers"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -207,7 +256,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -217,31 +267,32 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("Name")) { + if( cloudSdkValues.containsKey("Name") ) { final Object value = cloudSdkValues.remove("Name"); - if ((value == null)||(!value.equals(getName()))) { + if( (value == null) || (!value.equals(getName())) ) { setName(((String) value)); } } - if (cloudSdkValues.containsKey("Email")) { + if( cloudSdkValues.containsKey("Email") ) { final Object value = cloudSdkValues.remove("Email"); - if ((value == null)||(!value.equals(getEmail()))) { + if( (value == null) || (!value.equals(getEmail())) ) { setEmail(((String) value)); } } - if (cloudSdkValues.containsKey("AddressId")) { + if( cloudSdkValues.containsKey("AddressId") ) { final Object value = cloudSdkValues.remove("AddressId"); - if ((value == null)||(!value.equals(getAddressId()))) { + if( (value == null) || (!value.equals(getAddressId())) ) { setAddressId(((Integer) value)); } } @@ -251,14 +302,14 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("Address")) { + if( (cloudSdkValues).containsKey("Address") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if (cloudSdkValue instanceof Map) { - if (toAddress == null) { + if( cloudSdkValue instanceof Map ) { + if( toAddress == null ) { toAddress = new Address(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -268,167 +319,177 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticCustomerField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static CustomerField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new CustomerField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticCustomerField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static CustomerField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new CustomerField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toAddress!= null) { + if( toAddress != null ) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData navigation property Address. + * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData + * navigation property Address. *

* Please note: This method will not cache or persist the query results. - * - * @return - * The single associated Address entity, or {@code null} if an entity is not associated. + * + * @return The single associated Address entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Address fetchAddress() { + public Address fetchAddress() + { return fetchFieldAsSingle("Address", Address.class); } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property + * Address. *

- * If the navigation property Address of a queried Customer is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Address of a queried Customer is operated lazily, an + * ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated Address entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated Address entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Address getAddressOrFetch() { - if (toAddress == null) { + public Address getAddressOrFetch() + { + if( toAddress == null ) { toAddress = fetchAddress(); } return toAddress; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property + * Address. *

- * If the navigation property for an entity Customer has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Customer has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Address is already loaded, the result will contain the + * Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() { + public Option
getAddressIfPresent() + { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress(final Address cloudSdkValue) { + public void setAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; } - /** * Helper class to allow for fluent creation of Customer instances. - * + * */ - public final static class CustomerBuilder { + public final static class CustomerBuilder + { private Address toAddress; - private Customer.CustomerBuilder toAddress(final Address cloudSdkValue) { + private Customer.CustomerBuilder toAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Customer to single Address. - * + * * @param cloudSdkValue - * The Address to build this Customer with. - * @return - * This Builder to allow for a fluent interface. + * The Address to build this Customer with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Customer.CustomerBuilder address(final Address cloudSdkValue) { + public Customer.CustomerBuilder address( final Address cloudSdkValue ) + { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java index 5e54f95e9..6b87f1f79 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerByKeyFluentHelper.java @@ -5,50 +5,62 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer + * Customer} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ public class CustomerByKeyFluentHelper - extends FluentHelperByKey + extends + FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity with the + * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the + * fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Customer} + * Entity Collection to be used to fetch a single {@code Customer} * @param servicePath - * Service path to be used to fetch a single {@code Customer} + * Service path to be used to fetch a single {@code Customer} * @param id - * Customer identifier used as entity key value.

Constraints: Not nullable

+ * Customer identifier used as entity key value. + *

+ * Constraints: Not nullable + *

*/ public CustomerByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Customer.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java index ca9e59355..debe16ca1 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerCreateFluentHelper.java @@ -5,48 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system.

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer + * Customer} entity and save it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class CustomerCreateFluentHelper - extends FluentHelperCreate +public class CustomerCreateFluentHelper extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that + * will be created in the S/4HANA system. + * */ private final Customer entity; /** - * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will create a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Customer to create. + * The Customer to create. */ public CustomerCreateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Customer entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Customer entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Customer getEntity() { + protected Customer getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java index 36039dcaf..21b0e75f5 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/CustomerFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer + * Customer} entities. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. + * */ -public class CustomerFluentHelper - extends FluentHelperRead +public class CustomerFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public CustomerFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public CustomerFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Customer.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java index bbc518033..7d326f3cd 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlan.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -18,6 +20,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -25,101 +28,112 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: FloorPlan

- * + *

+ * Original entity name from the Odata EDM: FloorPlan + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class FloorPlan - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class FloorPlan extends VdmEntity { /** * Selector for all available fields of FloorPlan. - * + * */ public final static FloorPlanSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static FloorPlanField ID = new FloorPlanField("Id"); /** - * Constraints: none

Original property name from the Odata EDM: ImageUri

- * - * @return - * The imageUri contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: ImageUri + *

+ * + * @return The imageUri contained in this entity. */ - @SerializedName("ImageUri") - @JsonProperty("ImageUri") + @SerializedName( "ImageUri" ) + @JsonProperty( "ImageUri" ) @Nullable - @ODataField(odataName = "ImageUri") + @ODataField( odataName = "ImageUri" ) private String imageUri; /** * Use with available fluent helpers to apply the ImageUri field to query operations. - * + * */ public final static FloorPlanField IMAGE_URI = new FloorPlanField("ImageUri"); @Nonnull @Override - public Class getType() { + public Class getType() + { return FloorPlan.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: none

Original property name from the Odata EDM: ImageUri

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: ImageUri + *

+ * * @param imageUri - * The imageUri to set. + * The imageUri to set. */ - public void setImageUri( - @Nullable - final String imageUri) { + public void setImageUri( @Nullable final String imageUri ) + { rememberChangedField("ImageUri", this.imageUri); this.imageUri = imageUri; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Floors"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -127,7 +141,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("ImageUri", getImageUri()); @@ -135,19 +150,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("ImageUri")) { + if( cloudSdkValues.containsKey("ImageUri") ) { final Object value = cloudSdkValues.remove("ImageUri"); - if ((value == null)||(!value.equals(getImageUri()))) { + if( (value == null) || (!value.equals(getImageUri())) ) { setImageUri(((String) value)); } } @@ -163,72 +179,64 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticFloorPlanField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static FloorPlanField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new FloorPlanField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticFloorPlanField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static FloorPlanField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new FloorPlanField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java index f56c9316f..6d51568ff 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanByKeyFluentHelper.java @@ -5,50 +5,59 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan + * FloorPlan} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ public class FloorPlanByKeyFluentHelper - extends FluentHelperByKey + extends + FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity with the + * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the + * fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code FloorPlan} + * Entity Collection to be used to fetch a single {@code FloorPlan} * @param servicePath - * Service path to be used to fetch a single {@code FloorPlan} + * Service path to be used to fetch a single {@code FloorPlan} * @param id - * + * */ public FloorPlanByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return FloorPlan.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java index 4d420c992..5fd5ab1d9 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/FloorPlanFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan + * FloorPlan} entities. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. + * */ -public class FloorPlanFluentHelper - extends FluentHelperRead +public class FloorPlanFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public FloorPlanFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public FloorPlanFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return FloorPlan.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java index d5a007816..045980517 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/GetProductQuantitiesFluentHelper.java @@ -7,44 +7,53 @@ import java.net.URI; import java.util.List; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpUriRequest; + import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.CollectionValuedFluentHelperFunction; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpUriRequest; - /** * Fluent helper for the GetProductQuantities OData function import. - * + * */ public class GetProductQuantitiesFluentHelper - extends CollectionValuedFluentHelperFunction> + extends + CollectionValuedFluentHelperFunction> { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the GetProductQuantities OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will execute the GetProductQuantities OData function import with the + * provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent + * helper object. + * * @param shelfId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ShelfId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ShelfId + *

* @param productId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ProductId + *

* @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. */ public GetProductQuantitiesFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Integer shelfId, - @Nonnull - final Integer productId) { + @Nonnull final String servicePath, + @Nonnull final Integer shelfId, + @Nonnull final Integer productId ) + { super(servicePath); values.put("ShelfId", shelfId); values.put("ProductId", productId); @@ -52,22 +61,23 @@ public GetProductQuantitiesFluentHelper( @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return ProductCount.class; } @Override @Nonnull - protected String getFunctionName() { + protected String getFunctionName() + { return "GetProductQuantities"; } @Override @Nullable - protected JsonElement refineJsonResponse( - @Nullable - JsonElement jsonElement) { - if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { + protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) + { + if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -75,27 +85,26 @@ protected JsonElement refineJsonResponse( @Override @Nonnull - protected Map getParameters() { + protected Map getParameters() + { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( - @Nonnull - final URI uri) { + protected HttpUriRequest createRequest( @Nonnull final URI uri ) + { return new HttpGet(uri); } /** * Execute this function import. - * + * */ @Override @Nonnull - public List executeRequest( - @Nonnull - final Destination destination) { + public List executeRequest( @Nonnull final Destination destination ) + { return super.executeMultiple(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java index efdae6bd8..28a218734 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/IsStoreOpenFluentHelper.java @@ -7,62 +7,66 @@ import java.net.URI; import java.time.LocalDateTime; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpUriRequest; + import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpUriRequest; - /** * Fluent helper for the IsStoreOpen OData function import. - * + * */ -public class IsStoreOpenFluentHelper - extends SingleValuedFluentHelperFunction +public class IsStoreOpenFluentHelper extends SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the IsStoreOpen OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will execute the IsStoreOpen OData function import with the provided + * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param dateTime - * Constraints: Not nullable

Original parameter name from the Odata EDM: DateTime

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: DateTime + *

* @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. */ - public IsStoreOpenFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final LocalDateTime dateTime) { + public IsStoreOpenFluentHelper( @Nonnull final String servicePath, @Nonnull final LocalDateTime dateTime ) + { super(servicePath); values.put("DateTime", dateTime); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Boolean.class; } @Override @Nonnull - protected String getFunctionName() { + protected String getFunctionName() + { return "IsStoreOpen"; } @Override @Nullable - protected JsonElement refineJsonResponse( - @Nullable - JsonElement jsonElement) { - if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { + protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) + { + if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -70,27 +74,26 @@ protected JsonElement refineJsonResponse( @Override @Nonnull - protected Map getParameters() { + protected Map getParameters() + { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( - @Nonnull - final URI uri) { + protected HttpUriRequest createRequest( @Nonnull final URI uri ) + { return new HttpGet(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public Boolean executeRequest( - @Nonnull - final Destination destination) { + public Boolean executeRequest( @Nonnull final Destination destination ) + { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java index b9392e61a..b32b52bf0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHours.java @@ -6,8 +6,10 @@ import java.time.LocalTime; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -21,6 +23,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -28,165 +31,188 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: OpeningHours

- * + *

+ * Original entity name from the Odata EDM: OpeningHours + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class OpeningHours - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class OpeningHours extends VdmEntity { /** * Selector for all available fields of OpeningHours. - * + * */ public final static OpeningHoursSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static OpeningHoursField ID = new OpeningHoursField("Id"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

- * - * @return - * The dayOfWeek contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: DayOfWeek + *

+ * + * @return The dayOfWeek contained in this entity. */ - @SerializedName("DayOfWeek") - @JsonProperty("DayOfWeek") + @SerializedName( "DayOfWeek" ) + @JsonProperty( "DayOfWeek" ) @Nullable - @ODataField(odataName = "DayOfWeek") + @ODataField( odataName = "DayOfWeek" ) private Integer dayOfWeek; /** * Use with available fluent helpers to apply the DayOfWeek field to query operations. - * + * */ public final static OpeningHoursField DAY_OF_WEEK = new OpeningHoursField("DayOfWeek"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

- * - * @return - * The openTime contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: OpenTime + *

+ * + * @return The openTime contained in this entity. */ - @SerializedName("OpenTime") - @JsonProperty("OpenTime") + @SerializedName( "OpenTime" ) + @JsonProperty( "OpenTime" ) @Nullable - @JsonSerialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class) - @JsonDeserialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class) - @JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class) - @ODataField(odataName = "OpenTime", converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class) + @JsonSerialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class ) + @JsonDeserialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class ) + @JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class ) + @ODataField( + odataName = "OpenTime", + converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class ) private LocalTime openTime; /** * Use with available fluent helpers to apply the OpenTime field to query operations. - * + * */ public final static OpeningHoursField OPEN_TIME = new OpeningHoursField("OpenTime"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

- * - * @return - * The closeTime contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CloseTime + *

+ * + * @return The closeTime contained in this entity. */ - @SerializedName("CloseTime") - @JsonProperty("CloseTime") + @SerializedName( "CloseTime" ) + @JsonProperty( "CloseTime" ) @Nullable - @JsonSerialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class) - @JsonDeserialize(using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class) - @JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class) - @ODataField(odataName = "CloseTime", converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class) + @JsonSerialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeSerializer.class ) + @JsonDeserialize( using = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.JacksonLocalTimeDeserializer.class ) + @JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeAdapter.class ) + @ODataField( + odataName = "CloseTime", + converter = com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter.class ) private LocalTime closeTime; /** * Use with available fluent helpers to apply the CloseTime field to query operations. - * + * */ public final static OpeningHoursField CLOSE_TIME = new OpeningHoursField("CloseTime"); @Nonnull @Override - public Class getType() { + public Class getType() + { return OpeningHours.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: DayOfWeek

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: DayOfWeek + *

+ * * @param dayOfWeek - * The dayOfWeek to set. + * The dayOfWeek to set. */ - public void setDayOfWeek( - @Nullable - final Integer dayOfWeek) { + public void setDayOfWeek( @Nullable final Integer dayOfWeek ) + { rememberChangedField("DayOfWeek", this.dayOfWeek); this.dayOfWeek = dayOfWeek; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: OpenTime

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: OpenTime + *

+ * * @param openTime - * The openTime to set. + * The openTime to set. */ - public void setOpenTime( - @Nullable - final LocalTime openTime) { + public void setOpenTime( @Nullable final LocalTime openTime ) + { rememberChangedField("OpenTime", this.openTime); this.openTime = openTime; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: CloseTime

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CloseTime + *

+ * * @param closeTime - * The closeTime to set. + * The closeTime to set. */ - public void setCloseTime( - @Nullable - final LocalTime closeTime) { + public void setCloseTime( @Nullable final LocalTime closeTime ) + { rememberChangedField("CloseTime", this.closeTime); this.closeTime = closeTime; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "OpeningHours"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -194,7 +220,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("DayOfWeek", getDayOfWeek()); @@ -204,31 +231,32 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("DayOfWeek")) { + if( cloudSdkValues.containsKey("DayOfWeek") ) { final Object value = cloudSdkValues.remove("DayOfWeek"); - if ((value == null)||(!value.equals(getDayOfWeek()))) { + if( (value == null) || (!value.equals(getDayOfWeek())) ) { setDayOfWeek(((Integer) value)); } } - if (cloudSdkValues.containsKey("OpenTime")) { + if( cloudSdkValues.containsKey("OpenTime") ) { final Object value = cloudSdkValues.remove("OpenTime"); - if ((value == null)||(!value.equals(getOpenTime()))) { + if( (value == null) || (!value.equals(getOpenTime())) ) { setOpenTime(((LocalTime) value)); } } - if (cloudSdkValues.containsKey("CloseTime")) { + if( cloudSdkValues.containsKey("CloseTime") ) { final Object value = cloudSdkValues.remove("CloseTime"); - if ((value == null)||(!value.equals(getCloseTime()))) { + if( (value == null) || (!value.equals(getCloseTime())) ) { setCloseTime(((LocalTime) value)); } } @@ -244,72 +272,64 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticOpeningHoursField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static OpeningHoursField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new OpeningHoursField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticOpeningHoursField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static OpeningHoursField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new OpeningHoursField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java index c188b98e9..c4325ee1b 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursByKeyFluentHelper.java @@ -5,50 +5,60 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using + * key fields. This fluent helper allows methods which modify the underlying query to be called before executing the + * query itself. + * */ public class OpeningHoursByKeyFluentHelper - extends FluentHelperByKey + extends + FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity with + * the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on + * the fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code OpeningHours} + * Entity Collection to be used to fetch a single {@code OpeningHours} * @param servicePath - * Service path to be used to fetch a single {@code OpeningHours} + * Service path to be used to fetch a single {@code OpeningHours} * @param id - * + * */ public OpeningHoursByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return OpeningHours.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java index 44d46cf1b..1b91e9757 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursFluentHelper.java @@ -5,38 +5,38 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This + * fluent helper allows methods which modify the underlying query to be called before executing the query itself. + * */ public class OpeningHoursFluentHelper - extends FluentHelperRead + extends + FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public OpeningHoursFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public OpeningHoursFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return OpeningHours.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java index 699aff397..f949c7935 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OpeningHoursUpdateFluentHelper.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; /** - * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system.

+ * Fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save + * it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class OpeningHoursUpdateFluentHelper - extends FluentHelperUpdate +public class OpeningHoursUpdateFluentHelper extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity + * object that will be updated in the S/4HANA system. + * */ private final OpeningHours entity; /** - * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will update a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity on + * the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent + * helper object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The OpeningHours to take the updated values from. + * The OpeningHours to take the updated values from. */ public OpeningHoursUpdateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final OpeningHours entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final OpeningHours entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected OpeningHours getEntity() { + protected OpeningHours getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java index a9473a740..bcd53d367 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/OrderProductFluentHelper.java @@ -6,48 +6,59 @@ import java.net.URI; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; + import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpUriRequest; - /** * Fluent helper for the OrderProduct OData function import. - * + * */ public class OrderProductFluentHelper - extends SingleValuedFluentHelperFunction + extends + SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the OrderProduct OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will execute the OrderProduct OData function import with the provided + * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param quantity - * Constraints: Not nullable

Original parameter name from the Odata EDM: Quantity

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: Quantity + *

* @param productId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ProductId + *

* @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. * @param customerId - * Constraints: Not nullable

Original parameter name from the Odata EDM: CustomerId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: CustomerId + *

*/ public OrderProductFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Integer customerId, - @Nonnull - final Integer productId, - @Nonnull - final Integer quantity) { + @Nonnull final String servicePath, + @Nonnull final Integer customerId, + @Nonnull final Integer productId, + @Nonnull final Integer quantity ) + { super(servicePath); values.put("CustomerId", customerId); values.put("ProductId", productId); @@ -56,22 +67,23 @@ public OrderProductFluentHelper( @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Receipt.class; } @Override @Nonnull - protected String getFunctionName() { + protected String getFunctionName() + { return "OrderProduct"; } @Override @Nullable - protected JsonElement refineJsonResponse( - @Nullable - JsonElement jsonElement) { - if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { + protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) + { + if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -79,27 +91,26 @@ protected JsonElement refineJsonResponse( @Override @Nonnull - protected Map getParameters() { + protected Map getParameters() + { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( - @Nonnull - final URI uri) { + protected HttpUriRequest createRequest( @Nonnull final URI uri ) + { return new HttpPost(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public Receipt executeRequest( - @Nonnull - final Destination destination) { + public Receipt executeRequest( @Nonnull final Destination destination ) + { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java index c0d832e76..3c34e2bf7 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/PrintReceiptFluentHelper.java @@ -6,62 +6,66 @@ import java.net.URI; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; + import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpUriRequest; - /** * Fluent helper for the PrintReceipt OData function import. - * + * */ -public class PrintReceiptFluentHelper - extends SingleValuedFluentHelperFunction +public class PrintReceiptFluentHelper extends SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the PrintReceipt OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will execute the PrintReceipt OData function import with the provided + * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. * @param receiptId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ReceiptId + *

*/ - public PrintReceiptFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Integer receiptId) { + public PrintReceiptFluentHelper( @Nonnull final String servicePath, @Nonnull final Integer receiptId ) + { super(servicePath); values.put("ReceiptId", receiptId); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return String.class; } @Override @Nonnull - protected String getFunctionName() { + protected String getFunctionName() + { return "PrintReceipt"; } @Override @Nullable - protected JsonElement refineJsonResponse( - @Nullable - JsonElement jsonElement) { - if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { + protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) + { + if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -69,27 +73,26 @@ protected JsonElement refineJsonResponse( @Override @Nonnull - protected Map getParameters() { + protected Map getParameters() + { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( - @Nonnull - final URI uri) { + protected HttpUriRequest createRequest( @Nonnull final URI uri ) + { return new HttpPost(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public String executeRequest( - @Nonnull - final Destination destination) { + public String executeRequest( @Nonnull final Destination destination ) + { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java index c02411d55..290154de0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Product.java @@ -7,8 +7,10 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -24,6 +26,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -35,249 +38,276 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Product

- * + *

+ * Original entity name from the Odata EDM: Product + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class Product - extends VdmMediaEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class Product extends VdmMediaEntity { /** * Selector for all available fields of Product. - * + * */ public final static ProductSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static ProductField ID = new ProductField("Id"); /** - * Constraints: none

Original property name from the Odata EDM: Name

- * - * @return - * The name contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: Name + *

+ * + * @return The name contained in this entity. */ - @SerializedName("Name") - @JsonProperty("Name") + @SerializedName( "Name" ) + @JsonProperty( "Name" ) @Nullable - @ODataField(odataName = "Name") + @ODataField( odataName = "Name" ) private String name; /** * Use with available fluent helpers to apply the Name field to query operations. - * + * */ public final static ProductField NAME = new ProductField("Name"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

- * - * @return - * The shelfId contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ShelfId + *

+ * + * @return The shelfId contained in this entity. */ - @SerializedName("ShelfId") - @JsonProperty("ShelfId") + @SerializedName( "ShelfId" ) + @JsonProperty( "ShelfId" ) @Nullable - @ODataField(odataName = "ShelfId") + @ODataField( odataName = "ShelfId" ) private Integer shelfId; /** * Use with available fluent helpers to apply the ShelfId field to query operations. - * + * */ public final static ProductField SHELF_ID = new ProductField("ShelfId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

- * - * @return - * The vendorId contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: VendorId + *

+ * + * @return The vendorId contained in this entity. */ - @SerializedName("VendorId") - @JsonProperty("VendorId") + @SerializedName( "VendorId" ) + @JsonProperty( "VendorId" ) @Nullable - @ODataField(odataName = "VendorId") + @ODataField( odataName = "VendorId" ) private Integer vendorId; /** * Use with available fluent helpers to apply the VendorId field to query operations. - * + * */ public final static ProductField VENDOR_ID = new ProductField("VendorId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: Price

- * - * @return - * The price contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Price + *

+ * + * @return The price contained in this entity. */ - @SerializedName("Price") - @JsonProperty("Price") + @SerializedName( "Price" ) + @JsonProperty( "Price" ) @Nullable - @ODataField(odataName = "Price") + @ODataField( odataName = "Price" ) private BigDecimal price; /** * Use with available fluent helpers to apply the Price field to query operations. - * + * */ public final static ProductField PRICE = new ProductField("Price"); /** - * Constraints: none

Original property name from the Odata EDM: Image

- * - * @return - * The image contained in this entity. + * Constraints: none + *

+ * Original property name from the Odata EDM: Image + *

+ * + * @return The image contained in this entity. */ - @SerializedName("Image") - @JsonProperty("Image") + @SerializedName( "Image" ) + @JsonProperty( "Image" ) @Nullable - @JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataBinaryAdapter.class) - @ODataField(odataName = "Image") + @JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataBinaryAdapter.class ) + @ODataField( odataName = "Image" ) private byte[] image; /** * Use with available fluent helpers to apply the Image field to query operations. - * + * */ public final static ProductField IMAGE = new ProductField("Image"); /** * Navigation property Vendor for Product to single Vendor. - * + * */ - @SerializedName("Vendor") - @JsonProperty("Vendor") - @ODataField(odataName = "Vendor") + @SerializedName( "Vendor" ) + @JsonProperty( "Vendor" ) + @ODataField( odataName = "Vendor" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Vendor toVendor; /** * Navigation property Shelf for Product to multiple Shelf. - * + * */ - @SerializedName("Shelf") - @JsonProperty("Shelf") - @ODataField(odataName = "Shelf") - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @SerializedName( "Shelf" ) + @JsonProperty( "Shelf" ) + @ODataField( odataName = "Shelf" ) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private List toShelf; /** * Use with available fluent helpers to apply the Vendor navigation property to query operations. - * + * */ public final static ProductOneToOneLink TO_VENDOR = new ProductOneToOneLink("Vendor"); /** * Use with available fluent helpers to apply the Shelf navigation property to query operations. - * + * */ public final static ProductLink TO_SHELF = new ProductLink("Shelf"); @Nonnull @Override - public Class getType() { + public Class getType() + { return Product.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: none

Original property name from the Odata EDM: Name

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: Name + *

+ * * @param name - * The name to set. + * The name to set. */ - public void setName( - @Nullable - final String name) { + public void setName( @Nullable final String name ) + { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ShelfId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ShelfId + *

+ * * @param shelfId - * The shelfId to set. + * The shelfId to set. */ - public void setShelfId( - @Nullable - final Integer shelfId) { + public void setShelfId( @Nullable final Integer shelfId ) + { rememberChangedField("ShelfId", this.shelfId); this.shelfId = shelfId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: VendorId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: VendorId + *

+ * * @param vendorId - * The vendorId to set. + * The vendorId to set. */ - public void setVendorId( - @Nullable - final Integer vendorId) { + public void setVendorId( @Nullable final Integer vendorId ) + { rememberChangedField("VendorId", this.vendorId); this.vendorId = vendorId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: Price

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Price + *

+ * * @param price - * The price to set. + * The price to set. */ - public void setPrice( - @Nullable - final BigDecimal price) { + public void setPrice( @Nullable final BigDecimal price ) + { rememberChangedField("Price", this.price); this.price = price; } /** - * Constraints: none

Original property name from the Odata EDM: Image

- * + * Constraints: none + *

+ * Original property name from the Odata EDM: Image + *

+ * * @param image - * The image to set. + * The image to set. */ - public void setImage( - @Nullable - final byte[] image) { + public void setImage( @Nullable final byte[] image ) + { rememberChangedField("Image", this.image); this.image = image; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Products"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -285,7 +315,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -297,43 +328,44 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("Name")) { + if( cloudSdkValues.containsKey("Name") ) { final Object value = cloudSdkValues.remove("Name"); - if ((value == null)||(!value.equals(getName()))) { + if( (value == null) || (!value.equals(getName())) ) { setName(((String) value)); } } - if (cloudSdkValues.containsKey("ShelfId")) { + if( cloudSdkValues.containsKey("ShelfId") ) { final Object value = cloudSdkValues.remove("ShelfId"); - if ((value == null)||(!value.equals(getShelfId()))) { + if( (value == null) || (!value.equals(getShelfId())) ) { setShelfId(((Integer) value)); } } - if (cloudSdkValues.containsKey("VendorId")) { + if( cloudSdkValues.containsKey("VendorId") ) { final Object value = cloudSdkValues.remove("VendorId"); - if ((value == null)||(!value.equals(getVendorId()))) { + if( (value == null) || (!value.equals(getVendorId())) ) { setVendorId(((Integer) value)); } } - if (cloudSdkValues.containsKey("Price")) { + if( cloudSdkValues.containsKey("Price") ) { final Object value = cloudSdkValues.remove("Price"); - if ((value == null)||(!value.equals(getPrice()))) { + if( (value == null) || (!value.equals(getPrice())) ) { setPrice(((BigDecimal) value)); } } - if (cloudSdkValues.containsKey("Image")) { + if( cloudSdkValues.containsKey("Image") ) { final Object value = cloudSdkValues.remove("Image"); - if ((value == null)||(!value.equals(getImage()))) { + if( (value == null) || (!value.equals(getImage())) ) { setImage(((byte[]) value)); } } @@ -343,40 +375,40 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("Vendor")) { + if( (cloudSdkValues).containsKey("Vendor") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Vendor"); - if (cloudSdkValue instanceof Map) { - if (toVendor == null) { + if( cloudSdkValue instanceof Map ) { + if( toVendor == null ) { toVendor = new Vendor(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toVendor.fromMap(inputMap); } } - if ((cloudSdkValues).containsKey("Shelf")) { + if( (cloudSdkValues).containsKey("Shelf") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Shelf"); - if (cloudSdkValue instanceof Iterable) { - if (toShelf == null) { + if( cloudSdkValue instanceof Iterable ) { + if( toShelf == null ) { toShelf = Lists.newArrayList(); } else { toShelf = Lists.newArrayList(toShelf); } int i = 0; - for (Object item: ((Iterable ) cloudSdkValue)) { - if (!(item instanceof Map)) { + for( Object item : ((Iterable) cloudSdkValue) ) { + if( !(item instanceof Map) ) { continue; } Shelf entity; - if (toShelf.size()>i) { + if( toShelf.size() > i ) { entity = toShelf.get(i); } else { entity = new Shelf(); toShelf.add(entity); } i = (i + 1); - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) item); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) item); entity.fromMap(inputMap); } } @@ -387,208 +419,236 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticProductField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static ProductField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new ProductField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticProductField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static ProductField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new ProductField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toVendor!= null) { + if( toVendor != null ) { (cloudSdkValues).put("Vendor", toVendor); } - if (toShelf!= null) { + if( toShelf != null ) { (cloudSdkValues).put("Shelf", toShelf); } return cloudSdkValues; } /** - * Fetches the Vendor entity (one to one) associated with this entity. This corresponds to the OData navigation property Vendor. + * Fetches the Vendor entity (one to one) associated with this entity. This corresponds to the OData + * navigation property Vendor. *

* Please note: This method will not cache or persist the query results. - * - * @return - * The single associated Vendor entity, or {@code null} if an entity is not associated. + * + * @return The single associated Vendor entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Vendor fetchVendor() { + public Vendor fetchVendor() + { return fetchFieldAsSingle("Vendor", Vendor.class); } /** - * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property Vendor. + * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property + * Vendor. *

- * If the navigation property Vendor of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Vendor of a queried Product is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated Vendor entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated Vendor entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Vendor getVendorOrFetch() { - if (toVendor == null) { + public Vendor getVendorOrFetch() + { + if( toVendor == null ) { toVendor = fetchVendor(); } return toVendor; } /** - * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property Vendor. + * Retrieval of associated Vendor entity (one to one). This corresponds to the OData navigation property + * Vendor. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Vendor is already loaded, the result will contain the Vendor entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Vendor is already loaded, the result will contain the + * Vendor entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getVendorIfPresent() { + public Option getVendorIfPresent() + { return Option.of(toVendor); } /** * Overwrites the associated Vendor entity for the loaded navigation property Vendor. - * + * * @param cloudSdkValue - * New Vendor entity. + * New Vendor entity. */ - public void setVendor(final Vendor cloudSdkValue) { + public void setVendor( final Vendor cloudSdkValue ) + { toVendor = cloudSdkValue; } /** - * Fetches the Shelf entities (one to many) associated with this entity. This corresponds to the OData navigation property Shelf. + * Fetches the Shelf entities (one to many) associated with this entity. This corresponds to the OData + * navigation property Shelf. *

* Please note: This method will not cache or persist the query results. - * - * @return - * List containing one or more associated Shelf entities. If no entities are associated then an empty list is returned. + * + * @return List containing one or more associated Shelf entities. If no entities are associated then an empty + * list is returned. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nonnull - public List fetchShelf() { + public List fetchShelf() + { return fetchFieldAsList("Shelf", Shelf.class); } /** - * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property Shelf. + * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property + * Shelf. *

- * If the navigation property Shelf of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Shelf of a queried Product is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated Shelf entities. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated Shelf entities. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nonnull - public List getShelfOrFetch() { - if (toShelf == null) { + public List getShelfOrFetch() + { + if( toShelf == null ) { toShelf = fetchShelf(); } return toShelf; } /** - * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property Shelf. + * Retrieval of associated Shelf entities (one to many). This corresponds to the OData navigation property + * Shelf. *

- * If the navigation property for an entity Product has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Shelf is already loaded, the result will contain the Shelf entities. If not, an Option with result state empty is returned. + * If the navigation property for an entity Product has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Shelf is already loaded, the result will contain the + * Shelf entities. If not, an Option with result state empty is returned. */ @Nonnull - public Option> getShelfIfPresent() { + public Option> getShelfIfPresent() + { return Option.of(toShelf); } /** * Overwrites the list of associated Shelf entities for the loaded navigation property Shelf. *

- * If the navigation property Shelf of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Shelf of a queried Product is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * * @param cloudSdkValue - * List of Shelf entities. + * List of Shelf entities. */ - public void setShelf( - @Nonnull - final List cloudSdkValue) { - if (toShelf == null) { + public void setShelf( @Nonnull final List cloudSdkValue ) + { + if( toShelf == null ) { toShelf = Lists.newArrayList(); } toShelf.clear(); @@ -596,65 +656,73 @@ public void setShelf( } /** - * Adds elements to the list of associated Shelf entities. This corresponds to the OData navigation property Shelf. + * Adds elements to the list of associated Shelf entities. This corresponds to the OData navigation property + * Shelf. *

- * If the navigation property Shelf of a queried Product is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Shelf of a queried Product is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * * @param entity - * Array of Shelf entities. + * Array of Shelf entities. */ - public void addShelf(Shelf... entity) { - if (toShelf == null) { + public void addShelf( Shelf... entity ) + { + if( toShelf == null ) { toShelf = Lists.newArrayList(); } toShelf.addAll(Lists.newArrayList(entity)); } - /** * Helper class to allow for fluent creation of Product instances. - * + * */ - public final static class ProductBuilder { + public final static class ProductBuilder + { private Vendor toVendor; private List toShelf = Lists.newArrayList(); - private Product.ProductBuilder toVendor(final Vendor cloudSdkValue) { + private Product.ProductBuilder toVendor( final Vendor cloudSdkValue ) + { toVendor = cloudSdkValue; return this; } /** * Navigation property Vendor for Product to single Vendor. - * + * * @param cloudSdkValue - * The Vendor to build this Product with. - * @return - * This Builder to allow for a fluent interface. + * The Vendor to build this Product with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder vendor(final Vendor cloudSdkValue) { + public Product.ProductBuilder vendor( final Vendor cloudSdkValue ) + { return toVendor(cloudSdkValue); } - private Product.ProductBuilder toShelf(final List cloudSdkValue) { + private Product.ProductBuilder toShelf( final List cloudSdkValue ) + { toShelf.addAll(cloudSdkValue); return this; } /** * Navigation property Shelf for Product to multiple Shelf. - * + * * @param cloudSdkValue - * The Shelfs to build this Product with. - * @return - * This Builder to allow for a fluent interface. + * The Shelfs to build this Product with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Product.ProductBuilder shelf(Shelf... cloudSdkValue) { + public Product.ProductBuilder shelf( Shelf... cloudSdkValue ) + { return toShelf(Lists.newArrayList(cloudSdkValue)); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java index 5c9e713bd..a1add009e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductByKeyFluentHelper.java @@ -5,50 +5,57 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product + * Product} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ -public class ProductByKeyFluentHelper - extends FluentHelperByKey +public class ProductByKeyFluentHelper extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity with the + * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the + * fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Product} + * Entity Collection to be used to fetch a single {@code Product} * @param servicePath - * Service path to be used to fetch a single {@code Product} + * Service path to be used to fetch a single {@code Product} * @param id - * + * */ public ProductByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Product.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java index d89f20a08..b7d8d4a07 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCount.java @@ -5,14 +5,17 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.sap.cloud.sdk.datamodel.odata.helper.VdmComplex; import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -20,54 +23,62 @@ import lombok.NoArgsConstructor; import lombok.ToString; - /** - *

Original complex type name from the Odata EDM: ProductCount

- * + *

+ * Original complex type name from the Odata EDM: ProductCount + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class ProductCount - extends VdmComplex +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class ProductCount extends VdmComplex { /** - * Constraints: Not nullable

Original property from the Odata EDM: ProductId

- * + * Constraints: Not nullable + *

+ * Original property from the Odata EDM: ProductId + *

+ * * @param productId - * + * */ - @SerializedName("ProductId") - @JsonProperty("ProductId") + @SerializedName( "ProductId" ) + @JsonProperty( "ProductId" ) @Nullable - @ODataField(odataName = "ProductId") + @ODataField( odataName = "ProductId" ) private Integer productId; /** - * Constraints: Not nullable

Original property from the Odata EDM: Quantity

- * + * Constraints: Not nullable + *

+ * Original property from the Odata EDM: Quantity + *

+ * * @param quantity - * + * */ - @SerializedName("Quantity") - @JsonProperty("Quantity") + @SerializedName( "Quantity" ) + @JsonProperty( "Quantity" ) @Nullable - @ODataField(odataName = "Quantity") + @ODataField( odataName = "Quantity" ) private Integer quantity; @Nonnull @Override - public Class getType() { + public Class getType() + { return ProductCount.class; } @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("ProductId", getProductId()); cloudSdkValues.put("Quantity", getQuantity()); @@ -75,19 +86,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("ProductId")) { + if( cloudSdkValues.containsKey("ProductId") ) { final Object value = cloudSdkValues.remove("ProductId"); - if ((value == null)||(!value.equals(getProductId()))) { + if( (value == null) || (!value.equals(getProductId())) ) { setProductId(((Integer) value)); } } - if (cloudSdkValues.containsKey("Quantity")) { + if( cloudSdkValues.containsKey("Quantity") ) { final Object value = cloudSdkValues.remove("Quantity"); - if ((value == null)||(!value.equals(getQuantity()))) { + if( (value == null) || (!value.equals(getQuantity())) ) { setQuantity(((Integer) value)); } } @@ -103,33 +115,38 @@ protected void fromMap(final Map inputValues) { @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); return result; } /** - * Constraints: Not nullable

Original property from the Odata EDM: ProductId

- * + * Constraints: Not nullable + *

+ * Original property from the Odata EDM: ProductId + *

+ * * @param productId - * The productId to set. + * The productId to set. */ - public void setProductId( - @Nullable - final Integer productId) { + public void setProductId( @Nullable final Integer productId ) + { rememberChangedField("ProductId", this.productId); this.productId = productId; } /** - * Constraints: Not nullable

Original property from the Odata EDM: Quantity

- * + * Constraints: Not nullable + *

+ * Original property from the Odata EDM: Quantity + *

+ * * @param quantity - * The quantity to set. + * The quantity to set. */ - public void setQuantity( - @Nullable - final Integer quantity) { + public void setQuantity( @Nullable final Integer quantity ) + { rememberChangedField("Quantity", this.quantity); this.quantity = quantity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java index 610efd52d..e715061a0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductCreateFluentHelper.java @@ -5,48 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system.

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product + * Product} entity and save it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ProductCreateFluentHelper - extends FluentHelperCreate +public class ProductCreateFluentHelper extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that + * will be created in the S/4HANA system. + * */ private final Product entity; /** - * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will create a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Product to create. + * The Product to create. */ public ProductCreateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Product entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Product entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Product getEntity() { + protected Product getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java index 467b41b30..dd5474628 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product + * Product} entities. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. + * */ -public class ProductFluentHelper - extends FluentHelperRead +public class ProductFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public ProductFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public ProductFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Product.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java index 0e46ba0ac..fdc7e6026 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ProductUpdateFluentHelper.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; /** - * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system.

+ * Fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the + * S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ProductUpdateFluentHelper - extends FluentHelperUpdate +public class ProductUpdateFluentHelper extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that + * will be updated in the S/4HANA system. + * */ private final Product entity; /** - * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will update a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Product to take the updated values from. + * The Product to take the updated values from. */ public ProductUpdateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Product entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Product entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Product getEntity() { + protected Product getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java index a034a0994..f29e08110 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Receipt.java @@ -6,8 +6,10 @@ import java.math.BigDecimal; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -21,6 +23,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -32,386 +35,441 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Receipt

- * + *

+ * Original entity name from the Odata EDM: Receipt + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class Receipt - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class Receipt extends VdmEntity { /** * Selector for all available fields of Receipt. - * + * */ public final static ReceiptSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static ReceiptField ID = new ReceiptField("Id"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

- * - * @return - * The customerId contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CustomerId + *

+ * + * @return The customerId contained in this entity. */ - @SerializedName("CustomerId") - @JsonProperty("CustomerId") + @SerializedName( "CustomerId" ) + @JsonProperty( "CustomerId" ) @Nullable - @ODataField(odataName = "CustomerId") + @ODataField( odataName = "CustomerId" ) private Integer customerId; /** * Use with available fluent helpers to apply the CustomerId field to query operations. - * + * */ public final static ReceiptField CUSTOMER_ID = new ReceiptField("CustomerId"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

- * - * @return - * The totalAmount contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: TotalAmount + *

+ * + * @return The totalAmount contained in this entity. */ - @SerializedName("TotalAmount") - @JsonProperty("TotalAmount") + @SerializedName( "TotalAmount" ) + @JsonProperty( "TotalAmount" ) @Nullable - @ODataField(odataName = "TotalAmount") + @ODataField( odataName = "TotalAmount" ) private BigDecimal totalAmount; /** * Use with available fluent helpers to apply the TotalAmount field to query operations. - * + * */ public final static ReceiptField TOTAL_AMOUNT = new ReceiptField("TotalAmount"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount1

- * - * @return - * The productCount1 contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductCount1 + *

+ * + * @return The productCount1 contained in this entity. */ - @SerializedName("ProductCount1") - @JsonProperty("ProductCount1") + @SerializedName( "ProductCount1" ) + @JsonProperty( "ProductCount1" ) @Nullable - @ODataField(odataName = "ProductCount1") + @ODataField( odataName = "ProductCount1" ) private ProductCount productCount1; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount2

- * - * @return - * The productCount2 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount2 + *

+ * + * @return The productCount2 contained in this entity. */ - @SerializedName("ProductCount2") - @JsonProperty("ProductCount2") + @SerializedName( "ProductCount2" ) + @JsonProperty( "ProductCount2" ) @Nullable - @ODataField(odataName = "ProductCount2") + @ODataField( odataName = "ProductCount2" ) private ProductCount productCount2; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount3

- * - * @return - * The productCount3 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount3 + *

+ * + * @return The productCount3 contained in this entity. */ - @SerializedName("ProductCount3") - @JsonProperty("ProductCount3") + @SerializedName( "ProductCount3" ) + @JsonProperty( "ProductCount3" ) @Nullable - @ODataField(odataName = "ProductCount3") + @ODataField( odataName = "ProductCount3" ) private ProductCount productCount3; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount4

- * - * @return - * The productCount4 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount4 + *

+ * + * @return The productCount4 contained in this entity. */ - @SerializedName("ProductCount4") - @JsonProperty("ProductCount4") + @SerializedName( "ProductCount4" ) + @JsonProperty( "ProductCount4" ) @Nullable - @ODataField(odataName = "ProductCount4") + @ODataField( odataName = "ProductCount4" ) private ProductCount productCount4; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount5

- * - * @return - * The productCount5 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount5 + *

+ * + * @return The productCount5 contained in this entity. */ - @SerializedName("ProductCount5") - @JsonProperty("ProductCount5") + @SerializedName( "ProductCount5" ) + @JsonProperty( "ProductCount5" ) @Nullable - @ODataField(odataName = "ProductCount5") + @ODataField( odataName = "ProductCount5" ) private ProductCount productCount5; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount6

- * - * @return - * The productCount6 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount6 + *

+ * + * @return The productCount6 contained in this entity. */ - @SerializedName("ProductCount6") - @JsonProperty("ProductCount6") + @SerializedName( "ProductCount6" ) + @JsonProperty( "ProductCount6" ) @Nullable - @ODataField(odataName = "ProductCount6") + @ODataField( odataName = "ProductCount6" ) private ProductCount productCount6; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount7

- * - * @return - * The productCount7 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount7 + *

+ * + * @return The productCount7 contained in this entity. */ - @SerializedName("ProductCount7") - @JsonProperty("ProductCount7") + @SerializedName( "ProductCount7" ) + @JsonProperty( "ProductCount7" ) @Nullable - @ODataField(odataName = "ProductCount7") + @ODataField( odataName = "ProductCount7" ) private ProductCount productCount7; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount8

- * - * @return - * The productCount8 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount8 + *

+ * + * @return The productCount8 contained in this entity. */ - @SerializedName("ProductCount8") - @JsonProperty("ProductCount8") + @SerializedName( "ProductCount8" ) + @JsonProperty( "ProductCount8" ) @Nullable - @ODataField(odataName = "ProductCount8") + @ODataField( odataName = "ProductCount8" ) private ProductCount productCount8; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount9

- * - * @return - * The productCount9 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount9 + *

+ * + * @return The productCount9 contained in this entity. */ - @SerializedName("ProductCount9") - @JsonProperty("ProductCount9") + @SerializedName( "ProductCount9" ) + @JsonProperty( "ProductCount9" ) @Nullable - @ODataField(odataName = "ProductCount9") + @ODataField( odataName = "ProductCount9" ) private ProductCount productCount9; /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount10

- * - * @return - * The productCount10 contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount10 + *

+ * + * @return The productCount10 contained in this entity. */ - @SerializedName("ProductCount10") - @JsonProperty("ProductCount10") + @SerializedName( "ProductCount10" ) + @JsonProperty( "ProductCount10" ) @Nullable - @ODataField(odataName = "ProductCount10") + @ODataField( odataName = "ProductCount10" ) private ProductCount productCount10; /** * Navigation property Customer for Receipt to single Customer. - * + * */ - @SerializedName("Customer") - @JsonProperty("Customer") - @ODataField(odataName = "Customer") + @SerializedName( "Customer" ) + @JsonProperty( "Customer" ) + @ODataField( odataName = "Customer" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Customer toCustomer; /** * Use with available fluent helpers to apply the Customer navigation property to query operations. - * + * */ public final static ReceiptOneToOneLink TO_CUSTOMER = new ReceiptOneToOneLink("Customer"); @Nonnull @Override - public Class getType() { + public Class getType() + { return Receipt.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: CustomerId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: CustomerId + *

+ * * @param customerId - * The customerId to set. + * The customerId to set. */ - public void setCustomerId( - @Nullable - final Integer customerId) { + public void setCustomerId( @Nullable final Integer customerId ) + { rememberChangedField("CustomerId", this.customerId); this.customerId = customerId; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: TotalAmount

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: TotalAmount + *

+ * * @param totalAmount - * The totalAmount to set. + * The totalAmount to set. */ - public void setTotalAmount( - @Nullable - final BigDecimal totalAmount) { + public void setTotalAmount( @Nullable final BigDecimal totalAmount ) + { rememberChangedField("TotalAmount", this.totalAmount); this.totalAmount = totalAmount; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: ProductCount1

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: ProductCount1 + *

+ * * @param productCount1 - * The productCount1 to set. + * The productCount1 to set. */ - public void setProductCount1( - @Nullable - final ProductCount productCount1) { + public void setProductCount1( @Nullable final ProductCount productCount1 ) + { rememberChangedField("ProductCount1", this.productCount1); this.productCount1 = productCount1; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount2

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount2 + *

+ * * @param productCount2 - * The productCount2 to set. + * The productCount2 to set. */ - public void setProductCount2( - @Nullable - final ProductCount productCount2) { + public void setProductCount2( @Nullable final ProductCount productCount2 ) + { rememberChangedField("ProductCount2", this.productCount2); this.productCount2 = productCount2; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount3

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount3 + *

+ * * @param productCount3 - * The productCount3 to set. + * The productCount3 to set. */ - public void setProductCount3( - @Nullable - final ProductCount productCount3) { + public void setProductCount3( @Nullable final ProductCount productCount3 ) + { rememberChangedField("ProductCount3", this.productCount3); this.productCount3 = productCount3; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount4

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount4 + *

+ * * @param productCount4 - * The productCount4 to set. + * The productCount4 to set. */ - public void setProductCount4( - @Nullable - final ProductCount productCount4) { + public void setProductCount4( @Nullable final ProductCount productCount4 ) + { rememberChangedField("ProductCount4", this.productCount4); this.productCount4 = productCount4; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount5

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount5 + *

+ * * @param productCount5 - * The productCount5 to set. + * The productCount5 to set. */ - public void setProductCount5( - @Nullable - final ProductCount productCount5) { + public void setProductCount5( @Nullable final ProductCount productCount5 ) + { rememberChangedField("ProductCount5", this.productCount5); this.productCount5 = productCount5; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount6

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount6 + *

+ * * @param productCount6 - * The productCount6 to set. + * The productCount6 to set. */ - public void setProductCount6( - @Nullable - final ProductCount productCount6) { + public void setProductCount6( @Nullable final ProductCount productCount6 ) + { rememberChangedField("ProductCount6", this.productCount6); this.productCount6 = productCount6; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount7

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount7 + *

+ * * @param productCount7 - * The productCount7 to set. + * The productCount7 to set. */ - public void setProductCount7( - @Nullable - final ProductCount productCount7) { + public void setProductCount7( @Nullable final ProductCount productCount7 ) + { rememberChangedField("ProductCount7", this.productCount7); this.productCount7 = productCount7; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount8

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount8 + *

+ * * @param productCount8 - * The productCount8 to set. + * The productCount8 to set. */ - public void setProductCount8( - @Nullable - final ProductCount productCount8) { + public void setProductCount8( @Nullable final ProductCount productCount8 ) + { rememberChangedField("ProductCount8", this.productCount8); this.productCount8 = productCount8; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount9

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount9 + *

+ * * @param productCount9 - * The productCount9 to set. + * The productCount9 to set. */ - public void setProductCount9( - @Nullable - final ProductCount productCount9) { + public void setProductCount9( @Nullable final ProductCount productCount9 ) + { rememberChangedField("ProductCount9", this.productCount9); this.productCount9 = productCount9; } /** - * Constraints: Nullable

Original property name from the Odata EDM: ProductCount10

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: ProductCount10 + *

+ * * @param productCount10 - * The productCount10 to set. + * The productCount10 to set. */ - public void setProductCount10( - @Nullable - final ProductCount productCount10) { + public void setProductCount10( @Nullable final ProductCount productCount10 ) + { rememberChangedField("ProductCount10", this.productCount10); this.productCount10 = productCount10; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Receipts"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -419,7 +477,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("CustomerId", getCustomerId()); @@ -438,182 +497,183 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("CustomerId")) { + if( cloudSdkValues.containsKey("CustomerId") ) { final Object value = cloudSdkValues.remove("CustomerId"); - if ((value == null)||(!value.equals(getCustomerId()))) { + if( (value == null) || (!value.equals(getCustomerId())) ) { setCustomerId(((Integer) value)); } } - if (cloudSdkValues.containsKey("TotalAmount")) { + if( cloudSdkValues.containsKey("TotalAmount") ) { final Object value = cloudSdkValues.remove("TotalAmount"); - if ((value == null)||(!value.equals(getTotalAmount()))) { + if( (value == null) || (!value.equals(getTotalAmount())) ) { setTotalAmount(((BigDecimal) value)); } } } // structured properties { - if (cloudSdkValues.containsKey("ProductCount1")) { + if( cloudSdkValues.containsKey("ProductCount1") ) { final Object value = cloudSdkValues.remove("ProductCount1"); - if (value instanceof Map) { - if (getProductCount1() == null) { + if( value instanceof Map ) { + if( getProductCount1() == null ) { setProductCount1(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount1().fromMap(inputMap); } - if ((value == null)&&(getProductCount1()!= null)) { + if( (value == null) && (getProductCount1() != null) ) { setProductCount1(null); } } - if (cloudSdkValues.containsKey("ProductCount2")) { + if( cloudSdkValues.containsKey("ProductCount2") ) { final Object value = cloudSdkValues.remove("ProductCount2"); - if (value instanceof Map) { - if (getProductCount2() == null) { + if( value instanceof Map ) { + if( getProductCount2() == null ) { setProductCount2(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount2().fromMap(inputMap); } - if ((value == null)&&(getProductCount2()!= null)) { + if( (value == null) && (getProductCount2() != null) ) { setProductCount2(null); } } - if (cloudSdkValues.containsKey("ProductCount3")) { + if( cloudSdkValues.containsKey("ProductCount3") ) { final Object value = cloudSdkValues.remove("ProductCount3"); - if (value instanceof Map) { - if (getProductCount3() == null) { + if( value instanceof Map ) { + if( getProductCount3() == null ) { setProductCount3(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount3().fromMap(inputMap); } - if ((value == null)&&(getProductCount3()!= null)) { + if( (value == null) && (getProductCount3() != null) ) { setProductCount3(null); } } - if (cloudSdkValues.containsKey("ProductCount4")) { + if( cloudSdkValues.containsKey("ProductCount4") ) { final Object value = cloudSdkValues.remove("ProductCount4"); - if (value instanceof Map) { - if (getProductCount4() == null) { + if( value instanceof Map ) { + if( getProductCount4() == null ) { setProductCount4(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount4().fromMap(inputMap); } - if ((value == null)&&(getProductCount4()!= null)) { + if( (value == null) && (getProductCount4() != null) ) { setProductCount4(null); } } - if (cloudSdkValues.containsKey("ProductCount5")) { + if( cloudSdkValues.containsKey("ProductCount5") ) { final Object value = cloudSdkValues.remove("ProductCount5"); - if (value instanceof Map) { - if (getProductCount5() == null) { + if( value instanceof Map ) { + if( getProductCount5() == null ) { setProductCount5(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount5().fromMap(inputMap); } - if ((value == null)&&(getProductCount5()!= null)) { + if( (value == null) && (getProductCount5() != null) ) { setProductCount5(null); } } - if (cloudSdkValues.containsKey("ProductCount6")) { + if( cloudSdkValues.containsKey("ProductCount6") ) { final Object value = cloudSdkValues.remove("ProductCount6"); - if (value instanceof Map) { - if (getProductCount6() == null) { + if( value instanceof Map ) { + if( getProductCount6() == null ) { setProductCount6(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount6().fromMap(inputMap); } - if ((value == null)&&(getProductCount6()!= null)) { + if( (value == null) && (getProductCount6() != null) ) { setProductCount6(null); } } - if (cloudSdkValues.containsKey("ProductCount7")) { + if( cloudSdkValues.containsKey("ProductCount7") ) { final Object value = cloudSdkValues.remove("ProductCount7"); - if (value instanceof Map) { - if (getProductCount7() == null) { + if( value instanceof Map ) { + if( getProductCount7() == null ) { setProductCount7(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount7().fromMap(inputMap); } - if ((value == null)&&(getProductCount7()!= null)) { + if( (value == null) && (getProductCount7() != null) ) { setProductCount7(null); } } - if (cloudSdkValues.containsKey("ProductCount8")) { + if( cloudSdkValues.containsKey("ProductCount8") ) { final Object value = cloudSdkValues.remove("ProductCount8"); - if (value instanceof Map) { - if (getProductCount8() == null) { + if( value instanceof Map ) { + if( getProductCount8() == null ) { setProductCount8(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount8().fromMap(inputMap); } - if ((value == null)&&(getProductCount8()!= null)) { + if( (value == null) && (getProductCount8() != null) ) { setProductCount8(null); } } - if (cloudSdkValues.containsKey("ProductCount9")) { + if( cloudSdkValues.containsKey("ProductCount9") ) { final Object value = cloudSdkValues.remove("ProductCount9"); - if (value instanceof Map) { - if (getProductCount9() == null) { + if( value instanceof Map ) { + if( getProductCount9() == null ) { setProductCount9(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount9().fromMap(inputMap); } - if ((value == null)&&(getProductCount9()!= null)) { + if( (value == null) && (getProductCount9() != null) ) { setProductCount9(null); } } - if (cloudSdkValues.containsKey("ProductCount10")) { + if( cloudSdkValues.containsKey("ProductCount10") ) { final Object value = cloudSdkValues.remove("ProductCount10"); - if (value instanceof Map) { - if (getProductCount10() == null) { + if( value instanceof Map ) { + if( getProductCount10() == null ) { setProductCount10(new ProductCount()); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) value); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) value); getProductCount10().fromMap(inputMap); } - if ((value == null)&&(getProductCount10()!= null)) { + if( (value == null) && (getProductCount10() != null) ) { setProductCount10(null); } } } // navigation properties { - if ((cloudSdkValues).containsKey("Customer")) { + if( (cloudSdkValues).containsKey("Customer") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Customer"); - if (cloudSdkValue instanceof Map) { - if (toCustomer == null) { + if( cloudSdkValue instanceof Map ) { + if( toCustomer == null ) { toCustomer = new Customer(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toCustomer.fromMap(inputMap); } } @@ -623,167 +683,177 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticReceiptField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static ReceiptField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new ReceiptField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticReceiptField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static ReceiptField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new ReceiptField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toCustomer!= null) { + if( toCustomer != null ) { (cloudSdkValues).put("Customer", toCustomer); } return cloudSdkValues; } /** - * Fetches the Customer entity (one to one) associated with this entity. This corresponds to the OData navigation property Customer. + * Fetches the Customer entity (one to one) associated with this entity. This corresponds to the OData + * navigation property Customer. *

* Please note: This method will not cache or persist the query results. - * - * @return - * The single associated Customer entity, or {@code null} if an entity is not associated. + * + * @return The single associated Customer entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Customer fetchCustomer() { + public Customer fetchCustomer() + { return fetchFieldAsSingle("Customer", Customer.class); } /** - * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property Customer. + * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property + * Customer. *

- * If the navigation property Customer of a queried Receipt is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Customer of a queried Receipt is operated lazily, an + * ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated Customer entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated Customer entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Customer getCustomerOrFetch() { - if (toCustomer == null) { + public Customer getCustomerOrFetch() + { + if( toCustomer == null ) { toCustomer = fetchCustomer(); } return toCustomer; } /** - * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property Customer. + * Retrieval of associated Customer entity (one to one). This corresponds to the OData navigation property + * Customer. *

- * If the navigation property for an entity Receipt has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Customer is already loaded, the result will contain the Customer entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Receipt has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Customer is already loaded, the result will contain the + * Customer entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option getCustomerIfPresent() { + public Option getCustomerIfPresent() + { return Option.of(toCustomer); } /** * Overwrites the associated Customer entity for the loaded navigation property Customer. - * + * * @param cloudSdkValue - * New Customer entity. + * New Customer entity. */ - public void setCustomer(final Customer cloudSdkValue) { + public void setCustomer( final Customer cloudSdkValue ) + { toCustomer = cloudSdkValue; } - /** * Helper class to allow for fluent creation of Receipt instances. - * + * */ - public final static class ReceiptBuilder { + public final static class ReceiptBuilder + { private Customer toCustomer; - private Receipt.ReceiptBuilder toCustomer(final Customer cloudSdkValue) { + private Receipt.ReceiptBuilder toCustomer( final Customer cloudSdkValue ) + { toCustomer = cloudSdkValue; return this; } /** * Navigation property Customer for Receipt to single Customer. - * + * * @param cloudSdkValue - * The Customer to build this Receipt with. - * @return - * This Builder to allow for a fluent interface. + * The Customer to build this Receipt with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Receipt.ReceiptBuilder customer(final Customer cloudSdkValue) { + public Receipt.ReceiptBuilder customer( final Customer cloudSdkValue ) + { return toCustomer(cloudSdkValue); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java index d458c58ef..7827edf47 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptByKeyFluentHelper.java @@ -5,50 +5,57 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt + * Receipt} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ -public class ReceiptByKeyFluentHelper - extends FluentHelperByKey +public class ReceiptByKeyFluentHelper extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity with the + * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the + * fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Receipt} + * Entity Collection to be used to fetch a single {@code Receipt} * @param servicePath - * Service path to be used to fetch a single {@code Receipt} + * Service path to be used to fetch a single {@code Receipt} * @param id - * + * */ public ReceiptByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Receipt.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java index d2025f06b..14e347b5f 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptCreateFluentHelper.java @@ -5,48 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system.

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt + * Receipt} entity and save it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ReceiptCreateFluentHelper - extends FluentHelperCreate +public class ReceiptCreateFluentHelper extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that + * will be created in the S/4HANA system. + * */ private final Receipt entity; /** - * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will create a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Receipt to create. + * The Receipt to create. */ public ReceiptCreateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Receipt entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Receipt entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Receipt getEntity() { + protected Receipt getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java index 055c7651b..a85097306 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ReceiptFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt + * Receipt} entities. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. + * */ -public class ReceiptFluentHelper - extends FluentHelperRead +public class ReceiptFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public ReceiptFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public ReceiptFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Receipt.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java index ef9ae9150..84faec390 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/RevokeReceiptFluentHelper.java @@ -6,62 +6,68 @@ import java.net.URI; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; + import com.google.common.collect.Maps; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.datamodel.odata.helper.SingleValuedFluentHelperFunction; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpUriRequest; - /** * Fluent helper for the RevokeReceipt OData function import. - * + * */ public class RevokeReceiptFluentHelper - extends SingleValuedFluentHelperFunction + extends + SingleValuedFluentHelperFunction { private final Map values = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will execute the RevokeReceipt OData function import with the provided parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will execute the RevokeReceipt OData function import with the provided + * parameters. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param servicePath - * Service path to be used to call the functions against. + * Service path to be used to call the functions against. * @param receiptId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ReceiptId + *

*/ - public RevokeReceiptFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Integer receiptId) { + public RevokeReceiptFluentHelper( @Nonnull final String servicePath, @Nonnull final Integer receiptId ) + { super(servicePath); values.put("ReceiptId", receiptId); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return String.class; } @Override @Nonnull - protected String getFunctionName() { + protected String getFunctionName() + { return "RevokeReceipt"; } @Override @Nullable - protected JsonElement refineJsonResponse( - @Nullable - JsonElement jsonElement) { - if ((jsonElement instanceof JsonObject)&&((JsonObject) jsonElement).has(getFunctionName())) { + protected JsonElement refineJsonResponse( @Nullable JsonElement jsonElement ) + { + if( (jsonElement instanceof JsonObject) && ((JsonObject) jsonElement).has(getFunctionName()) ) { jsonElement = ((JsonObject) jsonElement).get(getFunctionName()); } return super.refineJsonResponse(jsonElement); @@ -69,27 +75,26 @@ protected JsonElement refineJsonResponse( @Override @Nonnull - protected Map getParameters() { + protected Map getParameters() + { return values; } @Override @Nonnull - protected HttpUriRequest createRequest( - @Nonnull - final URI uri) { + protected HttpUriRequest createRequest( @Nonnull final URI uri ) + { return new HttpPost(uri); } /** * Execute this function import. - * + * */ @Override @Nullable - public String executeRequest( - @Nonnull - final Destination destination) { + public String executeRequest( @Nonnull final Destination destination ) + { return super.executeSingle(destination); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java index 8656ee8d7..9286e9649 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Shelf.java @@ -6,8 +6,10 @@ import java.util.List; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -23,6 +25,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -34,132 +37,143 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Shelf

- * + *

+ * Original entity name from the Odata EDM: Shelf + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class Shelf - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class Shelf extends VdmEntity { /** * Selector for all available fields of Shelf. - * + * */ public final static ShelfSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static ShelfField ID = new ShelfField("Id"); /** - * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

- * - * @return - * The floorPlanId contained in this entity. + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: FloorPlanId + *

+ * + * @return The floorPlanId contained in this entity. */ - @SerializedName("FloorPlanId") - @JsonProperty("FloorPlanId") + @SerializedName( "FloorPlanId" ) + @JsonProperty( "FloorPlanId" ) @Nullable - @ODataField(odataName = "FloorPlanId") + @ODataField( odataName = "FloorPlanId" ) private Integer floorPlanId; /** * Use with available fluent helpers to apply the FloorPlanId field to query operations. - * + * */ public final static ShelfField FLOOR_PLAN_ID = new ShelfField("FloorPlanId"); /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * */ - @SerializedName("FloorPlan") - @JsonProperty("FloorPlan") - @ODataField(odataName = "FloorPlan") + @SerializedName( "FloorPlan" ) + @JsonProperty( "FloorPlan" ) + @ODataField( odataName = "FloorPlan" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private FloorPlan toFloorPlan; /** * Navigation property Products for Shelf to multiple Product. - * + * */ - @SerializedName("Products") - @JsonProperty("Products") - @ODataField(odataName = "Products") - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @SerializedName( "Products" ) + @JsonProperty( "Products" ) + @ODataField( odataName = "Products" ) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private List toProducts; /** * Use with available fluent helpers to apply the FloorPlan navigation property to query operations. - * + * */ public final static ShelfOneToOneLink TO_FLOOR_PLAN = new ShelfOneToOneLink("FloorPlan"); /** * Use with available fluent helpers to apply the Products navigation property to query operations. - * + * */ public final static ShelfLink TO_PRODUCTS = new ShelfLink("Products"); @Nonnull @Override - public Class getType() { + public Class getType() + { return Shelf.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable

Original property name from the Odata EDM: FloorPlanId

- * + * Constraints: Not nullable + *

+ * Original property name from the Odata EDM: FloorPlanId + *

+ * * @param floorPlanId - * The floorPlanId to set. + * The floorPlanId to set. */ - public void setFloorPlanId( - @Nullable - final Integer floorPlanId) { + public void setFloorPlanId( @Nullable final Integer floorPlanId ) + { rememberChangedField("FloorPlanId", this.floorPlanId); this.floorPlanId = floorPlanId; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Shelves"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -167,7 +181,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("FloorPlanId", getFloorPlanId()); @@ -175,19 +190,20 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("FloorPlanId")) { + if( cloudSdkValues.containsKey("FloorPlanId") ) { final Object value = cloudSdkValues.remove("FloorPlanId"); - if ((value == null)||(!value.equals(getFloorPlanId()))) { + if( (value == null) || (!value.equals(getFloorPlanId())) ) { setFloorPlanId(((Integer) value)); } } @@ -197,40 +213,40 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("FloorPlan")) { + if( (cloudSdkValues).containsKey("FloorPlan") ) { final Object cloudSdkValue = (cloudSdkValues).remove("FloorPlan"); - if (cloudSdkValue instanceof Map) { - if (toFloorPlan == null) { + if( cloudSdkValue instanceof Map ) { + if( toFloorPlan == null ) { toFloorPlan = new FloorPlan(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toFloorPlan.fromMap(inputMap); } } - if ((cloudSdkValues).containsKey("Products")) { + if( (cloudSdkValues).containsKey("Products") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Products"); - if (cloudSdkValue instanceof Iterable) { - if (toProducts == null) { + if( cloudSdkValue instanceof Iterable ) { + if( toProducts == null ) { toProducts = Lists.newArrayList(); } else { toProducts = Lists.newArrayList(toProducts); } int i = 0; - for (Object item: ((Iterable ) cloudSdkValue)) { - if (!(item instanceof Map)) { + for( Object item : ((Iterable) cloudSdkValue) ) { + if( !(item instanceof Map) ) { continue; } Product entity; - if (toProducts.size()>i) { + if( toProducts.size() > i ) { entity = toProducts.get(i); } else { entity = new Product(); toProducts.add(entity); } i = (i + 1); - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) item); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) item); entity.fromMap(inputMap); } } @@ -241,208 +257,237 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticShelfField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static ShelfField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new ShelfField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticShelfField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static ShelfField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new ShelfField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toFloorPlan!= null) { + if( toFloorPlan != null ) { (cloudSdkValues).put("FloorPlan", toFloorPlan); } - if (toProducts!= null) { + if( toProducts != null ) { (cloudSdkValues).put("Products", toProducts); } return cloudSdkValues; } /** - * Fetches the FloorPlan entity (one to one) associated with this entity. This corresponds to the OData navigation property FloorPlan. + * Fetches the FloorPlan entity (one to one) associated with this entity. This corresponds to the OData + * navigation property FloorPlan. *

* Please note: This method will not cache or persist the query results. - * - * @return - * The single associated FloorPlan entity, or {@code null} if an entity is not associated. + * + * @return The single associated FloorPlan entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public FloorPlan fetchFloorPlan() { + public FloorPlan fetchFloorPlan() + { return fetchFieldAsSingle("FloorPlan", FloorPlan.class); } /** - * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property FloorPlan. + * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property + * FloorPlan. *

- * If the navigation property FloorPlan of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property FloorPlan of a queried Shelf is operated lazily, an + * ODataException can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated FloorPlan entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated FloorPlan entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public FloorPlan getFloorPlanOrFetch() { - if (toFloorPlan == null) { + public FloorPlan getFloorPlanOrFetch() + { + if( toFloorPlan == null ) { toFloorPlan = fetchFloorPlan(); } return toFloorPlan; } /** - * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property FloorPlan. + * Retrieval of associated FloorPlan entity (one to one). This corresponds to the OData navigation property + * FloorPlan. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property FloorPlan is already loaded, the result will contain the FloorPlan entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property FloorPlan is already loaded, the result will contain + * the FloorPlan entity. If not, an Option with result state empty is + * returned. */ @Nonnull - public Option getFloorPlanIfPresent() { + public Option getFloorPlanIfPresent() + { return Option.of(toFloorPlan); } /** * Overwrites the associated FloorPlan entity for the loaded navigation property FloorPlan. - * + * * @param cloudSdkValue - * New FloorPlan entity. + * New FloorPlan entity. */ - public void setFloorPlan(final FloorPlan cloudSdkValue) { + public void setFloorPlan( final FloorPlan cloudSdkValue ) + { toFloorPlan = cloudSdkValue; } /** - * Fetches the Product entities (one to many) associated with this entity. This corresponds to the OData navigation property Products. + * Fetches the Product entities (one to many) associated with this entity. This corresponds to the OData + * navigation property Products. *

* Please note: This method will not cache or persist the query results. - * - * @return - * List containing one or more associated Product entities. If no entities are associated then an empty list is returned. + * + * @return List containing one or more associated Product entities. If no entities are associated then an + * empty list is returned. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nonnull - public List fetchProducts() { + public List fetchProducts() + { return fetchFieldAsList("Products", Product.class); } /** - * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property Products. + * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property + * Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated Product entities. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated Product entities. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nonnull - public List getProductsOrFetch() { - if (toProducts == null) { + public List getProductsOrFetch() + { + if( toProducts == null ) { toProducts = fetchProducts(); } return toProducts; } /** - * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property Products. + * Retrieval of associated Product entities (one to many). This corresponds to the OData navigation property + * Products. *

- * If the navigation property for an entity Shelf has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Products is already loaded, the result will contain the Product entities. If not, an Option with result state empty is returned. + * If the navigation property for an entity Shelf has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Products is already loaded, the result will contain the + * Product entities. If not, an Option with result state empty is returned. */ @Nonnull - public Option> getProductsIfPresent() { + public Option> getProductsIfPresent() + { return Option.of(toProducts); } /** * Overwrites the list of associated Product entities for the loaded navigation property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * * @param cloudSdkValue - * List of Product entities. + * List of Product entities. */ - public void setProducts( - @Nonnull - final List cloudSdkValue) { - if (toProducts == null) { + public void setProducts( @Nonnull final List cloudSdkValue ) + { + if( toProducts == null ) { toProducts = Lists.newArrayList(); } toProducts.clear(); @@ -450,65 +495,73 @@ public void setProducts( } /** - * Adds elements to the list of associated Product entities. This corresponds to the OData navigation property Products. + * Adds elements to the list of associated Product entities. This corresponds to the OData navigation + * property Products. *

- * If the navigation property Products of a queried Shelf is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Products of a queried Shelf is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * * @param entity - * Array of Product entities. + * Array of Product entities. */ - public void addProducts(Product... entity) { - if (toProducts == null) { + public void addProducts( Product... entity ) + { + if( toProducts == null ) { toProducts = Lists.newArrayList(); } toProducts.addAll(Lists.newArrayList(entity)); } - /** * Helper class to allow for fluent creation of Shelf instances. - * + * */ - public final static class ShelfBuilder { + public final static class ShelfBuilder + { private FloorPlan toFloorPlan; private List toProducts = Lists.newArrayList(); - private Shelf.ShelfBuilder toFloorPlan(final FloorPlan cloudSdkValue) { + private Shelf.ShelfBuilder toFloorPlan( final FloorPlan cloudSdkValue ) + { toFloorPlan = cloudSdkValue; return this; } /** * Navigation property FloorPlan for Shelf to single FloorPlan. - * + * * @param cloudSdkValue - * The FloorPlan to build this Shelf with. - * @return - * This Builder to allow for a fluent interface. + * The FloorPlan to build this Shelf with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder floorPlan(final FloorPlan cloudSdkValue) { + public Shelf.ShelfBuilder floorPlan( final FloorPlan cloudSdkValue ) + { return toFloorPlan(cloudSdkValue); } - private Shelf.ShelfBuilder toProducts(final List cloudSdkValue) { + private Shelf.ShelfBuilder toProducts( final List cloudSdkValue ) + { toProducts.addAll(cloudSdkValue); return this; } /** * Navigation property Products for Shelf to multiple Product. - * + * * @param cloudSdkValue - * The Products to build this Shelf with. - * @return - * This Builder to allow for a fluent interface. + * The Products to build this Shelf with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Shelf.ShelfBuilder products(Product... cloudSdkValue) { + public Shelf.ShelfBuilder products( Product... cloudSdkValue ) + { return toProducts(Lists.newArrayList(cloudSdkValue)); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java index 1b396e3e6..8303f3f22 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfByKeyFluentHelper.java @@ -5,50 +5,57 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf + * Shelf} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ -public class ShelfByKeyFluentHelper - extends FluentHelperByKey +public class ShelfByKeyFluentHelper extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity with the provided + * key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent + * helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Shelf} + * Entity Collection to be used to fetch a single {@code Shelf} * @param servicePath - * Service path to be used to fetch a single {@code Shelf} + * Service path to be used to fetch a single {@code Shelf} * @param id - * + * */ public ShelfByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Shelf.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java index 76ee92a38..cb46ff78c 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfCreateFluentHelper.java @@ -5,48 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperCreate; /** - * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system.

+ * Fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity and save it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ShelfCreateFluentHelper - extends FluentHelperCreate +public class ShelfCreateFluentHelper extends FluentHelperCreate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will + * be created in the S/4HANA system. + * */ private final Shelf entity; /** - * Creates a fluent helper object that will create a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will create a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * Entity Collection to direct the create requests to. + * Entity Collection to direct the create requests to. * @param servicePath - * The service path to direct the create requests to. + * The service path to direct the create requests to. * @param entity - * The Shelf to create. + * The Shelf to create. */ public ShelfCreateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Shelf entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Shelf entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Shelf getEntity() { + protected Shelf getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java index b6c3902a3..25997351b 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfDeleteFluentHelper.java @@ -5,48 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperDelete; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperDelete; /** - * Fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system.

+ * Fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf + * Shelf} entity in the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ShelfDeleteFluentHelper - extends FluentHelperDelete +public class ShelfDeleteFluentHelper extends FluentHelperDelete { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will + * be deleted in the S/4HANA system. + * */ private final Shelf entity; /** - * Creates a fluent helper object that will delete a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will delete a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param entityCollection - * The entity collection to direct the update requests to. + * The entity collection to direct the update requests to. * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Shelf to delete from the endpoint. + * The Shelf to delete from the endpoint. */ public ShelfDeleteFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Shelf entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Shelf entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Shelf getEntity() { + protected Shelf getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java index 130b24a92..4e2511bfe 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf + * Shelf} entities. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. + * */ -public class ShelfFluentHelper - extends FluentHelperRead +public class ShelfFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public ShelfFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public ShelfFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Shelf.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java index 0bd66e405..f401060a5 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/ShelfUpdateFluentHelper.java @@ -5,46 +5,50 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; +import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate; /** - * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system.

+ * Fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf + * Shelf} entity and save it to the S/4HANA system. + *

* To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * */ -public class ShelfUpdateFluentHelper - extends FluentHelperUpdate +public class ShelfUpdateFluentHelper extends FluentHelperUpdate { /** - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. - * + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will + * be updated in the S/4HANA system. + * */ private final Shelf entity; /** - * Creates a fluent helper object that will update a {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will update a + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity on the OData + * endpoint. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper + * object. + * * @param servicePath - * The service path to direct the update requests to. + * The service path to direct the update requests to. * @param entity - * The Shelf to take the updated values from. + * The Shelf to take the updated values from. */ public ShelfUpdateFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final Shelf entity, - @Nonnull - final String entityCollection) { + @Nonnull final String servicePath, + @Nonnull final Shelf entity, + @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); this.entity = entity; } @Override @Nonnull - protected Shelf getEntity() { + protected Shelf getEntity() + { return entity; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java index c8ca82972..758f1759e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/Vendor.java @@ -5,8 +5,10 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; import javax.annotation.Nullable; + import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; import com.google.gson.annotations.JsonAdapter; @@ -20,6 +22,7 @@ import com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataField; import com.sap.cloud.sdk.s4hana.datamodel.odata.annotation.Key; import com.sap.cloud.sdk.typeconverter.TypeConverter; + import io.vavr.control.Option; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -31,146 +34,161 @@ import lombok.Setter; import lombok.ToString; - /** - *

Original entity name from the Odata EDM: Vendor

- * + *

+ * Original entity name from the Odata EDM: Vendor + *

+ * */ @Builder @Data @NoArgsConstructor @AllArgsConstructor -@ToString(doNotUseGetters = true, callSuper = true) -@EqualsAndHashCode(doNotUseGetters = true, callSuper = true) -@JsonAdapter(com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class) -public class Vendor - extends VdmEntity +@ToString( doNotUseGetters = true, callSuper = true ) +@EqualsAndHashCode( doNotUseGetters = true, callSuper = true ) +@JsonAdapter( com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.ODataVdmEntityAdapterFactory.class ) +public class Vendor extends VdmEntity { /** * Selector for all available fields of Vendor. - * + * */ public final static VendorSelectable ALL_FIELDS = () -> "*"; /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * - * @return - * The id contained in this entity. + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * + * @return The id contained in this entity. */ @Key - @SerializedName("Id") - @JsonProperty("Id") + @SerializedName( "Id" ) + @JsonProperty( "Id" ) @Nullable - @ODataField(odataName = "Id") + @ODataField( odataName = "Id" ) private Integer id; /** * Use with available fluent helpers to apply the Id field to query operations. - * + * */ public final static VendorField ID = new VendorField("Id"); /** - * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

- * - * @return - * The name contained in this entity. + * Constraints: Not nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ * + * @return The name contained in this entity. */ - @SerializedName("Name") - @JsonProperty("Name") + @SerializedName( "Name" ) + @JsonProperty( "Name" ) @Nullable - @ODataField(odataName = "Name") + @ODataField( odataName = "Name" ) private String name; /** * Use with available fluent helpers to apply the Name field to query operations. - * + * */ public final static VendorField NAME = new VendorField("Name"); /** - * Constraints: Nullable

Original property name from the Odata EDM: AddressId

- * - * @return - * The addressId contained in this entity. + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ * + * @return The addressId contained in this entity. */ - @SerializedName("AddressId") - @JsonProperty("AddressId") + @SerializedName( "AddressId" ) + @JsonProperty( "AddressId" ) @Nullable - @ODataField(odataName = "AddressId") + @ODataField( odataName = "AddressId" ) private Integer addressId; /** * Use with available fluent helpers to apply the AddressId field to query operations. - * + * */ public final static VendorField ADDRESS_ID = new VendorField("AddressId"); /** * Navigation property Address for Vendor to single Address. - * + * */ - @SerializedName("Address") - @JsonProperty("Address") - @ODataField(odataName = "Address") + @SerializedName( "Address" ) + @JsonProperty( "Address" ) + @ODataField( odataName = "Address" ) @Nullable - @Getter(AccessLevel.NONE) - @Setter(AccessLevel.NONE) + @Getter( AccessLevel.NONE ) + @Setter( AccessLevel.NONE ) private Address toAddress; /** * Use with available fluent helpers to apply the Address navigation property to query operations. - * + * */ public final static VendorOneToOneLink
TO_ADDRESS = new VendorOneToOneLink
("Address"); @Nonnull @Override - public Class getType() { + public Class getType() + { return Vendor.class; } /** - * (Key Field) Constraints: Not nullable

Original property name from the Odata EDM: Id

- * + * (Key Field) Constraints: Not nullable + *

+ * Original property name from the Odata EDM: Id + *

+ * * @param id - * The id to set. + * The id to set. */ - public void setId( - @Nullable - final Integer id) { + public void setId( @Nullable final Integer id ) + { rememberChangedField("Id", this.id); this.id = id; } /** - * Constraints: Not nullable, Maximum length: 100

Original property name from the Odata EDM: Name

- * + * Constraints: Not nullable, Maximum length: 100 + *

+ * Original property name from the Odata EDM: Name + *

+ * * @param name - * The name to set. + * The name to set. */ - public void setName( - @Nullable - final String name) { + public void setName( @Nullable final String name ) + { rememberChangedField("Name", this.name); this.name = name; } /** - * Constraints: Nullable

Original property name from the Odata EDM: AddressId

- * + * Constraints: Nullable + *

+ * Original property name from the Odata EDM: AddressId + *

+ * * @param addressId - * The addressId to set. + * The addressId to set. */ - public void setAddressId( - @Nullable - final Integer addressId) { + public void setAddressId( @Nullable final Integer addressId ) + { rememberChangedField("AddressId", this.addressId); this.addressId = addressId; } @Override - protected String getEntityCollection() { + protected String getEntityCollection() + { return "Vendors"; } @Nonnull @Override - protected Map getKey() { + protected Map getKey() + { final Map result = Maps.newLinkedHashMap(); result.put("Id", getId()); return result; @@ -178,7 +196,8 @@ protected Map getKey() { @Nonnull @Override - protected Map toMapOfFields() { + protected Map toMapOfFields() + { final Map cloudSdkValues = super.toMapOfFields(); cloudSdkValues.put("Id", getId()); cloudSdkValues.put("Name", getName()); @@ -187,25 +206,26 @@ protected Map toMapOfFields() { } @Override - protected void fromMap(final Map inputValues) { + protected void fromMap( final Map inputValues ) + { final Map cloudSdkValues = Maps.newLinkedHashMap(inputValues); // simple properties { - if (cloudSdkValues.containsKey("Id")) { + if( cloudSdkValues.containsKey("Id") ) { final Object value = cloudSdkValues.remove("Id"); - if ((value == null)||(!value.equals(getId()))) { + if( (value == null) || (!value.equals(getId())) ) { setId(((Integer) value)); } } - if (cloudSdkValues.containsKey("Name")) { + if( cloudSdkValues.containsKey("Name") ) { final Object value = cloudSdkValues.remove("Name"); - if ((value == null)||(!value.equals(getName()))) { + if( (value == null) || (!value.equals(getName())) ) { setName(((String) value)); } } - if (cloudSdkValues.containsKey("AddressId")) { + if( cloudSdkValues.containsKey("AddressId") ) { final Object value = cloudSdkValues.remove("AddressId"); - if ((value == null)||(!value.equals(getAddressId()))) { + if( (value == null) || (!value.equals(getAddressId())) ) { setAddressId(((Integer) value)); } } @@ -215,14 +235,14 @@ protected void fromMap(final Map inputValues) { } // navigation properties { - if ((cloudSdkValues).containsKey("Address")) { + if( (cloudSdkValues).containsKey("Address") ) { final Object cloudSdkValue = (cloudSdkValues).remove("Address"); - if (cloudSdkValue instanceof Map) { - if (toAddress == null) { + if( cloudSdkValue instanceof Map ) { + if( toAddress == null ) { toAddress = new Address(); } - @SuppressWarnings("unchecked") - final Map inputMap = ((Map ) cloudSdkValue); + @SuppressWarnings( "unchecked" ) + final Map inputMap = ((Map) cloudSdkValue); toAddress.fromMap(inputMap); } } @@ -232,167 +252,177 @@ protected void fromMap(final Map inputValues) { /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param fieldType - * The Java type to use for the extension field when performing value comparisons. - * @return - * A representation of an extension field from this entity. + * The Java type to use for the extension field when performing value comparisons. + * @return A representation of an extension field from this entity. */ @Nonnull - public staticVendorField field( - @Nonnull - final String fieldName, - @Nonnull - final Class fieldType) { + public static VendorField field( @Nonnull final String fieldName, @Nonnull final Class fieldType ) + { return new VendorField(fieldName); } /** * Use with available fluent helpers to apply an extension field to query operations. - * + * * @param typeConverter - * A TypeConverter instance whose first generic type matches the Java type of the field + * A TypeConverter instance whose first generic type matches the Java type of the field * @param fieldName - * The name of the extension field as returned by the OData service. + * The name of the extension field as returned by the OData service. * @param - * The type of the extension field when performing value comparisons. + * The type of the extension field when performing value comparisons. * @param - * The type of the extension field as returned by the OData service. - * @return - * A representation of an extension field from this entity, holding a reference to the given TypeConverter. + * The type of the extension field as returned by the OData service. + * @return A representation of an extension field from this entity, holding a reference to the given TypeConverter. */ @Nonnull - public staticVendorField field( - @Nonnull - final String fieldName, - @Nonnull - final TypeConverter typeConverter) { + public static VendorField field( + @Nonnull final String fieldName, + @Nonnull final TypeConverter typeConverter ) + { return new VendorField(fieldName, typeConverter); } @Override @Nullable - public Destination getDestinationForFetch() { + public Destination getDestinationForFetch() + { return super.getDestinationForFetch(); } @Override - protected void setServicePathForFetch( - @Nullable - final String servicePathForFetch) { + protected void setServicePathForFetch( @Nullable final String servicePathForFetch ) + { super.setServicePathForFetch(servicePathForFetch); } @Override - public void attachToService( - @Nullable - final String servicePath, - @Nonnull - final Destination destination) { + public void attachToService( @Nullable final String servicePath, @Nonnull final Destination destination ) + { super.attachToService(servicePath, destination); } @Override - protected String getDefaultServicePath() { + protected String getDefaultServicePath() + { return (com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } @Nonnull @Override - protected Map toMapOfNavigationProperties() { + protected Map toMapOfNavigationProperties() + { final Map cloudSdkValues = super.toMapOfNavigationProperties(); - if (toAddress!= null) { + if( toAddress != null ) { (cloudSdkValues).put("Address", toAddress); } return cloudSdkValues; } /** - * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData navigation property Address. + * Fetches the Address entity (one to one) associated with this entity. This corresponds to the OData + * navigation property Address. *

* Please note: This method will not cache or persist the query results. - * - * @return - * The single associated Address entity, or {@code null} if an entity is not associated. + * + * @return The single associated Address entity, or {@code null} if an entity is not associated. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Address fetchAddress() { + public Address fetchAddress() + { return fetchFieldAsSingle("Address", Address.class); } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property + * Address. *

- * If the navigation property Address of a queried Vendor is operated lazily, an ODataException can be thrown in case of an OData query error. + * If the navigation property Address of a queried Vendor is operated lazily, an ODataException + * can be thrown in case of an OData query error. *

- * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations. - * - * @return - * List of associated Address entity. + * Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and + * persisting of items from a navigation property. If a lazy property is requested by the application for the + * first time and it has not yet been loaded, an OData query will be run in order to load the missing information + * and its result will get cached for future invocations. + * + * @return List of associated Address entity. * @throws ODataException - * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call. + * If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and + * therefore has no ERP configuration context assigned. An entity is managed if it has been either + * retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or + * UPDATE call. */ @Nullable - public Address getAddressOrFetch() { - if (toAddress == null) { + public Address getAddressOrFetch() + { + if( toAddress == null ) { toAddress = fetchAddress(); } return toAddress; } /** - * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property Address. + * Retrieval of associated Address entity (one to one). This corresponds to the OData navigation property + * Address. *

- * If the navigation property for an entity Vendor has not been resolved yet, this method will not query further information. Instead its Option result state will be empty. - * - * @return - * If the information for navigation property Address is already loaded, the result will contain the Address entity. If not, an Option with result state empty is returned. + * If the navigation property for an entity Vendor has not been resolved yet, this method will not + * query further information. Instead its Option result state will be empty. + * + * @return If the information for navigation property Address is already loaded, the result will contain the + * Address entity. If not, an Option with result state empty is returned. */ @Nonnull - public Option

getAddressIfPresent() { + public Option
getAddressIfPresent() + { return Option.of(toAddress); } /** * Overwrites the associated Address entity for the loaded navigation property Address. - * + * * @param cloudSdkValue - * New Address entity. + * New Address entity. */ - public void setAddress(final Address cloudSdkValue) { + public void setAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; } - /** * Helper class to allow for fluent creation of Vendor instances. - * + * */ - public final static class VendorBuilder { + public final static class VendorBuilder + { private Address toAddress; - private Vendor.VendorBuilder toAddress(final Address cloudSdkValue) { + private Vendor.VendorBuilder toAddress( final Address cloudSdkValue ) + { toAddress = cloudSdkValue; return this; } /** * Navigation property Address for Vendor to single Address. - * + * * @param cloudSdkValue - * The Address to build this Vendor with. - * @return - * This Builder to allow for a fluent interface. + * The Address to build this Vendor with. + * @return This Builder to allow for a fluent interface. */ @Nonnull - public Vendor.VendorBuilder address(final Address cloudSdkValue) { + public Vendor.VendorBuilder address( final Address cloudSdkValue ) + { return toAddress(cloudSdkValue); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java index 25a1c4659..3c2e288b4 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorByKeyFluentHelper.java @@ -5,50 +5,57 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import java.util.Map; + import javax.annotation.Nonnull; + import com.google.common.collect.Maps; import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperByKey; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; - /** - * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor + * Vendor} entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. + * */ -public class VendorByKeyFluentHelper - extends FluentHelperByKey +public class VendorByKeyFluentHelper extends FluentHelperByKey { private final Map key = Maps.newLinkedHashMap(); /** - * Creates a fluent helper object that will fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity with the provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the fluent helper object. - * + * Creates a fluent helper object that will fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity with the + * provided key field values. To perform execution, call the {@link #executeRequest executeRequest} method on the + * fluent helper object. + * * @param entityCollection - * Entity Collection to be used to fetch a single {@code Vendor} + * Entity Collection to be used to fetch a single {@code Vendor} * @param servicePath - * Service path to be used to fetch a single {@code Vendor} + * Service path to be used to fetch a single {@code Vendor} * @param id - * + * */ public VendorByKeyFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection, final Integer id) { + @Nonnull final String servicePath, + @Nonnull final String entityCollection, + final Integer id ) + { super(servicePath, entityCollection); this.key.put("Id", id); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Vendor.class; } @Override @Nonnull - protected Map getKey() { + protected Map getKey() + { return key; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java index 4d3394315..5b11850a3 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/VendorFluentHelper.java @@ -5,38 +5,36 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; - /** - * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. - * + * Fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor + * Vendor} entities. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. + * */ -public class VendorFluentHelper - extends FluentHelperRead +public class VendorFluentHelper extends FluentHelperRead { - /** * Creates a fluent helper using the specified service path and entity collection to send the read requests. - * + * * @param entityCollection - * The entity collection to direct the requests to. + * The entity collection to direct the requests to. * @param servicePath - * The service path to direct the read requests to. + * The service path to direct the read requests to. */ - public VendorFluentHelper( - @Nonnull - final String servicePath, - @Nonnull - final String entityCollection) { + public VendorFluentHelper( @Nonnull final String servicePath, @Nonnull final String entityCollection ) + { super(servicePath, entityCollection); } @Override @Nonnull - protected Class getEntityClass() { + protected Class getEntityClass() + { return Vendor.class; } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java index 294896d44..adc6a950c 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatch.java @@ -5,16 +5,20 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch; import javax.annotation.Nonnull; -import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchFluentHelperBasic; +import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchFluentHelperBasic; /** - * Default implementation of the {@link SdkGroceryStoreServiceBatch} interface exposed in the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}, allowing you to create multiple changesets and finally execute the batch request. - * + * Default implementation of the {@link SdkGroceryStoreServiceBatch} interface exposed in the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}, allowing you + * to create multiple changesets and finally execute the batch request. + * */ public class DefaultSdkGroceryStoreServiceBatch - extends BatchFluentHelperBasic - implements SdkGroceryStoreServiceBatch + extends + BatchFluentHelperBasic + implements + SdkGroceryStoreServiceBatch { @Nonnull @@ -24,48 +28,50 @@ public class DefaultSdkGroceryStoreServiceBatch /** * Creates a new instance of this DefaultSdkGroceryStoreServiceBatch. - * + * * @param service - * The service to execute all operations in this changeset on. + * The service to execute all operations in this changeset on. */ public DefaultSdkGroceryStoreServiceBatch( - @Nonnull - final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service) { + @Nonnull final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service ) + { this(service, com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService.DEFAULT_SERVICE_PATH); } /** * Creates a new instance of this DefaultSdkGroceryStoreServiceBatch. - * + * * @param service - * The service to execute all operations in this changeset on. + * The service to execute all operations in this changeset on. * @param servicePath - * The custom service path to operate on. + * The custom service path to operate on. */ public DefaultSdkGroceryStoreServiceBatch( - @Nonnull - final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service, - @Nonnull - final String servicePath) { + @Nonnull final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service, + @Nonnull final String servicePath ) + { this.service = service; this.servicePath = servicePath; } @Nonnull @Override - protected String getServicePathForBatchRequest() { + protected String getServicePathForBatchRequest() + { return servicePath; } @Nonnull @Override - protected DefaultSdkGroceryStoreServiceBatch getThis() { + protected DefaultSdkGroceryStoreServiceBatch getThis() + { return this; } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet beginChangeSet() { + public SdkGroceryStoreServiceBatchChangeSet beginChangeSet() + { return new DefaultSdkGroceryStoreServiceBatchChangeSet(this, service); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java index 79766fdd4..56ece6e0f 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/DefaultSdkGroceryStoreServiceBatchChangeSet.java @@ -5,6 +5,7 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchChangeSetFluentHelperBasic; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; @@ -13,119 +14,111 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; - /** - * Implementation of the {@link SdkGroceryStoreServiceBatchChangeSet} interface, enabling you to combine multiple operations into one changeset. For further information have a look into the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. - * + * Implementation of the {@link SdkGroceryStoreServiceBatchChangeSet} interface, enabling you to combine multiple + * operations into one changeset. For further information have a look into the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. + * */ public class DefaultSdkGroceryStoreServiceBatchChangeSet - extends BatchChangeSetFluentHelperBasic - implements SdkGroceryStoreServiceBatchChangeSet + extends + BatchChangeSetFluentHelperBasic + implements + SdkGroceryStoreServiceBatchChangeSet { @Nonnull private final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service; DefaultSdkGroceryStoreServiceBatchChangeSet( - @Nonnull - final DefaultSdkGroceryStoreServiceBatch batchFluentHelper, - @Nonnull - final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service) { + @Nonnull final DefaultSdkGroceryStoreServiceBatch batchFluentHelper, + @Nonnull final com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService service ) + { super(batchFluentHelper, batchFluentHelper); this.service = service; } @Nonnull @Override - protected DefaultSdkGroceryStoreServiceBatchChangeSet getThis() { + protected DefaultSdkGroceryStoreServiceBatchChangeSet getThis() + { return this; } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createCustomer( - @Nonnull - final Customer customer) { + public SdkGroceryStoreServiceBatchChangeSet createCustomer( @Nonnull final Customer customer ) + { return addRequestCreate(service::createCustomer, customer); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createProduct( - @Nonnull - final Product product) { + public SdkGroceryStoreServiceBatchChangeSet createProduct( @Nonnull final Product product ) + { return addRequestCreate(service::createProduct, product); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateProduct( - @Nonnull - final Product product) { + public SdkGroceryStoreServiceBatchChangeSet updateProduct( @Nonnull final Product product ) + { return addRequestUpdate(service::updateProduct, product); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createReceipt( - @Nonnull - final Receipt receipt) { + public SdkGroceryStoreServiceBatchChangeSet createReceipt( @Nonnull final Receipt receipt ) + { return addRequestCreate(service::createReceipt, receipt); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createAddress( - @Nonnull - final Address address) { + public SdkGroceryStoreServiceBatchChangeSet createAddress( @Nonnull final Address address ) + { return addRequestCreate(service::createAddress, address); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateAddress( - @Nonnull - final Address address) { + public SdkGroceryStoreServiceBatchChangeSet updateAddress( @Nonnull final Address address ) + { return addRequestUpdate(service::updateAddress, address); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet deleteAddress( - @Nonnull - final Address address) { + public SdkGroceryStoreServiceBatchChangeSet deleteAddress( @Nonnull final Address address ) + { return addRequestDelete(service::deleteAddress, address); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet createShelf( - @Nonnull - final Shelf shelf) { + public SdkGroceryStoreServiceBatchChangeSet createShelf( @Nonnull final Shelf shelf ) + { return addRequestCreate(service::createShelf, shelf); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateShelf( - @Nonnull - final Shelf shelf) { + public SdkGroceryStoreServiceBatchChangeSet updateShelf( @Nonnull final Shelf shelf ) + { return addRequestUpdate(service::updateShelf, shelf); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet deleteShelf( - @Nonnull - final Shelf shelf) { + public SdkGroceryStoreServiceBatchChangeSet deleteShelf( @Nonnull final Shelf shelf ) + { return addRequestDelete(service::deleteShelf, shelf); } @Nonnull @Override - public SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( - @Nonnull - final OpeningHours openingHours) { + public SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( @Nonnull final OpeningHours openingHours ) + { return addRequestUpdate(service::updateOpeningHours, openingHours); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java index 31ff446be..e0fd008a0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatch.java @@ -6,14 +6,14 @@ import com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperServiceBatch; - /** - * Interface to the batch object of an {@code com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService} service. - * + * Interface to the batch object of an + * {@code com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService} service. + * */ public interface SdkGroceryStoreServiceBatch - extends FluentHelperServiceBatch + extends + FluentHelperServiceBatch { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java index 9130ba400..6c4d7ae35 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/batch/SdkGroceryStoreServiceBatchChangeSet.java @@ -5,6 +5,7 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperBatchChangeSet; import com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperBatchEndChangeSet; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; @@ -14,157 +15,158 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; - /** - * This interface enables you to combine multiple operations into one change set. For further information have a look into the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. - * + * This interface enables you to combine multiple operations into one change set. For further information have a look + * into the {@link com.sap.cloud.sdk.datamodel.odata.sample.services.SdkGroceryStoreService SdkGroceryStoreService}. + * */ public interface SdkGroceryStoreServiceBatchChangeSet - extends FluentHelperBatchChangeSet , FluentHelperBatchEndChangeSet + extends + FluentHelperBatchChangeSet, + FluentHelperBatchEndChangeSet { - /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * object that will be created in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createCustomer( - @Nonnull - final Customer customer); + SdkGroceryStoreServiceBatchChangeSet createCustomer( @Nonnull final Customer customer ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be created in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createProduct( - @Nonnull - final Product product); + SdkGroceryStoreServiceBatchChangeSet createProduct( @Nonnull final Product product ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} + * entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be updated in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateProduct( - @Nonnull - final Product product); + SdkGroceryStoreServiceBatchChangeSet updateProduct( @Nonnull final Product product ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * object that will be created in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createReceipt( - @Nonnull - final Receipt receipt); + SdkGroceryStoreServiceBatchChangeSet createReceipt( @Nonnull final Receipt receipt ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be created in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createAddress( - @Nonnull - final Address address); + SdkGroceryStoreServiceBatchChangeSet createAddress( @Nonnull final Address address ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} + * entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be updated in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateAddress( - @Nonnull - final Address address); + SdkGroceryStoreServiceBatchChangeSet updateAddress( @Nonnull final Address address ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} + * entity in the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be deleted in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet deleteAddress( - @Nonnull - final Address address); + SdkGroceryStoreServiceBatchChangeSet deleteAddress( @Nonnull final Address address ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and + * save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object + * that will be created in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet createShelf( - @Nonnull - final Shelf shelf); + SdkGroceryStoreServiceBatchChangeSet createShelf( @Nonnull final Shelf shelf ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object + * that will be updated in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateShelf( - @Nonnull - final Shelf shelf); + SdkGroceryStoreServiceBatchChangeSet updateShelf( @Nonnull final Shelf shelf ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object + * that will be deleted in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet deleteShelf( - @Nonnull - final Shelf shelf); + SdkGroceryStoreServiceBatchChangeSet deleteShelf( @Nonnull final Shelf shelf ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. - * @return - * This fluent helper to continue adding operations to the change set. To finalize the current change set call {@link #endChangeSet endChangeSet} on the returned fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity object that will be updated in the S/4HANA system. + * @return This fluent helper to continue adding operations to the change set. To finalize the current change set + * call {@link #endChangeSet endChangeSet} on the returned fluent helper object. */ @Nonnull - SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( - @Nonnull - final OpeningHours openingHours); + SdkGroceryStoreServiceBatchChangeSet updateOpeningHours( @Nonnull final OpeningHours openingHours ); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java index d1185198a..209f047c0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/AddressField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. Instances of this object + * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a + * provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class AddressField - extends EntityField - implements AddressSelectable +public class AddressField extends EntityField implements AddressSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public AddressField(final String fieldName) { + public AddressField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public AddressField(final String fieldName, final TypeConverter typeConverter) { + public AddressField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java index 7b886678f..727405a04 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/CustomerField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. Instances of this + * object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value + * with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class CustomerField - extends EntityField - implements CustomerSelectable +public class CustomerField extends EntityField implements CustomerSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public CustomerField(final String fieldName) { + public CustomerField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public CustomerField(final String fieldName, final TypeConverter typeConverter) { + public CustomerField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java index 70a244aff..6e5bb4d87 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/FloorPlanField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. Instances of this + * object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value + * with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class FloorPlanField - extends EntityField - implements FloorPlanSelectable +public class FloorPlanField extends EntityField implements FloorPlanSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public FloorPlanField(final String fieldName) { + public FloorPlanField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public FloorPlanField(final String fieldName, final TypeConverter typeConverter) { + public FloorPlanField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java index ef5fdc617..c184120b6 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/OpeningHoursField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. Instances of + * this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's + * value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class OpeningHoursField - extends EntityField - implements OpeningHoursSelectable +public class OpeningHoursField extends EntityField implements OpeningHoursSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursField(final String fieldName) { + public OpeningHoursField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursField(final String fieldName, final TypeConverter typeConverter) { + public OpeningHoursField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java index 2bc507e75..245997532 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ProductField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. Instances of this object + * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a + * provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class ProductField - extends EntityField - implements ProductSelectable +public class ProductField extends EntityField implements ProductSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ProductField(final String fieldName) { + public ProductField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ProductField(final String fieldName, final TypeConverter typeConverter) { + public ProductField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java index aaa7daced..2c8531115 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ReceiptField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. Instances of this object + * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a + * provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class ReceiptField - extends EntityField - implements ReceiptSelectable +public class ReceiptField extends EntityField implements ReceiptSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ReceiptField(final String fieldName) { + public ReceiptField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ReceiptField(final String fieldName, final TypeConverter typeConverter) { + public ReceiptField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java index 69722b97e..8e8f7b548 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/ShelfField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. Instances of this object are + * used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a + * provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class ShelfField - extends EntityField - implements ShelfSelectable +public class ShelfField extends EntityField implements ShelfSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ShelfField(final String fieldName) { + public ShelfField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public ShelfField(final String fieldName, final TypeConverter typeConverter) { + public ShelfField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java index 61671adf8..bc2347ede 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/field/VendorField.java @@ -9,43 +9,48 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; import com.sap.cloud.sdk.typeconverter.TypeConverter; - /** - * Template class to represent entity fields of the Entity {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity fields of the Entity + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. Instances of this object + * are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's value with a + * provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Field type - * + * Field type + * */ -public class VendorField - extends EntityField - implements VendorSelectable +public class VendorField extends EntityField implements VendorSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public VendorField(final String fieldName) { + public VendorField( final String fieldName ) + { super(fieldName); } /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to add a type converter that will be automatically used by the respective entity when getting or setting custom fields. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution.When creating instances for custom fields, this constructor can be used to + * add a type converter that will be automatically used by the respective entity when getting or setting custom + * fields. + * * @param typeConverter - * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the type Olingo returns. + * An implementation of a TypeConverter. The first type must match FieldT, the second type must match the + * type Olingo returns. * @param fieldName - * OData field name. Must match the field returned by the underlying OData service. + * OData field name. Must match the field returned by the underlying OData service. */ - public VendorField(final String fieldName, final TypeConverter typeConverter) { + public VendorField( final String fieldName, final TypeConverter typeConverter ) + { super(fieldName, typeConverter); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java index 4651ea1fd..645b60ddf 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressLink.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.AddressSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities. + * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare + * a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class AddressLink > - extends EntityLink , Address, ObjectT> - implements AddressSelectable +public class AddressLink> extends EntityLink, Address, ObjectT> + implements + AddressSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public AddressLink(final String fieldName) { + public AddressLink( final String fieldName ) + { super(fieldName); } - private AddressLink(final EntityLink , Address, ObjectT> toClone) { + private AddressLink( final EntityLink, Address, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected AddressLink translateLinkType(final EntityLink , Address, ObjectT> link) { + protected AddressLink translateLinkType( final EntityLink, Address, ObjectT> link ) + { return new AddressLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java index 1fbf5c4b9..d2e2bb4a0 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/AddressOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} to other entities, where + * the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink} and provides + * an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class AddressOneToOneLink > - extends AddressLink - implements OneToOneLink +public class AddressOneToOneLink> extends AddressLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public AddressOneToOneLink(final String fieldName) { + public AddressOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper
filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper
filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java index f2994c233..b5a439567 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerLink.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.CustomerSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities. + * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare + * a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class CustomerLink > - extends EntityLink , Customer, ObjectT> - implements CustomerSelectable +public class CustomerLink> extends EntityLink, Customer, ObjectT> + implements + CustomerSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public CustomerLink(final String fieldName) { + public CustomerLink( final String fieldName ) + { super(fieldName); } - private CustomerLink(final EntityLink , Customer, ObjectT> toClone) { + private CustomerLink( final EntityLink, Customer, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected CustomerLink translateLinkType(final EntityLink , Customer, ObjectT> link) { + protected CustomerLink translateLinkType( final EntityLink, Customer, ObjectT> link ) + { return new CustomerLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java index 2d0c2ae57..41993217d 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/CustomerOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} to other entities, + * where the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink} and + * provides an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class CustomerOneToOneLink > - extends CustomerLink - implements OneToOneLink +public class CustomerOneToOneLink> extends CustomerLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public CustomerOneToOneLink(final String fieldName) { + public CustomerOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java index 1057e5b6a..42da4b121 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanLink.java @@ -5,46 +5,52 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.FloorPlanSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities. + * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare + * a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class FloorPlanLink > - extends EntityLink , FloorPlan, ObjectT> - implements FloorPlanSelectable +public class FloorPlanLink> extends EntityLink, FloorPlan, ObjectT> + implements + FloorPlanSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public FloorPlanLink(final String fieldName) { + public FloorPlanLink( final String fieldName ) + { super(fieldName); } - private FloorPlanLink(final EntityLink , FloorPlan, ObjectT> toClone) { + private FloorPlanLink( final EntityLink, FloorPlan, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected FloorPlanLink translateLinkType(final EntityLink , FloorPlan, ObjectT> link) { + protected FloorPlanLink translateLinkType( + final EntityLink, FloorPlan, ObjectT> link ) + { return new FloorPlanLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java index 0c7831383..993567000 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/FloorPlanOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink FloorPlanLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} to other entities, + * where the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink FloorPlanLink} and + * provides an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class FloorPlanOneToOneLink > - extends FloorPlanLink - implements OneToOneLink +public class FloorPlanOneToOneLink> extends FloorPlanLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public FloorPlanOneToOneLink(final String fieldName) { + public FloorPlanOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java index 2e4c9c5e1..5dabccdcc 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursLink.java @@ -5,46 +5,54 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.OpeningHoursSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other + * entities. Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods + * to compare a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class OpeningHoursLink > - extends EntityLink , OpeningHours, ObjectT> - implements OpeningHoursSelectable +public class OpeningHoursLink> + extends + EntityLink, OpeningHours, ObjectT> + implements + OpeningHoursSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursLink(final String fieldName) { + public OpeningHoursLink( final String fieldName ) + { super(fieldName); } - private OpeningHoursLink(final EntityLink , OpeningHours, ObjectT> toClone) { + private OpeningHoursLink( final EntityLink, OpeningHours, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected OpeningHoursLink translateLinkType(final EntityLink , OpeningHours, ObjectT> link) { + protected OpeningHoursLink translateLinkType( + final EntityLink, OpeningHours, ObjectT> link ) + { return new OpeningHoursLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java index 1a79e2cc3..566e2e001 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/OpeningHoursOneToOneLink.java @@ -5,47 +5,54 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} to other + * entities, where the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink} + * and provides an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class OpeningHoursOneToOneLink > - extends OpeningHoursLink - implements OneToOneLink +public class OpeningHoursOneToOneLink> extends OpeningHoursLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public OpeningHoursOneToOneLink(final String fieldName) { + public OpeningHoursOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java index 73ef5e53e..a13a92c9e 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductLink.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ProductSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities. + * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare + * a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ProductLink > - extends EntityLink , Product, ObjectT> - implements ProductSelectable +public class ProductLink> extends EntityLink, Product, ObjectT> + implements + ProductSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ProductLink(final String fieldName) { + public ProductLink( final String fieldName ) + { super(fieldName); } - private ProductLink(final EntityLink , Product, ObjectT> toClone) { + private ProductLink( final EntityLink, Product, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected ProductLink translateLinkType(final EntityLink , Product, ObjectT> link) { + protected ProductLink translateLinkType( final EntityLink, Product, ObjectT> link ) + { return new ProductLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java index 6d662b46d..147781303 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ProductOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} to other entities, where + * the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink} and provides + * an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ProductOneToOneLink > - extends ProductLink - implements OneToOneLink +public class ProductOneToOneLink> extends ProductLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ProductOneToOneLink(final String fieldName) { + public ProductOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java index 524156c44..1b0cf89ba 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptLink.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ReceiptSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities. + * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare + * a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ReceiptLink > - extends EntityLink , Receipt, ObjectT> - implements ReceiptSelectable +public class ReceiptLink> extends EntityLink, Receipt, ObjectT> + implements + ReceiptSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ReceiptLink(final String fieldName) { + public ReceiptLink( final String fieldName ) + { super(fieldName); } - private ReceiptLink(final EntityLink , Receipt, ObjectT> toClone) { + private ReceiptLink( final EntityLink, Receipt, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected ReceiptLink translateLinkType(final EntityLink , Receipt, ObjectT> link) { + protected ReceiptLink translateLinkType( final EntityLink, Receipt, ObjectT> link ) + { return new ReceiptLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java index a0b8c61d9..13a7fa861 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ReceiptOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} to other entities, where + * the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink} and provides + * an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ReceiptOneToOneLink > - extends ReceiptLink - implements OneToOneLink +public class ReceiptOneToOneLink> extends ReceiptLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ReceiptOneToOneLink(final String fieldName) { + public ReceiptOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java index c18ec916d..fd8fe87e7 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfLink.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.ShelfSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities. Instances + * of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare a field's + * value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ShelfLink > - extends EntityLink , Shelf, ObjectT> - implements ShelfSelectable +public class ShelfLink> extends EntityLink, Shelf, ObjectT> + implements + ShelfSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ShelfLink(final String fieldName) { + public ShelfLink( final String fieldName ) + { super(fieldName); } - private ShelfLink(final EntityLink , Shelf, ObjectT> toClone) { + private ShelfLink( final EntityLink, Shelf, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected ShelfLink translateLinkType(final EntityLink , Shelf, ObjectT> link) { + protected ShelfLink translateLinkType( final EntityLink, Shelf, ObjectT> link ) + { return new ShelfLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java index ab4cdac75..9c8296f06 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/ShelfOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} to other entities, where the + * cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink} and provides an + * additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class ShelfOneToOneLink > - extends ShelfLink - implements OneToOneLink +public class ShelfOneToOneLink> extends ShelfLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public ShelfOneToOneLink(final String fieldName) { + public ShelfOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java index 632199902..6703a69cc 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorLink.java @@ -5,46 +5,51 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.EntityLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.selectable.VendorSelectable; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities. Instances of this object are used in query modifier methods of the entity - * fluent helpers. Contains methods to compare a field's value with a provided value. - * + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities. + * Instances of this object are used in query modifier methods of the entity fluent helpers. Contains methods to compare + * a field's value with a provided value. + * * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData * field names, so use the constructor with caution. - * + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class VendorLink > - extends EntityLink , Vendor, ObjectT> - implements VendorSelectable +public class VendorLink> extends EntityLink, Vendor, ObjectT> + implements + VendorSelectable { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public VendorLink(final String fieldName) { + public VendorLink( final String fieldName ) + { super(fieldName); } - private VendorLink(final EntityLink , Vendor, ObjectT> toClone) { + private VendorLink( final EntityLink, Vendor, ObjectT> toClone ) + { super(toClone); } @Nonnull @Override - protected VendorLink translateLinkType(final EntityLink , Vendor, ObjectT> link) { + protected VendorLink translateLinkType( final EntityLink, Vendor, ObjectT> link ) + { return new VendorLink(link); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java index 2e2998e78..cdae3b110 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/link/VendorOneToOneLink.java @@ -5,47 +5,53 @@ package com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link; import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.ExpressionFluentHelper; import com.sap.cloud.sdk.datamodel.odata.helper.OneToOneLink; import com.sap.cloud.sdk.datamodel.odata.helper.VdmObject; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor; - /** - * Template class to represent entity navigation links of {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities, where the cardinality of the related entity is at most 1. This class extends {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink} and provides an additional filter function. + * Template class to represent entity navigation links of + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} to other entities, where + * the cardinality of the related entity is at most 1. This class extends + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink} and provides + * an additional filter function. + * * @param - * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. - * + * Entity type of subclasses from {@link com.sap.cloud.sdk.datamodel.odata.helper.VdmObject VdmObject}. + * */ -public class VendorOneToOneLink > - extends VendorLink - implements OneToOneLink +public class VendorOneToOneLink> extends VendorLink + implements + OneToOneLink { - /** - * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying OData field names, so use with caution. - * + * Use the constants declared in each entity inner class. Instantiating directly requires knowing the underlying + * OData field names, so use with caution. + * * @param fieldName - * OData navigation field name. Must match the field returned by the underlying OData service. + * OData navigation field name. Must match the field returned by the underlying OData service. */ - public VendorOneToOneLink(final String fieldName) { + public VendorOneToOneLink( final String fieldName ) + { super(fieldName); } /** - * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a related entity) evaluates to true. Note that filtering on a related entity does not expand the selection of the respective query to that entity. - * + * Query modifier to restrict the result set to entities for which this expression (formulated over a property of a + * related entity) evaluates to true. Note that filtering on a related entity does not expand the selection + * of the respective query to that entity. + * * @param filterExpression - * A filter expression on the related entity. - * @return - * A filter expression over a related entity, scoped to the parent entity. + * A filter expression on the related entity. + * @return A filter expression over a related entity, scoped to the parent entity. */ @Nonnull @Override - public ExpressionFluentHelper filter( - @Nonnull - final ExpressionFluentHelper filterExpression) { + public ExpressionFluentHelper filter( @Nonnull final ExpressionFluentHelper filterExpression ) + { return super.filterOnOneToOneLink(filterExpression); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java index 6b9309499..d3336352f 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/AddressSelectable.java @@ -7,11 +7,14 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.AddressField AddressField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address}. This interface is used + * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.AddressField AddressField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.AddressLink AddressLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#STREET STREET}
  • @@ -22,11 +25,9 @@ *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#LATITUDE LATITUDE}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address#LONGITUDE LONGITUDE}
  • *
- * + * */ -public interface AddressSelectable - extends EntitySelectable
+public interface AddressSelectable extends EntitySelectable
{ - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java index 7db625d89..75f72c266 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/CustomerSelectable.java @@ -7,11 +7,14 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.CustomerField CustomerField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer}. This interface is used + * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.CustomerField CustomerField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.CustomerLink CustomerLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#NAME NAME}
  • @@ -19,11 +22,9 @@ *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#ADDRESS_ID ADDRESS_ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer#TO_ADDRESS TO_ADDRESS}
  • *
- * + * */ -public interface CustomerSelectable - extends EntitySelectable +public interface CustomerSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java index edcf26ef6..ea50ca9d8 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/FloorPlanSelectable.java @@ -7,20 +7,22 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.FloorPlanField FloorPlanField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink FloorPlanLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan}. This interface is + * used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.FloorPlanField + * FloorPlanField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.FloorPlanLink + * FloorPlanLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan#IMAGE_URI IMAGE_URI}
  • *
- * + * */ -public interface FloorPlanSelectable - extends EntitySelectable +public interface FloorPlanSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java index 0c11f0cb5..352cfe404 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/OpeningHoursSelectable.java @@ -7,22 +7,26 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.OpeningHoursField OpeningHoursField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours}. This interface + * is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.OpeningHoursField + * OpeningHoursField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.OpeningHoursLink OpeningHoursLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#ID ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#DAY_OF_WEEK DAY_OF_WEEK}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#DAY_OF_WEEK + * DAY_OF_WEEK}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#OPEN_TIME OPEN_TIME}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#CLOSE_TIME CLOSE_TIME}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours#CLOSE_TIME + * CLOSE_TIME}
  • *
- * + * */ -public interface OpeningHoursSelectable - extends EntitySelectable +public interface OpeningHoursSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java index 1357a6ddc..82e522e6c 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ProductSelectable.java @@ -7,11 +7,14 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ProductField ProductField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product}. This interface is used + * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ProductField ProductField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ProductLink ProductLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#NAME NAME}
  • @@ -22,11 +25,9 @@ *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#TO_VENDOR TO_VENDOR}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product#TO_SHELF TO_SHELF}
  • *
- * + * */ -public interface ProductSelectable - extends EntitySelectable +public interface ProductSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java index 531e708e0..23abc7fae 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ReceiptSelectable.java @@ -7,22 +7,24 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ReceiptField ReceiptField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt}. This interface is used + * by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ReceiptField ReceiptField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ReceiptLink ReceiptLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#CUSTOMER_ID CUSTOMER_ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#TOTAL_AMOUNT TOTAL_AMOUNT}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#TOTAL_AMOUNT + * TOTAL_AMOUNT}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt#TO_CUSTOMER TO_CUSTOMER}
  • *
- * + * */ -public interface ReceiptSelectable - extends EntitySelectable +public interface ReceiptSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java index 5ce456211..f06cad99a 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/ShelfSelectable.java @@ -7,22 +7,25 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ShelfField ShelfField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf}. This interface is used by + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.ShelfField ShelfField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.ShelfLink ShelfLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#ID ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#FLOOR_PLAN_ID FLOOR_PLAN_ID}
  • - *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#TO_FLOOR_PLAN TO_FLOOR_PLAN}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#FLOOR_PLAN_ID + * FLOOR_PLAN_ID}
  • + *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#TO_FLOOR_PLAN + * TO_FLOOR_PLAN}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf#TO_PRODUCTS TO_PRODUCTS}
  • *
- * + * */ -public interface ShelfSelectable - extends EntitySelectable +public interface ShelfSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java index 5327fe557..28e956abf 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/namespaces/sdkgrocerystore/selectable/VendorSelectable.java @@ -7,22 +7,23 @@ import com.sap.cloud.sdk.datamodel.odata.helper.EntitySelectable; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor; - /** - * Interface to enable OData entity selectors for {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. This interface is used by {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.VendorField VendorField} and {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink}. - * - *

Available instances: + * Interface to enable OData entity selectors for + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor}. This interface is used by + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.field.VendorField VendorField} and + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.link.VendorLink VendorLink}. + * + *

+ * Available instances: *

    *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#ID ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#NAME NAME}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#ADDRESS_ID ADDRESS_ID}
  • *
  • {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor#TO_ADDRESS TO_ADDRESS}
  • *
- * + * */ -public interface VendorSelectable - extends EntitySelectable +public interface VendorSelectable extends EntitySelectable { - } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java index 151a58670..d54a8cad6 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/DefaultSdkGroceryStoreService.java @@ -5,7 +5,9 @@ package com.sap.cloud.sdk.datamodel.odata.sample.services; import java.time.LocalDateTime; + import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressCreateFluentHelper; @@ -46,13 +48,17 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch.DefaultSdkGroceryStoreServiceBatch; - /** - *

Details:

OData Service:SDK_Grocery_Store
- * + *

Details:

+ * + * + * + * + * + *
OData Service:SDK_Grocery_Store
+ * */ -public class DefaultSdkGroceryStoreService - implements SdkGroceryStoreService +public class DefaultSdkGroceryStoreService implements SdkGroceryStoreService { @Nonnull @@ -60,9 +66,10 @@ public class DefaultSdkGroceryStoreService /** * Creates a service using {@link SdkGroceryStoreService#DEFAULT_SERVICE_PATH} to send the requests. - * + * */ - public DefaultSdkGroceryStoreService() { + public DefaultSdkGroceryStoreService() + { servicePath = SdkGroceryStoreService.DEFAULT_SERVICE_PATH; } @@ -70,255 +77,253 @@ public DefaultSdkGroceryStoreService() { * Creates a service using the provided service path to send the requests. *

* Used by the fluent {@link #withServicePath(String)} method. - * + * */ - private DefaultSdkGroceryStoreService( - @Nonnull - final String servicePath) { + private DefaultSdkGroceryStoreService( @Nonnull final String servicePath ) + { this.servicePath = servicePath; } @Override @Nonnull - public DefaultSdkGroceryStoreService withServicePath( - @Nonnull - final String servicePath) { + public DefaultSdkGroceryStoreService withServicePath( @Nonnull final String servicePath ) + { return new DefaultSdkGroceryStoreService(servicePath); } @Override @Nonnull - public DefaultSdkGroceryStoreServiceBatch batch() { + public DefaultSdkGroceryStoreServiceBatch batch() + { return new DefaultSdkGroceryStoreServiceBatch(this, servicePath); } @Override @Nonnull - public CustomerFluentHelper getAllCustomer() { + public CustomerFluentHelper getAllCustomer() + { return new CustomerFluentHelper(servicePath, "Customers"); } @Override @Nonnull - public CustomerByKeyFluentHelper getCustomerByKey(final Integer id) { + public CustomerByKeyFluentHelper getCustomerByKey( final Integer id ) + { return new CustomerByKeyFluentHelper(servicePath, "Customers", id); } @Override @Nonnull - public CustomerCreateFluentHelper createCustomer( - @Nonnull - final Customer customer) { + public CustomerCreateFluentHelper createCustomer( @Nonnull final Customer customer ) + { return new CustomerCreateFluentHelper(servicePath, customer, "Customers"); } @Override @Nonnull - public ProductFluentHelper getAllProduct() { + public ProductFluentHelper getAllProduct() + { return new ProductFluentHelper(servicePath, "Products"); } @Override @Nonnull - public ProductByKeyFluentHelper getProductByKey(final Integer id) { + public ProductByKeyFluentHelper getProductByKey( final Integer id ) + { return new ProductByKeyFluentHelper(servicePath, "Products", id); } @Override @Nonnull - public ProductCreateFluentHelper createProduct( - @Nonnull - final Product product) { + public ProductCreateFluentHelper createProduct( @Nonnull final Product product ) + { return new ProductCreateFluentHelper(servicePath, product, "Products"); } @Override @Nonnull - public ProductUpdateFluentHelper updateProduct( - @Nonnull - final Product product) { + public ProductUpdateFluentHelper updateProduct( @Nonnull final Product product ) + { return new ProductUpdateFluentHelper(servicePath, product, "Products"); } @Override @Nonnull - public ReceiptFluentHelper getAllReceipt() { + public ReceiptFluentHelper getAllReceipt() + { return new ReceiptFluentHelper(servicePath, "Receipts"); } @Override @Nonnull - public ReceiptByKeyFluentHelper getReceiptByKey(final Integer id) { + public ReceiptByKeyFluentHelper getReceiptByKey( final Integer id ) + { return new ReceiptByKeyFluentHelper(servicePath, "Receipts", id); } @Override @Nonnull - public ReceiptCreateFluentHelper createReceipt( - @Nonnull - final Receipt receipt) { + public ReceiptCreateFluentHelper createReceipt( @Nonnull final Receipt receipt ) + { return new ReceiptCreateFluentHelper(servicePath, receipt, "Receipts"); } @Override @Nonnull - public AddressFluentHelper getAllAddress() { + public AddressFluentHelper getAllAddress() + { return new AddressFluentHelper(servicePath, "Addresses"); } @Override @Nonnull - public AddressByKeyFluentHelper getAddressByKey(final Integer id) { + public AddressByKeyFluentHelper getAddressByKey( final Integer id ) + { return new AddressByKeyFluentHelper(servicePath, "Addresses", id); } @Override @Nonnull - public AddressCreateFluentHelper createAddress( - @Nonnull - final Address address) { + public AddressCreateFluentHelper createAddress( @Nonnull final Address address ) + { return new AddressCreateFluentHelper(servicePath, address, "Addresses"); } @Override @Nonnull - public AddressUpdateFluentHelper updateAddress( - @Nonnull - final Address address) { + public AddressUpdateFluentHelper updateAddress( @Nonnull final Address address ) + { return new AddressUpdateFluentHelper(servicePath, address, "Addresses"); } @Override @Nonnull - public AddressDeleteFluentHelper deleteAddress( - @Nonnull - final Address address) { + public AddressDeleteFluentHelper deleteAddress( @Nonnull final Address address ) + { return new AddressDeleteFluentHelper(servicePath, address, "Addresses"); } @Override @Nonnull - public ShelfFluentHelper getAllShelf() { + public ShelfFluentHelper getAllShelf() + { return new ShelfFluentHelper(servicePath, "Shelves"); } @Override @Nonnull - public ShelfByKeyFluentHelper getShelfByKey(final Integer id) { + public ShelfByKeyFluentHelper getShelfByKey( final Integer id ) + { return new ShelfByKeyFluentHelper(servicePath, "Shelves", id); } @Override @Nonnull - public ShelfCreateFluentHelper createShelf( - @Nonnull - final Shelf shelf) { + public ShelfCreateFluentHelper createShelf( @Nonnull final Shelf shelf ) + { return new ShelfCreateFluentHelper(servicePath, shelf, "Shelves"); } @Override @Nonnull - public ShelfUpdateFluentHelper updateShelf( - @Nonnull - final Shelf shelf) { + public ShelfUpdateFluentHelper updateShelf( @Nonnull final Shelf shelf ) + { return new ShelfUpdateFluentHelper(servicePath, shelf, "Shelves"); } @Override @Nonnull - public ShelfDeleteFluentHelper deleteShelf( - @Nonnull - final Shelf shelf) { + public ShelfDeleteFluentHelper deleteShelf( @Nonnull final Shelf shelf ) + { return new ShelfDeleteFluentHelper(servicePath, shelf, "Shelves"); } @Override @Nonnull - public OpeningHoursFluentHelper getAllOpeningHours() { + public OpeningHoursFluentHelper getAllOpeningHours() + { return new OpeningHoursFluentHelper(servicePath, "OpeningHours"); } @Override @Nonnull - public OpeningHoursByKeyFluentHelper getOpeningHoursByKey(final Integer id) { + public OpeningHoursByKeyFluentHelper getOpeningHoursByKey( final Integer id ) + { return new OpeningHoursByKeyFluentHelper(servicePath, "OpeningHours", id); } @Override @Nonnull - public OpeningHoursUpdateFluentHelper updateOpeningHours( - @Nonnull - final OpeningHours openingHours) { + public OpeningHoursUpdateFluentHelper updateOpeningHours( @Nonnull final OpeningHours openingHours ) + { return new OpeningHoursUpdateFluentHelper(servicePath, openingHours, "OpeningHours"); } @Override @Nonnull - public VendorFluentHelper getAllVendor() { + public VendorFluentHelper getAllVendor() + { return new VendorFluentHelper(servicePath, "Vendors"); } @Override @Nonnull - public VendorByKeyFluentHelper getVendorByKey(final Integer id) { + public VendorByKeyFluentHelper getVendorByKey( final Integer id ) + { return new VendorByKeyFluentHelper(servicePath, "Vendors", id); } @Override @Nonnull - public FloorPlanFluentHelper getAllFloorPlan() { + public FloorPlanFluentHelper getAllFloorPlan() + { return new FloorPlanFluentHelper(servicePath, "Floors"); } @Override @Nonnull - public FloorPlanByKeyFluentHelper getFloorPlanByKey(final Integer id) { + public FloorPlanByKeyFluentHelper getFloorPlanByKey( final Integer id ) + { return new FloorPlanByKeyFluentHelper(servicePath, "Floors", id); } @Override @Nonnull - public PrintReceiptFluentHelper printReceipt( - @Nonnull - final Integer receiptId) { + public PrintReceiptFluentHelper printReceipt( @Nonnull final Integer receiptId ) + { return new PrintReceiptFluentHelper(servicePath, receiptId); } @Override @Nonnull - public RevokeReceiptFluentHelper revokeReceipt( - @Nonnull - final Integer receiptId) { + public RevokeReceiptFluentHelper revokeReceipt( @Nonnull final Integer receiptId ) + { return new RevokeReceiptFluentHelper(servicePath, receiptId); } @Override @Nonnull - public IsStoreOpenFluentHelper isStoreOpen( - @Nonnull - final LocalDateTime dateTime) { + public IsStoreOpenFluentHelper isStoreOpen( @Nonnull final LocalDateTime dateTime ) + { return new IsStoreOpenFluentHelper(servicePath, dateTime); } @Override @Nonnull public OrderProductFluentHelper orderProduct( - @Nonnull - final Integer customerId, - @Nonnull - final Integer productId, - @Nonnull - final Integer quantity) { + @Nonnull final Integer customerId, + @Nonnull final Integer productId, + @Nonnull final Integer quantity ) + { return new OrderProductFluentHelper(servicePath, customerId, productId, quantity); } @Override @Nonnull - public GetProductQuantitiesFluentHelper getProductQuantities( - @Nonnull - final Integer shelfId, - @Nonnull - final Integer productId) { + public + GetProductQuantitiesFluentHelper + getProductQuantities( @Nonnull final Integer shelfId, @Nonnull final Integer productId ) + { return new GetProductQuantitiesFluentHelper(servicePath, shelfId, productId); } diff --git a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java index 0caa305b6..e98534bbf 100644 --- a/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java +++ b/datamodel/odata/odata-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/odata/sample/services/SdkGroceryStoreService.java @@ -5,7 +5,9 @@ package com.sap.cloud.sdk.datamodel.odata.sample.services; import java.time.LocalDateTime; + import javax.annotation.Nonnull; + import com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchService; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper; @@ -47,412 +49,577 @@ import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper; import com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.batch.SdkGroceryStoreServiceBatch; - /** - *

Details:

OData Service:SDK_Grocery_Store
- * + *

Details:

+ * + * + * + * + * + *
OData Service:SDK_Grocery_Store
+ * */ -public interface SdkGroceryStoreService - extends BatchService +public interface SdkGroceryStoreService extends BatchService { /** - * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path used to access the endpoint. - * + * If no other path was provided via the {@link #withServicePath(String)} method, this is the default service path + * used to access the endpoint. + * */ String DEFAULT_SERVICE_PATH = "/com.sap.cloud.sdk.store.grocery"; /** - * Overrides the default service path and returns a new service instance with the specified service path. Also adjusts the respective entity URLs. - * + * Overrides the default service path and returns a new service instance with the specified service path. Also + * adjusts the respective entity URLs. + * * @param servicePath - * Service path that will override the default. - * @return - * A new service instance with the specified service path. + * Service path that will override the default. + * @return A new service instance with the specified service path. */ @Nonnull - SdkGroceryStoreService withServicePath( - @Nonnull - final String servicePath); + SdkGroceryStoreService withServicePath( @Nonnull final String servicePath ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} + * entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entities. + * This fluent helper allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull CustomerFluentHelper getAllCustomer(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} + * entity using key fields. + * * @param id - * Customer identifier used as entity key value.

Constraints: Not nullable

- * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerByKeyFluentHelper#execute execute} method on the fluent helper object. + * Customer identifier used as entity key value. + *

+ * Constraints: Not nullable + *

+ * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * using key fields. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - CustomerByKeyFluentHelper getCustomerByKey(final Integer id); + CustomerByKeyFluentHelper getCustomerByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * and save it to the S/4HANA system. + * * @param customer - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity object that will be created in the S/4HANA system. - * @return - * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerCreateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity + * object that will be created in the S/4HANA system. + * @return A fluent helper to create a new + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Customer Customer} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.CustomerCreateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - CustomerCreateFluentHelper createCustomer( - @Nonnull - final Customer customer); + CustomerCreateFluentHelper createCustomer( @Nonnull final Customer customer ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} + * entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entities. + * This fluent helper allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull ProductFluentHelper getAllProduct(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity using + * key fields. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ProductByKeyFluentHelper getProductByKey(final Integer id); + ProductByKeyFluentHelper getProductByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be created in the S/4HANA system. - * @return - * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductCreateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be created in the S/4HANA system. + * @return A fluent helper to create a new + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductCreateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ProductCreateFluentHelper createProduct( - @Nonnull - final Product product); + ProductCreateFluentHelper createProduct( @Nonnull final Product product ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} + * entity and save it to the S/4HANA system. + * * @param product - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity object that will be updated in the S/4HANA system. - * @return - * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductUpdateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity + * object that will be updated in the S/4HANA system. + * @return A fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Product Product} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ProductUpdateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ProductUpdateFluentHelper updateProduct( - @Nonnull - final Product product); + ProductUpdateFluentHelper updateProduct( @Nonnull final Product product ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} + * entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entities. + * This fluent helper allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull ReceiptFluentHelper getAllReceipt(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity using + * key fields. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ReceiptByKeyFluentHelper getReceiptByKey(final Integer id); + ReceiptByKeyFluentHelper getReceiptByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * and save it to the S/4HANA system. + * * @param receipt - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity object that will be created in the S/4HANA system. - * @return - * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptCreateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity + * object that will be created in the S/4HANA system. + * @return A fluent helper to create a new + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Receipt Receipt} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ReceiptCreateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ReceiptCreateFluentHelper createReceipt( - @Nonnull - final Receipt receipt); + ReceiptCreateFluentHelper createReceipt( @Nonnull final Receipt receipt ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} + * entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entities. + * This fluent helper allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull AddressFluentHelper getAllAddress(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity using + * key fields. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - AddressByKeyFluentHelper getAddressByKey(final Integer id); + AddressByKeyFluentHelper getAddressByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be created in the S/4HANA system. - * @return - * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressCreateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be created in the S/4HANA system. + * @return A fluent helper to create a new + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressCreateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - AddressCreateFluentHelper createAddress( - @Nonnull - final Address address); + AddressCreateFluentHelper createAddress( @Nonnull final Address address ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} + * entity and save it to the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be updated in the S/4HANA system. - * @return - * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressUpdateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be updated in the S/4HANA system. + * @return A fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressUpdateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - AddressUpdateFluentHelper updateAddress( - @Nonnull - final Address address); + AddressUpdateFluentHelper updateAddress( @Nonnull final Address address ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} + * entity in the S/4HANA system. + * * @param address - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity object that will be deleted in the S/4HANA system. - * @return - * A fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressDeleteFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity + * object that will be deleted in the S/4HANA system. + * @return A fluent helper to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Address Address} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.AddressDeleteFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - AddressDeleteFluentHelper deleteAddress( - @Nonnull - final Address address); + AddressDeleteFluentHelper deleteAddress( @Nonnull final Address address ); /** * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entities. This + * fluent helper allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull ShelfFluentHelper getAllShelf(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity using key + * fields. This fluent helper allows methods which modify the underlying query to be called before executing + * the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ShelfByKeyFluentHelper getShelfByKey(final Integer id); + ShelfByKeyFluentHelper getShelfByKey( final Integer id ); /** - * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and + * save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be created in the S/4HANA system. - * @return - * A fluent helper to create a new {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfCreateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object + * that will be created in the S/4HANA system. + * @return A fluent helper to create a new + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfCreateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ShelfCreateFluentHelper createShelf( - @Nonnull - final Shelf shelf); + ShelfCreateFluentHelper createShelf( @Nonnull final Shelf shelf ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity + * and save it to the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be updated in the S/4HANA system. - * @return - * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfUpdateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object + * that will be updated in the S/4HANA system. + * @return A fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfUpdateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ShelfUpdateFluentHelper updateShelf( - @Nonnull - final Shelf shelf); + ShelfUpdateFluentHelper updateShelf( @Nonnull final Shelf shelf ); /** - * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity in the S/4HANA system. - * + * Deletes an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} + * entity in the S/4HANA system. + * * @param shelf - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object that will be deleted in the S/4HANA system. - * @return - * A fluent helper to delete an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfDeleteFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity object + * that will be deleted in the S/4HANA system. + * @return A fluent helper to delete an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Shelf Shelf} entity. To + * perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.ShelfDeleteFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - ShelfDeleteFluentHelper deleteShelf( - @Nonnull - final Shelf shelf); + ShelfDeleteFluentHelper deleteShelf( @Nonnull final Shelf shelf ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entities. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull OpeningHoursFluentHelper getAllOpeningHours(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity using key fields. This fluent helper allows methods which modify the underlying query to be called + * before executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - OpeningHoursByKeyFluentHelper getOpeningHoursByKey(final Integer id); + OpeningHoursByKeyFluentHelper getOpeningHoursByKey( final Integer id ); /** - * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity and save it to the S/4HANA system. - * + * Update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours + * OpeningHours} entity and save it to the S/4HANA system. + * * @param openingHours - * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity object that will be updated in the S/4HANA system. - * @return - * A fluent helper to update an existing {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} entity. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursUpdateFluentHelper#execute execute} method on the fluent helper object. + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity object that will be updated in the S/4HANA system. + * @return A fluent helper to update an existing + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHours OpeningHours} + * entity. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OpeningHoursUpdateFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - OpeningHoursUpdateFluentHelper updateOpeningHours( - @Nonnull - final OpeningHours openingHours); + OpeningHoursUpdateFluentHelper updateOpeningHours( @Nonnull final OpeningHours openingHours ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} + * entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entities. This + * fluent helper allows methods which modify the underlying query to be called before executing the query + * itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull VendorFluentHelper getAllVendor(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity + * using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.Vendor Vendor} entity using + * key fields. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.VendorByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - VendorByKeyFluentHelper getVendorByKey(final Integer id); + VendorByKeyFluentHelper getVendorByKey( final Integer id ); /** - * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. - * - * @return - * A fluent helper to fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanFluentHelper#execute execute} method on the fluent helper object. + * Fetch multiple {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} + * entities. + * + * @return A fluent helper to fetch multiple + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entities. + * This fluent helper allows methods which modify the underlying query to be called before executing the + * query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull FloorPlanFluentHelper getAllFloorPlan(); /** - * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity using key fields. - * + * Fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} + * entity using key fields. + * * @param id - * - * @return - * A fluent helper to fetch a single {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity using key fields. This fluent helper allows methods which modify the underlying query to be called before executing the query itself. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanByKeyFluentHelper#execute execute} method on the fluent helper object. + * + * @return A fluent helper to fetch a single + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlan FloorPlan} entity + * using key fields. This fluent helper allows methods which modify the underlying query to be called before + * executing the query itself. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.FloorPlanByKeyFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull - FloorPlanByKeyFluentHelper getFloorPlanByKey(final Integer id); + FloorPlanByKeyFluentHelper getFloorPlanByKey( final Integer id ); /** - * Returns the Count of Attachments

Creates a fluent helper for the PrintReceipt OData function import.

- * + * Returns the Count of Attachments + *

+ *

+ *

+ * Creates a fluent helper for the PrintReceipt OData function import. + *

+ * * @param receiptId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

- * @return - * A fluent helper object that will execute the PrintReceipt OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.PrintReceiptFluentHelper#execute execute} method on the fluent helper object. - */ - @Nonnull - PrintReceiptFluentHelper printReceipt( - @Nonnull - final Integer receiptId); - - /** - * Returns the Count of Attachments

Creates a fluent helper for the RevokeReceipt OData function import.

- * + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ReceiptId + *

+ * @return A fluent helper object that will execute the PrintReceipt OData function import with the provided + * parameters. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.PrintReceiptFluentHelper#execute + * execute} method on the fluent helper object. + */ + @Nonnull + PrintReceiptFluentHelper printReceipt( @Nonnull final Integer receiptId ); + + /** + * Returns the Count of Attachments + *

+ *

+ *

+ * Creates a fluent helper for the RevokeReceipt OData function import. + *

+ * * @param receiptId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ReceiptId

- * @return - * A fluent helper object that will execute the RevokeReceipt OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.RevokeReceiptFluentHelper#execute execute} method on the fluent helper object. - */ - @Nonnull - RevokeReceiptFluentHelper revokeReceipt( - @Nonnull - final Integer receiptId); - - /** - * Check whether the store is open.

Creates a fluent helper for the IsStoreOpen OData function import.

- * + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ReceiptId + *

+ * @return A fluent helper object that will execute the RevokeReceipt OData function import with the provided + * parameters. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.RevokeReceiptFluentHelper#execute + * execute} method on the fluent helper object. + */ + @Nonnull + RevokeReceiptFluentHelper revokeReceipt( @Nonnull final Integer receiptId ); + + /** + * Check whether the store is open. + *

+ *

+ *

+ * Creates a fluent helper for the IsStoreOpen OData function import. + *

+ * * @param dateTime - * Constraints: Not nullable

Original parameter name from the Odata EDM: DateTime

- * @return - * A fluent helper object that will execute the IsStoreOpen OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.IsStoreOpenFluentHelper#execute execute} method on the fluent helper object. - */ - @Nonnull - IsStoreOpenFluentHelper isStoreOpen( - @Nonnull - final LocalDateTime dateTime); - - /** - * Create an order for a given customer.

Creates a fluent helper for the OrderProduct OData function import.

- * + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: DateTime + *

+ * @return A fluent helper object that will execute the IsStoreOpen OData function import with the provided + * parameters. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.IsStoreOpenFluentHelper#execute + * execute} method on the fluent helper object. + */ + @Nonnull + IsStoreOpenFluentHelper isStoreOpen( @Nonnull final LocalDateTime dateTime ); + + /** + * Create an order for a given customer. + *

+ *

+ *

+ * Creates a fluent helper for the OrderProduct OData function import. + *

+ * * @param quantity - * Constraints: Not nullable

Original parameter name from the Odata EDM: Quantity

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: Quantity + *

* @param productId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ProductId + *

* @param customerId - * Constraints: Not nullable

Original parameter name from the Odata EDM: CustomerId

- * @return - * A fluent helper object that will execute the OrderProduct OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OrderProductFluentHelper#execute execute} method on the fluent helper object. + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: CustomerId + *

+ * @return A fluent helper object that will execute the OrderProduct OData function import with the provided + * parameters. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.OrderProductFluentHelper#execute + * execute} method on the fluent helper object. */ @Nonnull OrderProductFluentHelper orderProduct( - @Nonnull - final Integer customerId, - @Nonnull - final Integer productId, - @Nonnull - final Integer quantity); - - /** - * Get inventory of a given shelf.

Creates a fluent helper for the GetProductQuantities OData function import.

- * + @Nonnull final Integer customerId, + @Nonnull final Integer productId, + @Nonnull final Integer quantity ); + + /** + * Get inventory of a given shelf. + *

+ *

+ *

+ * Creates a fluent helper for the GetProductQuantities OData function import. + *

+ * * @param shelfId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ShelfId

+ * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ShelfId + *

* @param productId - * Constraints: Not nullable

Original parameter name from the Odata EDM: ProductId

- * @return - * A fluent helper object that will execute the GetProductQuantities OData function import with the provided parameters. To perform execution, call the {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.GetProductQuantitiesFluentHelper#execute execute} method on the fluent helper object. - */ - @Nonnull - GetProductQuantitiesFluentHelper getProductQuantities( - @Nonnull - final Integer shelfId, - @Nonnull - final Integer productId); + * Constraints: Not nullable + *

+ * Original parameter name from the Odata EDM: ProductId + *

+ * @return A fluent helper object that will execute the GetProductQuantities OData function import with the + * provided parameters. To perform execution, call the + * {@link com.sap.cloud.sdk.datamodel.odata.sample.namespaces.sdkgrocerystore.GetProductQuantitiesFluentHelper#execute + * execute} method on the fluent helper object. + */ + @Nonnull + GetProductQuantitiesFluentHelper + getProductQuantities( @Nonnull final Integer shelfId, @Nonnull final Integer productId ); } diff --git a/datamodel/openapi/openapi-generator/pom.xml b/datamodel/openapi/openapi-generator/pom.xml index 927277ccc..e761b41e3 100644 --- a/datamodel/openapi/openapi-generator/pom.xml +++ b/datamodel/openapi/openapi-generator/pom.xml @@ -1,194 +1,194 @@ - 4.0.0 - - com.sap.cloud.sdk.datamodel - openapi-parent - 5.33.0-SNAPSHOT - - openapi-generator - jar - Data Model - OpenAPI Services - Generator - OpenAPI Services data model (VDM) - generator classes - https://sap.github.io/cloud-sdk/docs/java/getting-started - - SAP SE - https://www.sap.com - - - - The Apache Software License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - SAP - cloudsdk@sap.com - SAP SE - https://www.sap.com - - - - true - - - - - - org.mozilla - rhino - 1.9.1 - - - - - - - com.sap.cloud.sdk.datamodel - datamodel-metadata-generator - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-connectivity - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-core - - - org.openapitools - openapi-generator - - - slf4j-simple - org.slf4j - - - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.fasterxml.jackson.core - jackson-databind - - - org.slf4j - slf4j-api - - - io.vavr - vavr - - - com.google.guava - guava - - - checker-qual - org.checkerframework - - - - - commons-io - commons-io - - - io.swagger.core.v3 - swagger-models - - - io.swagger.parser.v3 - swagger-parser - - - io.swagger.parser.v3 - swagger-parser-core - - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - - - com.fasterxml.jackson.datatype - jackson-datatype-guava - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-params - test - - - org.assertj - assertj-core - test - - - org.mockito - mockito-core - test - - - org.skyscreamer - jsonassert - test - - - - org.projectlombok - lombok - provided - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - com.fasterxml.jackson.core:jackson-annotations - com.fasterxml.jackson.dataformat:jackson-dataformat-xml - com.fasterxml.jackson.datatype:jackson-datatype-joda - com.fasterxml.jackson.datatype:jackson-datatype-guava - com.fasterxml.jackson.datatype:jackson-datatype-jsr310 - - - - - - - true - src/main/resources - - - + 4.0.0 + + com.sap.cloud.sdk.datamodel + openapi-parent + 5.33.0-SNAPSHOT + + openapi-generator + jar + Data Model - OpenAPI Services - Generator + OpenAPI Services data model (VDM) - generator classes + https://sap.github.io/cloud-sdk/docs/java/getting-started + + SAP SE + https://www.sap.com + + + + The Apache Software License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + SAP + cloudsdk@sap.com + SAP SE + https://www.sap.com + + + + true + + + + + + org.mozilla + rhino + 1.9.1 + + + + + + + com.sap.cloud.sdk.datamodel + datamodel-metadata-generator + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-connectivity + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-core + + + org.openapitools + openapi-generator + + + org.slf4j + slf4j-simple + + + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.core + jackson-databind + + + org.slf4j + slf4j-api + + + io.vavr + vavr + + + com.google.guava + guava + + + org.checkerframework + checker-qual + + + + + commons-io + commons-io + + + io.swagger.core.v3 + swagger-models + + + io.swagger.parser.v3 + swagger-parser + + + io.swagger.parser.v3 + swagger-parser-core + + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-guava + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.assertj + assertj-core + test + + + org.mockito + mockito-core + test + + + org.skyscreamer + jsonassert + test + + + + org.projectlombok + lombok + provided + + + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + com.fasterxml.jackson.core:jackson-annotations + com.fasterxml.jackson.dataformat:jackson-dataformat-xml + com.fasterxml.jackson.datatype:jackson-datatype-joda + com.fasterxml.jackson.datatype:jackson-datatype-guava + com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + + + + + diff --git a/datamodel/openapi/openapi-generator/pom.xml.bak b/datamodel/openapi/openapi-generator/pom.xml.bak new file mode 100644 index 000000000..927277ccc --- /dev/null +++ b/datamodel/openapi/openapi-generator/pom.xml.bak @@ -0,0 +1,194 @@ + + + 4.0.0 + + com.sap.cloud.sdk.datamodel + openapi-parent + 5.33.0-SNAPSHOT + + openapi-generator + jar + Data Model - OpenAPI Services - Generator + OpenAPI Services data model (VDM) - generator classes + https://sap.github.io/cloud-sdk/docs/java/getting-started + + SAP SE + https://www.sap.com + + + + The Apache Software License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + SAP + cloudsdk@sap.com + SAP SE + https://www.sap.com + + + + true + + + + + + org.mozilla + rhino + 1.9.1 + + + + + + + com.sap.cloud.sdk.datamodel + datamodel-metadata-generator + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-connectivity + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-core + + + org.openapitools + openapi-generator + + + slf4j-simple + org.slf4j + + + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.core + jackson-databind + + + org.slf4j + slf4j-api + + + io.vavr + vavr + + + com.google.guava + guava + + + checker-qual + org.checkerframework + + + + + commons-io + commons-io + + + io.swagger.core.v3 + swagger-models + + + io.swagger.parser.v3 + swagger-parser + + + io.swagger.parser.v3 + swagger-parser-core + + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-guava + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.assertj + assertj-core + test + + + org.mockito + mockito-core + test + + + org.skyscreamer + jsonassert + test + + + + org.projectlombok + lombok + provided + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + com.fasterxml.jackson.core:jackson-annotations + com.fasterxml.jackson.dataformat:jackson-dataformat-xml + com.fasterxml.jackson.datatype:jackson-datatype-joda + com.fasterxml.jackson.datatype:jackson-datatype-guava + com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + + + + + + + true + src/main/resources + + + + From bae1184d15251495160d9a3d3f4cccb0799a7173 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 30 Jul 2026 16:03:49 +0200 Subject: [PATCH 22/28] Add warning in parseOpenApiSpec for OAS 3.1 --- .../openapi/generator/GenerationConfigurationConverter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java index c1ba970ce..0127ff5b3 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java @@ -116,6 +116,10 @@ private static void setGlobalSettings( @Nonnull final GenerationConfiguration co } final var result = spec.getOpenAPI(); log.info("Detected OpenAPI specification version {}.", result.getOpenapi()); + if( OasVersionUtil.isOas31(result) ) { + log.warn( + "The input specification uses OpenAPI 3.1, which is an experimental feature. Use with caution." ); + } preprocessSpecification(result, config); return result; } From fbd2d19fce61c22225dddc60b95272b9b78f3c00 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Thu, 30 Jul 2026 16:06:25 +0200 Subject: [PATCH 23/28] formatting --- .../openapi/generator/GenerationConfigurationConverter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java index 0127ff5b3..99d51139a 100644 --- a/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java +++ b/datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java @@ -117,8 +117,7 @@ private static void setGlobalSettings( @Nonnull final GenerationConfiguration co final var result = spec.getOpenAPI(); log.info("Detected OpenAPI specification version {}.", result.getOpenapi()); if( OasVersionUtil.isOas31(result) ) { - log.warn( - "The input specification uses OpenAPI 3.1, which is an experimental feature. Use with caution." ); + log.warn("The input specification uses OpenAPI 3.1, which is an experimental feature. Use with caution."); } preprocessSpecification(result, config); return result; From 2e861a3fe85f4fb39c9c747462f6e7b0c0a4531a Mon Sep 17 00:00:00 2001 From: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> Date: Fri, 31 Jul 2026 08:39:40 +0200 Subject: [PATCH 24/28] release notes --- release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_notes.md b/release_notes.md index 3112514a9..8fb341409 100644 --- a/release_notes.md +++ b/release_notes.md @@ -12,7 +12,7 @@ ### ✨ New Functionality -- +- [OpenAPI] Added experimental support for generating clients from OpenAPI 3.1 specifications ### 📈 Improvements From ecc67e719236207212037446fa7da885b9c80ac3 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Fri, 31 Jul 2026 13:40:39 +0200 Subject: [PATCH 25/28] Clean up --- datamodel/openapi/openapi-generator/pom.xml | 388 +++++++++--------- .../openapi/openapi-generator/pom.xml.bak | 194 --------- 2 files changed, 198 insertions(+), 384 deletions(-) delete mode 100644 datamodel/openapi/openapi-generator/pom.xml.bak diff --git a/datamodel/openapi/openapi-generator/pom.xml b/datamodel/openapi/openapi-generator/pom.xml index e761b41e3..67e513182 100644 --- a/datamodel/openapi/openapi-generator/pom.xml +++ b/datamodel/openapi/openapi-generator/pom.xml @@ -1,194 +1,202 @@ - - 4.0.0 - - com.sap.cloud.sdk.datamodel - openapi-parent - 5.33.0-SNAPSHOT - - openapi-generator - jar - Data Model - OpenAPI Services - Generator - OpenAPI Services data model (VDM) - generator classes - https://sap.github.io/cloud-sdk/docs/java/getting-started - - SAP SE - https://www.sap.com - - - - The Apache Software License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - SAP - cloudsdk@sap.com - SAP SE - https://www.sap.com - - - - true - - + + 4.0.0 + + com.sap.cloud.sdk.datamodel + openapi-parent + 5.33.0-SNAPSHOT + + openapi-generator + jar + Data Model - OpenAPI Services - Generator + OpenAPI Services data model (VDM) - generator classes + https://sap.github.io/cloud-sdk/docs/java/getting-started + + SAP SE + https://www.sap.com + + + + The Apache Software License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + SAP + cloudsdk@sap.com + SAP SE + https://www.sap.com + + + + true + + + + + + org.mozilla + rhino + 1.9.1 + + + - - - org.mozilla - rhino - 1.9.1 - + + + com.sap.cloud.sdk.datamodel + datamodel-metadata-generator + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-connectivity + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-core + + + org.openapitools + openapi-generator + + + org.slf4j + slf4j-simple + + + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.core + jackson-databind + + + org.slf4j + slf4j-api + + + io.vavr + vavr + + + com.google.guava + guava + + + org.checkerframework + checker-qual + + + + + commons-io + commons-io + + + io.swagger.core.v3 + swagger-models + + + io.swagger.parser.v3 + swagger-parser + + + io.swagger.parser.v3 + swagger-parser-core + + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-guava + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.assertj + assertj-core + test + + + org.mockito + mockito-core + test + + + org.skyscreamer + jsonassert + test + + + + org.projectlombok + lombok + provided + - - - - - com.sap.cloud.sdk.datamodel - datamodel-metadata-generator - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-connectivity - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-core - - - org.openapitools - openapi-generator - - - org.slf4j - slf4j-simple - - - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.fasterxml.jackson.core - jackson-databind - - - org.slf4j - slf4j-api - - - io.vavr - vavr - - - com.google.guava - guava - - - org.checkerframework - checker-qual - - - - - commons-io - commons-io - - - io.swagger.core.v3 - swagger-models - - - io.swagger.parser.v3 - swagger-parser - - - io.swagger.parser.v3 - swagger-parser-core - - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - - - com.fasterxml.jackson.datatype - jackson-datatype-guava - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-params - test - - - org.assertj - assertj-core - test - - - org.mockito - mockito-core - test - - - org.skyscreamer - jsonassert - test - - - - org.projectlombok - lombok - provided - - - - - - true - src/main/resources - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - com.fasterxml.jackson.core:jackson-annotations - com.fasterxml.jackson.dataformat:jackson-dataformat-xml - com.fasterxml.jackson.datatype:jackson-datatype-joda - com.fasterxml.jackson.datatype:jackson-datatype-guava - com.fasterxml.jackson.datatype:jackson-datatype-jsr310 - - - - - + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + + + com.fasterxml.jackson.core:jackson-annotations + + com.fasterxml.jackson.dataformat:jackson-dataformat-xml + + com.fasterxml.jackson.datatype:jackson-datatype-joda + + com.fasterxml.jackson.datatype:jackson-datatype-guava + + com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + + + + + diff --git a/datamodel/openapi/openapi-generator/pom.xml.bak b/datamodel/openapi/openapi-generator/pom.xml.bak deleted file mode 100644 index 927277ccc..000000000 --- a/datamodel/openapi/openapi-generator/pom.xml.bak +++ /dev/null @@ -1,194 +0,0 @@ - - - 4.0.0 - - com.sap.cloud.sdk.datamodel - openapi-parent - 5.33.0-SNAPSHOT - - openapi-generator - jar - Data Model - OpenAPI Services - Generator - OpenAPI Services data model (VDM) - generator classes - https://sap.github.io/cloud-sdk/docs/java/getting-started - - SAP SE - https://www.sap.com - - - - The Apache Software License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - SAP - cloudsdk@sap.com - SAP SE - https://www.sap.com - - - - true - - - - - - org.mozilla - rhino - 1.9.1 - - - - - - - com.sap.cloud.sdk.datamodel - datamodel-metadata-generator - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-connectivity - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-core - - - org.openapitools - openapi-generator - - - slf4j-simple - org.slf4j - - - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.fasterxml.jackson.core - jackson-databind - - - org.slf4j - slf4j-api - - - io.vavr - vavr - - - com.google.guava - guava - - - checker-qual - org.checkerframework - - - - - commons-io - commons-io - - - io.swagger.core.v3 - swagger-models - - - io.swagger.parser.v3 - swagger-parser - - - io.swagger.parser.v3 - swagger-parser-core - - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - - - com.fasterxml.jackson.datatype - jackson-datatype-guava - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-params - test - - - org.assertj - assertj-core - test - - - org.mockito - mockito-core - test - - - org.skyscreamer - jsonassert - test - - - - org.projectlombok - lombok - provided - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - com.fasterxml.jackson.core:jackson-annotations - com.fasterxml.jackson.dataformat:jackson-dataformat-xml - com.fasterxml.jackson.datatype:jackson-datatype-joda - com.fasterxml.jackson.datatype:jackson-datatype-guava - com.fasterxml.jackson.datatype:jackson-datatype-jsr310 - - - - - - - true - src/main/resources - - - - From 208c6ad9966fbbb6db484f93affbf93eb6b3a058 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Fri, 31 Jul 2026 13:42:39 +0200 Subject: [PATCH 26/28] formatting --- datamodel/openapi/openapi-generator/pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/datamodel/openapi/openapi-generator/pom.xml b/datamodel/openapi/openapi-generator/pom.xml index 67e513182..8bfa3c391 100644 --- a/datamodel/openapi/openapi-generator/pom.xml +++ b/datamodel/openapi/openapi-generator/pom.xml @@ -1,7 +1,5 @@ - + 4.0.0 com.sap.cloud.sdk.datamodel From 5fcd64c77860c65a8dd0285c84788a85550e9ee9 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Fri, 31 Jul 2026 13:43:46 +0200 Subject: [PATCH 27/28] Use tab 4 as indentation --- datamodel/openapi/openapi-generator/pom.xml | 394 ++++++++++---------- 1 file changed, 197 insertions(+), 197 deletions(-) diff --git a/datamodel/openapi/openapi-generator/pom.xml b/datamodel/openapi/openapi-generator/pom.xml index 8bfa3c391..61410d250 100644 --- a/datamodel/openapi/openapi-generator/pom.xml +++ b/datamodel/openapi/openapi-generator/pom.xml @@ -1,200 +1,200 @@ - 4.0.0 - - com.sap.cloud.sdk.datamodel - openapi-parent - 5.33.0-SNAPSHOT - - openapi-generator - jar - Data Model - OpenAPI Services - Generator - OpenAPI Services data model (VDM) - generator classes - https://sap.github.io/cloud-sdk/docs/java/getting-started - - SAP SE - https://www.sap.com - - - - The Apache Software License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - SAP - cloudsdk@sap.com - SAP SE - https://www.sap.com - - - - true - - - - - - org.mozilla - rhino - 1.9.1 - - - - - - - com.sap.cloud.sdk.datamodel - datamodel-metadata-generator - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-connectivity - - - com.sap.cloud.sdk.cloudplatform - cloudplatform-core - - - org.openapitools - openapi-generator - - - org.slf4j - slf4j-simple - - - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.fasterxml.jackson.core - jackson-databind - - - org.slf4j - slf4j-api - - - io.vavr - vavr - - - com.google.guava - guava - - - org.checkerframework - checker-qual - - - - - commons-io - commons-io - - - io.swagger.core.v3 - swagger-models - - - io.swagger.parser.v3 - swagger-parser - - - io.swagger.parser.v3 - swagger-parser-core - - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - - - com.fasterxml.jackson.datatype - jackson-datatype-guava - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-params - test - - - org.assertj - assertj-core - test - - - org.mockito - mockito-core - test - - - org.skyscreamer - jsonassert - test - - - - org.projectlombok - lombok - provided - - - - - - true - src/main/resources - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - + + org.mozilla + rhino + 1.9.1 + + + + + + + com.sap.cloud.sdk.datamodel + datamodel-metadata-generator + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-connectivity + + + com.sap.cloud.sdk.cloudplatform + cloudplatform-core + + + org.openapitools + openapi-generator + + + org.slf4j + slf4j-simple + + + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.core + jackson-databind + + + org.slf4j + slf4j-api + + + io.vavr + vavr + + + com.google.guava + guava + + + org.checkerframework + checker-qual + + + + + commons-io + commons-io + + + io.swagger.core.v3 + swagger-models + + + io.swagger.parser.v3 + swagger-parser + + + io.swagger.parser.v3 + swagger-parser-core + + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + com.fasterxml.jackson.datatype + jackson-datatype-guava + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.assertj + assertj-core + test + + + org.mockito + mockito-core + test + + + org.skyscreamer + jsonassert + test + + + + org.projectlombok + lombok + provided + + + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + - - com.fasterxml.jackson.core:jackson-annotations - - com.fasterxml.jackson.dataformat:jackson-dataformat-xml - - com.fasterxml.jackson.datatype:jackson-datatype-joda - - com.fasterxml.jackson.datatype:jackson-datatype-guava - - com.fasterxml.jackson.datatype:jackson-datatype-jsr310 - - - - - - + + com.fasterxml.jackson.core:jackson-annotations + + com.fasterxml.jackson.dataformat:jackson-dataformat-xml + + com.fasterxml.jackson.datatype:jackson-datatype-joda + + com.fasterxml.jackson.datatype:jackson-datatype-guava + + com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + + + + + + \ No newline at end of file From dafe605cfc2c82ddd6703a9170eaa14e61bb69ac Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Fri, 31 Jul 2026 13:46:43 +0200 Subject: [PATCH 28/28] Reset the openapi-generator pom to main --- datamodel/openapi/openapi-generator/pom.xml | 36 +++++++++------------ 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/datamodel/openapi/openapi-generator/pom.xml b/datamodel/openapi/openapi-generator/pom.xml index 61410d250..927277ccc 100644 --- a/datamodel/openapi/openapi-generator/pom.xml +++ b/datamodel/openapi/openapi-generator/pom.xml @@ -61,8 +61,8 @@ openapi-generator - org.slf4j slf4j-simple + org.slf4j @@ -91,8 +91,8 @@ guava - org.checkerframework checker-qual + org.checkerframework @@ -167,12 +167,6 @@ - - - true - src/main/resources - - org.apache.maven.plugins @@ -180,21 +174,21 @@ - - - com.fasterxml.jackson.core:jackson-annotations - - com.fasterxml.jackson.dataformat:jackson-dataformat-xml - - com.fasterxml.jackson.datatype:jackson-datatype-joda - - com.fasterxml.jackson.datatype:jackson-datatype-guava - - com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + + com.fasterxml.jackson.core:jackson-annotations + com.fasterxml.jackson.dataformat:jackson-dataformat-xml + com.fasterxml.jackson.datatype:jackson-datatype-joda + com.fasterxml.jackson.datatype:jackson-datatype-guava + com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + + + true + src/main/resources + + - \ No newline at end of file +