From a50346bbe166f6b96c060933df418fe299332ee8 Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Mon, 24 Aug 2026 09:49:13 +0200 Subject: [PATCH 1/2] Remove outdated limitation --- java/developing-applications/building.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index 94d553d9f7..9898c44a24 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -554,10 +554,6 @@ Other options in this goal enable or disable certain features that change the wa If your entity is modelled with the [composition of aspects](../../cds/cdl#with-named-targets), the generated interfaces always reference original aspect as type for setters and getters. When this switch is enabled, the code generator uses the type generated by the compiler instead of the type of the aspect itself and will include methods to fetch keys, for example. - :::warning Limitations - This is supported only for the named aspects (inline targets are not supported) and does not respect all possible options how such entities might be exposed by services. - ::: - - [`betterNames`](../assets/cds-maven-plugin-site/generate-mojo.html#betterNames) CDS models from external sources might include elements that have some special characters in their names or include elements that clash with Java keywords. Such cases always can be solved with the [renaming features](../cds-data#renaming-elements-in-java) provided by code generator, but in case of large models, this is tedious. From 64dbfd79e17674684f47b9ec383580f3ef9542a1 Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Fri, 28 Aug 2026 15:26:29 +0200 Subject: [PATCH 2/2] Update Java Codegen Switches style --- java/developing-applications/building.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index 9898c44a24..bea9fb1b93 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -537,7 +537,7 @@ Moreover, it doesn't change the way how event contexts, delivered by CAP, look l Other options in this goal enable or disable certain features that change the way generated code looks in a certain aspect. These changes can be incompatible with the existing code and require manual adaptation. -- [`strictSetters`](../assets/cds-maven-plugin-site/generate-mojo.html#strictSetters) +##### `strictSetters` { #codegen-strictSetters } This switch changes the signature of the setter methods in typed access interfaces so that they require concrete type instead of generic `Map` interface. For example: @@ -549,12 +549,12 @@ Other options in this goal enable or disable certain features that change the wa It does not introduce any additional type checks at runtime, the correctness of the assignment is checked only at the time of compilation. -- [`interfacesForAspects`](../assets/cds-maven-plugin-site/generate-mojo.html#interfacesForAspects) +##### `interfacesForAspects` { #codegen-interfacesForAspects } If your entity is modelled with the [composition of aspects](../../cds/cdl#with-named-targets), the generated interfaces always reference original aspect as type for setters and getters. When this switch is enabled, the code generator uses the type generated by the compiler instead of the type of the aspect itself and will include methods to fetch keys, for example. -- [`betterNames`](../assets/cds-maven-plugin-site/generate-mojo.html#betterNames) +##### `betterNames` { #codegen-betterNames } CDS models from external sources might include elements that have some special characters in their names or include elements that clash with Java keywords. Such cases always can be solved with the [renaming features](../cds-data#renaming-elements-in-java) provided by code generator, but in case of large models, this is tedious. When this switch is enabled, characters `/` and `$` behave as a separators for the name during case conversions, similar to `_` and `.`. For example, `GET_MATERIAL` yields `GetMaterial` (or `getMaterial` for attributes and methods). The same now applies for the names with `/`, for example, name `/DMO/GET_MATERIAL` will be converted to `DmoGetMaterial`. @@ -565,11 +565,11 @@ Other options in this goal enable or disable certain features that change the wa - Leading `_` will remain in the name after conversions. This supports conventions where an association and its foreign key have names like `_assoc` and `assoc`. These conversions no longer influence the splitting. -- [`cqnServiceGetters`](../assets/cds-maven-plugin-site/generate-mojo.html#cqnServiceGetters) +##### `cqnServiceGetters` { #codegen-cqnServiceGetters } The method `getService()` in generated [event-specific Event Context interfaces](../event-handlers/#eventcontext) is overridden to return the typed service interface instead of the generic `Service` type. -- [`generateClasses`](../assets/cds-maven-plugin-site/generate-mojo.html#generateClasses) +##### `generateClasses` { #codegen-generateClasses } Generates static class-based implementations for interfaces, replacing dynamic proxies at runtime. This significantly improves performance and removes the limit on the number of methods an accessor interface may declare.