Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task] Allow customizing the class name when generating POJOs from aspect models #538

Closed
andreas-schilling opened this issue Mar 5, 2024 · 2 comments · Fixed by #668
Closed
Labels
acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. task

Comments

@andreas-schilling
Copy link
Contributor

Currently the name that is used when generating POJOs from aspect models is fixed to the element name.
It would be great to have more control over the name, especially to allow custom prefixes.
The background for this is the following: it is quite common for projects that use generated POJOs to have the generated layer as some kind of base and then use derived classes where appropriate, that are the actual POJOs used to implemented against:

BaseMovement.java
 |_ Movement.java

This setup allows extended or otherwise customized functionality on POJOs to be provided through the derived classes (in this example within Movement.java).

To be clear, this setup of course is already possible to be implemented with the current state, however a somewhat weird naming scheme would be required to do so, as the parent classes would carry the idiomatic name and the derived classes would need some pre- or postfix.

Describe the solution you'd like
A minimum solution would allow to add a prefix on demand, an ideal solution would allow to fully plug in a function that generates the final name to be used for the class (with the default behaving as it is right now).
Also, the solution should (at least in the most fine-grained configurable variant) allow to perform this customizing on a per-model base, so that it is possible to selectively apply a customized name. This would allow the above described implementation structure to be applied to just a bunch of models, while keeping the default for all the others, because no customized implementation layer is required for these.

@chris-volk chris-volk added the acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. label Mar 19, 2024
Copy link

github-actions bot commented Nov 6, 2024

Release v2.9.7 addresses this.

1 similar comment
Copy link

github-actions bot commented Nov 7, 2024

Release v2.9.7 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants