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 PARTS:
if (value == null) {
unsetParts();
} else {
this.parts = value as Map<int, ScanCursor>;
}
break;
case RETURN_COLUMNS:
if (value == null) {
unsetReturn_columns();
} else {
this.return_columns = value as List<VertexProp>;
}
break;
case LIMIT:
if (value == null) {
unsetLimit();
} else {
this.limit = value as int;
}
break;
case START_TIME:
if (value == null) {
unsetStart_time();
} else {
this.start_time = value as int;
}
break;
case END_TIME:
if (value == null) {
unsetEnd_time();
} else {
this.end_time = value as int;
}
break;
case FILTER:
if (value == null) {
unsetFilter();
} else {
this.filter = value as Int8List;
}
break;
case ONLY_LATEST_VERSION:
if (value == null) {
unsetOnly_latest_version();
} else {
this.only_latest_version = value as bool;
}
break;
case ENABLE_READ_FROM_FOLLOWER:
if (value == null) {
unsetEnable_read_from_follower();
} else {
this.enable_read_from_follower = value as bool;
}
break;
case COMMON:
if (value == null) {
unsetCommon();
} else {
this.common = value as RequestCommon;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}