I know you can do it differently, but then it complicates the code. The strength of JPA, CDI, etc ... is that it hides a lot of code from subsequent performers. In my case, I hid all permission support under the annotation "@PermissionsBinding", and I have a lot of entities that need to be treated like this. I also need to solve other problems similarly. So that the next programmers do not have to penetrate how it works to use. They will simply use one annotation and have all the permissions functionality in search, etc ... |