chore: Remove preprocess that filters out deleted entitites in tracker stores [DHIS2-18883] #19921
+164
−313
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.
Remove
preProcessPredicates
andpostProcessObject
methods from entity stores. Now, when getting an entity using any method from the store, we need to check if the entity is deleted or not.We still need to have the
isDeleted
check in a few places in our services but we want to remove them, we should check for it only in the stores:TrackedEntityService
: it will be removed when completing https://dhis2.atlassian.net/browse/DHIS2-18541. (One of next PRs)RelationshipService
: relationships do not work as the other entities so there is some thinking to do here (we don't have a clear single vs multiple methods as the other entities have). It may be removed in one of next PRsOperationsParamsValidator
: we need to retrieve the parent entity (trackedEntity for enrollment and enrollment for event) to check for existence. We need to fix the logic to consider parameterincludeDeleted
when checking for existence. This is needed when a parent service is calling a child service (TrackedEntityService
callingEnrollmentService
) and the parent entity is soft-deleted. More details will come in the PR working on this.Next steps
isDeleted
check inOperationsParamsValidator
deleted
entities inRelationshipService
.isDeleted
check fromRelationshipService
RelationshipService
in order to only retrieve from the DB what is needed.view
model in relationship tests