Skip to content

Add JpaCursorItemReader implementation #3775

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 1 commit into from

Conversation

fmbenhassine
Copy link
Contributor

This PR is for Issue #901. It adds a cursor-based implementation of an ItemStreamReader based on Query#getResultStream() which was added in JPA 2.2.

The new reader passes the same test suite as other cursor-based implementations.


/**
* The {@link EntityManagerFactory} to be used for executing the configured
* {@link #queryString}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this with the QueryProvider approach as well.

* Create a new {@link JpaCursorItemReader}.
*/
public JpaCursorItemReader() {
setName(ClassUtils.getShortName(JpaCursorItemReader.class));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do this if you are going to require a name to be set in the builder?

@fmbenhassine
Copy link
Contributor Author

Merged in 4185400.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants