Skip to content
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

chore: metadata query cleanup [DHIS2-18041] #20075

Merged
merged 6 commits into from
Feb 26, 2025
Merged

chore: metadata query cleanup [DHIS2-18041] #20075

merged 6 commits into from
Feb 26, 2025

Conversation

jbee
Copy link
Contributor

@jbee jbee commented Feb 25, 2025

  • replace Schema with Class<T> in Query (Schema is a service "internal" solution)
  • add generic to Query and propagate it in all APIs and usages
  • rename Query.from to Query.of (since it no longer is created from a Schema but for/of a object type Class)
  • move the Query.setDefaultOrders() addition of actual Orders into the service (since they need Schema information)
  • added Query.shortNamePersisted to remember if the schema has a persisted short name

@jbee jbee self-assigned this Feb 25, 2025
@jbee jbee requested a review from a team as a code owner February 25, 2025 17:18
* @param filter the filter that is applied
* @param value a function to extract the filter property value from an object
*/
private record Matcher(Filter filter, Function<IdentifiableObject, Object> value) {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: ATM the Matcher indirection adds no benefit. I started this and then found that the refactoring the getValue needs will be quite extensive so I rather do it in another PR. But this is a preparation for it.

@jbee jbee merged commit 5434718 into master Feb 26, 2025
17 checks passed
@jbee jbee deleted the DHIS2-18041-query branch February 26, 2025 11:08
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