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 ERROR_CODE:
if (value == null) {
unsetError_code();
} else {
this.error_code = value as int?;
}
break;
case LATENCY_IN_US:
if (value == null) {
unsetLatency_in_us();
} else {
this.latency_in_us = value as int;
}
break;
case DATA:
if (value == null) {
unsetData();
} else {
this.data = value as t_nebula.DataSet?;
}
break;
case SPACE_NAME:
if (value == null) {
unsetSpace_name();
} else {
this.space_name = value as Int8List?;
}
break;
case ERROR_MSG:
if (value == null) {
unsetError_msg();
} else {
this.error_msg = value as Int8List?;
}
break;
case PLAN_DESC:
if (value == null) {
unsetPlan_desc();
} else {
this.plan_desc = value as PlanDescription?;
}
break;
case COMMENT:
if (value == null) {
unsetComment();
} else {
this.comment = value as Int8List?;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}