I'm using hibernate with annotations and hibernate tools with freemarker templates to automatically generate my orm dao classes.
Now I'd like to implement hibernate search and therefor want to add hibernate search annotations to these classes and properties.
But I don't know how and where I can configure which classes and properties I want hibernate tools to annotate.
The problem with freemarker templates is, that i can only define class-generation strategies in general for all classes. But for the hibernate search implementation i want to annotate only specific classes and only specific attributes within these classes.
Is there any way where i can define which classes and getter properties i'd like to have annotated by hibernate tools? Or annotate the classes after the build process automatically?
Solutions I could rule out so far:
- manually add annotations after the code generation -> it has to be automatically
- use of several if-statements in the freemarker templates like "if class name == test do add @Index to class" -> it just would be to much, especially with the annotations for the properties
- add some settings to reveng.xml file -> at least I don't know how this could help
Thanks for your help!