Skip to content

DATAJPA-562 - Support for pluggable generic post-processing of JPA Query results. #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

thomasdarimont
Copy link
Contributor

We introduced the JpaResultPostProcessor interface to provide the infrastructure to be able to post-process the results of entityManager.getResultList() or entityManager.getSingleResult() invocations.
This enables us to manipulate the results like automatically detaching them from the PersistenceContext or masking values etc via pluggable strategies.
By default a NoopJpaResultPostProcessor is used that returns the results as is. We also provide a DetachingJpaResultPostProcessor that detaches all returned domain-objects from the associated persistence-context.

thomasdarimont pushed a commit that referenced this pull request Jun 26, 2014
…ery results.

We introduced the JpaResultPostProcessor interface to provide the  infrastructure to be able to post-process the results of entityManager.getResultList() or entityManager.getSingleResult() invocations.
This enables us to manipulate the results like automatically detaching them from the PersistenceContext or masking values etc via pluggable strategies.
By default a NoopJpaResultPostProcessor is used that returns the results as is. We also provide a DetachingJpaResultPostProcessor that detaches all returned domain-objects from the associated persistence-context.

Original pull request: #99.
…ery results.

We introduced the JpaResultPostProcessor interface to provide the  infrastructure to be able to post-process the results of entityManager.getResultList() or entityManager.getSingleResult() invocations.
This enables us to manipulate the results like automatically detaching them from the PersistenceContext or masking values etc via pluggable strategies.
By default a NoopJpaResultPostProcessor is used that returns the results as is. We also provide a DetachingJpaResultPostProcessor that detaches all returned domain-objects from the associated persistence-context.

Original pull request: #99.
@RobzInadE
Copy link

Why was this closed? This is such an invaluable thing for me to have in my project. It's freaking impossible to have a clean usable interceptor to a repository without having to use AOP which just causes headache and unnecessary typing.

@thomasdarimont
Copy link
Contributor Author

Hi @RobzInadE,

here is some additional context: https://jira.spring.io/browse/DATAJPA-562
I also think that this would still be a very useful feature.

Cheers,
Thomas

@RobzInadE
Copy link

I see. I tested your solution, however calls to non-implemented "magical" repository methods were not caught in any of the SimpleJpaRepository class. I kind of need something like this in my project like I said. Have you got any other ideas of implementing a similar solution (that also applies to repository methods) ?

Regards

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants