setFieldValue method
Set a field's value by fieldId
. Primitive types must be "boxed" in the
appropriate object wrapper type.
Implementation
setFieldValue(int fieldID, Object? value) {
switch (fieldID) {
case JOB_TYPE:
if (value == null) {
unsetJob_type();
} else {
this.job_type = value as int?;
}
break;
case JOB_ID:
if (value == null) {
unsetJob_id();
} else {
this.job_id = value as int;
}
break;
case TASK_ID:
if (value == null) {
unsetTask_id();
} else {
this.task_id = value as int;
}
break;
case PARA:
if (value == null) {
unsetPara();
} else {
this.para = value as TaskPara?;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}