set method

  1. @override
Future<UserRolesV1?> set(
  1. String? correlationId,
  2. UserRolesV1? item
)

Sets a data item. If the data item exists it updates it, otherwise it create a new data item.

  • correlation_id (optional) transaction id to trace execution through call chain.
  • item a item to be set. Return Future that receives updated item Throws error.

Implementation

@override
Future<UserRolesV1?> set(String? correlationId, UserRolesV1? item) async {
  if (item == null) {
    return null;
  }

  item.update_time = item.update_time ?? DateTime.now();

  return super.set(correlationId, item);
}