vendredi 16 septembre 2016

Custom Hibernate @SortComparator annotation

I wish to create a common entry point for sorting in my project. I've created an helper class with a static method Sort that I use in my code wherever I need. What I wish to do is to create an annotation @Sort that basically does the same. Something very similar to the @SortComparator annotation in Hibernate. I've created the annotation with target METHOD and LOCAL_VARIABLE but I've difficult to understand where to put the code to perform the sorting operation, that's a sort of annotation processor. I tried to give a look to the Spring BeanPostProcessor but I couldn't find my solution there. Can anybody help me?





Aucun commentaire:

Enregistrer un commentaire