FINERACT-2652: Decouple SavingsAccount from injected collaborators#6024
Open
alberto-art3ch wants to merge 1 commit into
Open
Conversation
adamsaghy
reviewed
Jun 26, 2026
| List<LocalDate> postedAsOnTransactionDates = getManualPostingDates(); | ||
|
|
||
| final List<LocalDateInterval> postingPeriodIntervals = this.savingsHelper.determineInterestPostingPeriods( | ||
| final List<LocalDateInterval> postingPeriodIntervals = context.savingsHelper().determineInterestPostingPeriods( |
Contributor
There was a problem hiding this comment.
Not much better if we are still injecting (not directly, but via arguments) services into the JPA...
Contributor
Author
There was a problem hiding this comment.
It has already been updated and a more robust change has been made for the extraction of business methods from Savings and Deposit entities.
adamsaghy
requested changes
Jun 26, 2026
adamsaghy
left a comment
Contributor
There was a problem hiding this comment.
I am having concerns. It's better than directly injecting services and helpers into the JPA, but still not clean solution:
- Injecting
contextwhich contains helpers / services which are called inside the JPA entity still
Would it be possible to truly decouple and extract all these logic out of the JPA entity?
4cd4f98 to
5d799c8
Compare
Contributor
|
5d799c8 to
382a1b8
Compare
382a1b8 to
d05c3c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We are removing @transient service fields from SavingsAccount.
The transient SavingsAccountTransactionSummaryWrapper, SavingsHelper and ConfigurationDomainService (previously injected post-hydration via setHelpers) and the accountNumberRequiresAutoGeneration flag are removed. The three stateless collaborators are bundled into a new singleton SavingsContext bean that is passed as a method parameter; the account-number flag is derived at the service layer.
FINERACT-2652
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.