Skip to main content

Find data used on DTOs

org.openrewrite.java.migrate.search.FindDataUsedOnDto

Find data elements used on DTOs. This is useful to provide information where data over-fetching may be a problem.

Recipe source

GitHub: FindDataUsedOnDto.java, Issue Tracker, Maven Central

This recipe is available under the Moderne Source Available License.

Options

TypeNameDescriptionExample
StringdtoTypeThe fully qualified name of the DTO.com.example.dto.*

Usage

This recipe has required configuration parameters and can only be run by users of Moderne. To run this recipe, you will need to provide the Moderne CLI run command with the required options. Or, if you'd like to create a declarative recipe, please see the below example of a rewrite.yml file:

rewrite.yml
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.FindDataUsedOnDtoExample
displayName: Find data used on DTOs example
recipeList:
- org.openrewrite.java.migrate.search.FindDataUsedOnDto:
dtoType: com.example.dto.*

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindDataUsedOnDto --recipe-option "dtoType=com.example.dto.*"

If the recipe is not available locally, then you can install it using:

mod config recipes jar install org.openrewrite.recipe:rewrite-migrate-java:3.28.0

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

Uses of the data elements of a DTO

org.openrewrite.java.migrate.table.DtoDataUses

The use of the data elements of a DTO by the method declaration using it.

Column NameDescription