For these methods a separate interface (same name as corresponding repository interface but suffixed with "Custom") and an implementation class (plain Spring bean independant from Spring Data) have to be implemented. Our Spring Data repository interface needs to extend from this custom interface (in addition to the Spring Data repository abstraction interface). Spring Data automatically detects this custom interface with its implementation and refers to the corresponding custom repository methods.
A detailed description can be found in Spring Data JPAs reference manual (section
Adding custom behavior to single repositories).
We will need this extension mechanism for implementing Sculptors Subscribe support in Spring Data repositories (the aforementioned custom interface has to extend Sculptors
EventSubscriber interface).
But right now I have no clue how to implement Sculptors Publish support for Spring Datas built-in repository operations.
Any ideas?
/Torsten