getOneRandom method

Future<T> getOneRandom (String correlationId, Map<String, dynamic> filter)

Gets a random item from items that match to a given filter.

This method shall be called by a public getOneRandom method from child class that receives FilterParams and converts them into a filter function.

  • correlationId (optional) transaction id to trace execution through call chain.
  • filter (optional) a filter JSON object Return Future that receives a random item Throws error.