Ask questions and see you at July 1st, 8 pm CET: youtube.com/c/bienadam
Also checkout recent episode:
Please keep the questions as short and as concise as only possible. Feel free to ask several, shorter questions. I will also cover some questions in my "shorts" youtube.com/@bienadam/shorts between the shows.
Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks
New: the airhacks.tv discord server: discord.gg/airhacks
Separation of
@Entity
and beansWe're told not to mix
@Entity
and EJB/CDI annotations on the same class. For classes that both hold data and have a behavior that requires injections, how should they be modeled? Splitting the data from the behavior looks like requiring data-oriented over object-oriented design (I'm not against).Simplified use case: each automotive part (there are hundreds such parts) has its data and a function that is called on it from another class. Here is the approach for 2 of these classes.
In plain OO Java:
and in Jakarta:
If this is any good to begin with, how would I get the action class from the data class? Like this?