Search code examples
guiceguice-persist

Does guice-persist support the @Finder annotation


Guice-persist was based on warp-persist which had the concept of finder methods.

http://code.google.com/p/google-guice/wiki/GuicePersist

was based on

http://code.google.com/p/warp-persist/

I can see that there is an annotation for @Finder in guice-persist similar to warp-persist but there is no documentation.


Solution

  • Yes, you need to add the finders to the JpaPersistModule when you create it:

    Module persistModule = new JpaPersistModule(...)
        .addFinder(SomeFinder.class)
        .addFinder(OtherFinder.class);