Crete a contextual parameter. This relies database context having a specific encoder for the specified type. In order to do that, extend your desired database context add the corresponding encoder to the "additionalEncoders" parameter.
Alias for Param.contextual
Alias for Param.withSerializer