Skip to content

Extract sub-row builders and refactor DmfsTaskBuilder to Entity-based approach#366

Draft
sunkup wants to merge 1 commit into
mainfrom
340-5-subrow-entity-refactor
Draft

Extract sub-row builders and refactor DmfsTaskBuilder to Entity-based approach#366
sunkup wants to merge 1 commit into
mainfrom
340-5-subrow-entity-refactor

Conversation

@sunkup
Copy link
Copy Markdown
Member

@sunkup sunkup commented May 12, 2026

Closes #357. Part of #340.

Extract ListIdBuilder, AlarmsBuilder, CategoriesBuilder, CommentsBuilder, RelationsBuilder, and UnknownPropertiesBuilder. Sub-row builders use Entity.addSubValue() instead of writing ContentProviderOperation rows directly, keeping all logic in the builder class.

DmfsTaskBuilder is now a thin orchestrator:

  • buildTask() returns an Entity populated by all field builders
  • addRows() inserts the main row then each sub-value with a back-reference to the task ID
  • updateRows() updates the main row (removing LIST_ID) and inserts sub-values with the existing task ID
  • The old insertAlarms/insertCategories/insertComment/insertRelatedTo/insertUnknownProperties private methods and the withTaskId() helper are removed
  • insertProperties() is kept as a no-op for backwards compatibility with DmfsTask

Each builder has a corresponding unit test.

Depends on #358 #363 #364 #365

…proach

Extract ListIdBuilder, AlarmsBuilder, CategoriesBuilder, CommentsBuilder,
RelationsBuilder, and UnknownPropertiesBuilder from DmfsTaskBuilder.
@sunkup sunkup marked this pull request as draft May 12, 2026 12:01
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.

DmfsTask: extract sub-row builders and refactor DmfsTaskBuilder to Entity-based approach

1 participant