oasp / oasp4j

The Open Application Standard Platform for Java
Apache License 2.0
60 stars 303 forks source link

oasp4j-jpa compatiblity for DAO with paging support #673

Closed vapadwal closed 5 years ago

vapadwal commented 5 years ago

Please find the PR for issue https://github.com/oasp/oasp4j/issues/669

vapadwal commented 5 years ago

Please also see mtsj PR https://github.com/oasp/my-thai-star/pull/128

hohwille commented 5 years ago

Here is my design suggestion. Indeed quite complicated. However, when removing/ignoring the deprecated legacy stuff, the official things do not get any more complex. And this way we avoid namespace clashing when multiple oasp4j JARs come together on the classpath. Please note comments below. I do not have time to rework the entire diagram. Sorry.

oasp4j-dao-legacy-support

IMPORTANT: I just realized that the DAO interfaces actually do not differ between the new and the legacy world. Therefore we IMHO should not duplicate them. Maybe then the package separation (adding dao subpackage in the new world) does not make much sense. It might then be better to change the Abstract*Dao names in the new world so the legacy world can keep the existing names. My first guess would be to add some Impl suffix to the new world ( e.g. AbstractGenericDaoImpl).

The important requirement is that:

vapadwal commented 5 years ago

Regarding renaming Dao interfaces in oasp-jpa-dao and oasp-jpa-dao-envers had prefix "I" and Dao abstract class have put suffix "Impl"

hohwille commented 5 years ago

Regarding renaming Dao interfaces in oasp-jpa-dao and oasp-jpa-dao-envers had prefix "I"

https://github.com/oasp/oasp4j/wiki/coding-conventions#naming

Did you read the IMPORTANT: note? IMHO there is no need to duplicate the interfaces. Also the Envers-Classes are not DAO specific and should IMHO not have been moved to a dao specific module. What if someone wants to use envers with oasp4j-jpa-spring-data instead? Then he would also have to depend on oasp4j-jpa-dao-envers what does not make sense to me.

hohwille commented 5 years ago

As we are running out of time I will try to create another PR and give it a try. Then we can match and compare, discuss, pick and choose. It seems to complicated to express all in words without misunderstandings (and between the few time slots I do have).

hohwille commented 5 years ago

Community voted for #675 so I am closing this PR.