Skip to content

chore: [ANDROSDK-2333] migrate conflict and data value models to kotlin#2648

Merged
taridepaco merged 9 commits into
developfrom
ANDROSDK-2333
Jun 30, 2026
Merged

chore: [ANDROSDK-2333] migrate conflict and data value models to kotlin#2648
taridepaco merged 9 commits into
developfrom
ANDROSDK-2333

Conversation

@taridepaco

@taridepaco taridepaco commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Migrates the import/data-value conflict models and the DataValue model from Java AutoValue to Kotlin data classes using the @ModelBuilder annotation, continuing the model-migration effort (batch 15). TrackerImportConflict and DataValueConflict are straightforward CoreObject conversions. DataValue extends BaseDeletableDataObject, so it follows the Event precedent: it now implements DataObjectKt/DeletableDataObjectKt with syncState/deleted properties, and the builder's SYNCED/false defaults are preserved in the builder() factory to keep behavior identical across all construction paths.

Related task: ANDROSDK-2333

data class DataValue(
override val syncState: State?,
override val deleted: Boolean?,
val dataElement: String?,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could try to make these 5 properties non-null. They are non-null in the DTO and they are the primary key in the DB. Maybe it has more implications that I don't see now.

data class DataValueConflict(
val conflict: String?,
val value: String?,
val attributeOptionCombo: String?,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here, these 5 properties are non-null in the db. This class is only generated internally in the SDK (it does not come from the API).

dataValue.dataElement(),
dataValue.categoryOptionCombo(),
dataValue.attributeOptionCombo(),
DataValueInternalAccessor.accessSourceDataSet(dataValue)!!,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This internal accessor, could it be removed?

@sonarqubecloud

Copy link
Copy Markdown

@taridepaco taridepaco merged commit 8464d48 into develop Jun 30, 2026
11 checks passed
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