Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions java/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ Here, the *migration* `com.sap.cds.services.migrations.MigrateStatements` from C
|Name |Description|Available since|
|--------|-----------|---------------|
|[com.sap.cds.services.migrations.MigrateStatements](../releases/2025/aug25#typed-query-results)|Migrates CQN statements to comply with typed Query API changes in 4.3.0.|4.3.0|
|[com.sap.cds.services.recipes.GetLocalizedMessage](#service-exception-utils-removals)|Replaces `ServiceExceptionUtils#getLocalizedMessage(String, Object[], Locale)` with the overload that passes `true` as `errorStatusFallback`.|5.0.0|
|[com.sap.cds.services.recipes.GetMessageTarget](#service-exception-utils-removals)|Replaces `ServiceExceptionUtils#getMessageTarget(String)` with `MessageTarget#create(String)`.|5.0.0|
|[com.sap.cds.services.recipes.GetMessageTargetWithPath](#service-exception-utils-removals)|Replaces `ServiceExceptionUtils#getMessageTarget(String, Function)` with `MessageTarget#create(String, Function)`.|5.0.0|
|[com.sap.cds.services.recipes.GetMessageTargetWithTypedPath](#service-exception-utils-removals)|Replaces `ServiceExceptionUtils#getMessageTarget(String, Class, Function)` with `MessageTarget#create(String, Class, Function)`.|5.0.0|
|[com.sap.cds.services.recipes.GetMessageTargetWithElement](#service-exception-utils-removals)|Replaces `ServiceExceptionUtils#getMessageTarget(Path, CdsElement)` with `MessageTarget#create(Path, CdsElement)`.|5.0.0|
|[com.sap.cds.services.migrations.MigrateSaasRegistryDependency](#saas-registry-dependency-removals)|Replaces deprecated `SaasRegistryDependency` methods `setAppId`/`setAppName`/`getAppId`/`getAppName` with their `xsappname`-based replacements.|5.0.0|

## CAP Java 4.9 to CAP Java 5.0 (TBA) { #four-to-five }

Expand Down Expand Up @@ -90,13 +96,26 @@ The following table gives an overview about the removed properties:
| --- | --- |
| `abc` | Any description about replacement |

### Removed Java APIs
### Removed Java APIs { #service-exception-utils-removals }

- Removed deprecated classes:
- `com.sap.cds.A`, use `B` instead
The following deprecated methods on [`ServiceExceptionUtils`](https://www.javadoc.io/doc/com.sap.cds/cds-services-api/latest/com/sap/cds/services/ServiceExceptionUtils.html) have been removed (they were marked `forRemoval` in previous releases). Use the `MessageTarget` factories or the four-argument `getLocalizedMessage` overload instead.

- Removed deprecated methods:
- `getLocalizedMessage(String code, Object[] args, Locale locale)` → `getLocalizedMessage(code, args, locale, true)` (pass `true` for `errorStatusFallback` to keep the previous behavior)
- `getMessageTarget(String target)` → `MessageTarget.create(target)`
- `getMessageTarget(String parameter, Function<StructuredType<?>, Object> path)` → `MessageTarget.create(parameter, path)`
- `getMessageTarget(String parameter, Class<E> type, Function<E, Object> path)` → `MessageTarget.create(parameter, type, path)`
- `getMessageTarget(Path path, CdsElement element)` → `MessageTarget.create(path, element)`

### Removed Java APIs { #saas-registry-dependency-removals }

The following deprecated methods on [`SaasRegistryDependency`](https://www.javadoc.io/doc/com.sap.cds/cds-feature-mt/latest/com/sap/cds/services/mt/SaasRegistryDependency.html) have been removed. Use `getXsappname()` / `setXsappname(String)` instead.

- Removed deprecated methods:
- `com.sap.cds.ql.cqn.A.search(String term)`, use `searchTerm(CqnSearchTermPredicate)` instead
- `getAppId()` → `getXsappname()`
- `setAppId(String appId)` → `setXsappname(appId)`
- `getAppName()` → `getXsappname()`
- `setAppName(String appName)` → `setXsappname(appName)`

## CAP Java 3.10 to CAP Java 4.0 { #three-to-four }

Expand Down
Loading