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 SPACE_ID:
if (value == null) {
unsetSpace_id();
} else {
this.space_id = value as int;
}
break;
case PART_ID:
if (value == null) {
unsetPart_id();
} else {
this.part_id = value as int;
}
break;
case VERTEX_ID:
if (value == null) {
unsetVertex_id();
} else {
this.vertex_id = value as t_nebula.Value?;
}
break;
case TAG_ID:
if (value == null) {
unsetTag_id();
} else {
this.tag_id = value as int;
}
break;
case UPDATED_PROPS:
if (value == null) {
unsetUpdated_props();
} else {
this.updated_props = value as List<UpdatedProp>?;
}
break;
case INSERTABLE:
if (value == null) {
unsetInsertable();
} else {
this.insertable = value as bool?;
}
break;
case RETURN_PROPS:
if (value == null) {
unsetReturn_props();
} else {
this.return_props = value as List<Int8List>?;
}
break;
case CONDITION:
if (value == null) {
unsetCondition();
} else {
this.condition = value as Int8List?;
}
break;
case COMMON:
if (value == null) {
unsetCommon();
} else {
this.common = value as RequestCommon?;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}