DAO interface in Java EE architetcure
I'm implementing a Java EE project, and in my a part of my class diagram i have a association class which link two classes samples( in french Echantillon) and analysis( in french AnalyseElementaire)( N.B: the project is for a 开发者_如何学运维chemical laboratory, see the image below)
ResultID is, I guess, the class of the composite ID of the Result entity. It's not a hibernate Entity, just an ID. It's needed because the Result table has a composite primary key, composed of the ID of the AnalyseElementaire and the ID of the Echantillon.
There shouldn't be any DAO for the class, since it's not persistent.
It would certainly be easier to add a surrogate primary key in the Result table, to avoid the composite ID.
精彩评论