Skip to content

Change visibility of properties in JdbcPagingItemReaderBuilder #4331

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

Conversation

Ditscheridou
Copy link
Contributor

There are cases, when you want to extend the JdbcPagingItemReader by adding some custom fields and behaviours, but want to stay in the normal way of creating this class via a some kind of derived JdbcPagingItemReaderBuilder class. If you want to do it, you currently have to reimplement the whole class just for adding some fields because there is no non-ugly way to access the fields. My proposal here is to make them protected, so you can override the default build() method behaviour in your derived class and still have access to the properties.

…java from private to protected

There are cases, when you want to extend the JdbcPagingItemReader by adding some custom fields and behaviours, but want to stay in the normal way of creating this class via a Builder class. If you want to do it, you currently have to reimplement the whole class just for adding some fields because there is no non-ugly way to access the fields. My proposal here is to make them protected, so you can override the default build() method behaviour in your derived class and still have access to the properties.
@fmbenhassine fmbenhassine changed the title Changed visibility of propertys from the JdbcPagingItemReaderBuilder Change visibility of properties in JdbcPagingItemReaderBuilder Mar 21, 2023
@fmbenhassine fmbenhassine added this to the 5.0.2 milestone Mar 21, 2023
fmbenhassine pushed a commit that referenced this pull request May 3, 2023
…uilder

There are cases, when you want to extend the JdbcPagingItemReader
by adding some custom fields and behaviours, but want to stay in
the normal way of creating this class via a Builder class.

If you want to do it, you currently have to reimplement the whole
class just for adding some fields because there is no non-ugly way
to access the fields. This commit makes those properties protected,
so one can override the default build() method behaviour in the
derived class and still have access to the properties.

Issue #4331
@fmbenhassine
Copy link
Contributor

LGTM. Rebased and merged as bb337c6. Thank you for your contribution!

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