/**
 * Setter for the query argument
 *
 * @param   DatabaseQuery  $value  The value to set
 *
 * @return  mixed
 *
 * @throws  BadMethodCallException  if the argument is not of the expected type
 */
protected function setQuery($value)
{
    if (!$value instanceof DatabaseQuery) {
        throw new BadMethodCallException("Argument 'query' of event {$this->name} must be of DatabaseQuery type");
    }
    return $value;
}