Class ConvertExpression


  • public class ConvertExpression
    extends Expression
    • Method Detail

      • encode

        public void encode​(Mapper mapper,
                           org.bson.BsonWriter writer,
                           org.bson.codecs.EncoderContext encoderContext)
        Overrides:
        encode in class Expression
        Parameters:
        mapper - the mapper
        writer - the writer
        encoderContext - the context
      • onError

        public ConvertExpression onError​(Expression onError)
        The value to return on encountering an error during conversion, including unsupported type conversions.
        Parameters:
        onError - the value
        Returns:
        this
      • onNull

        public ConvertExpression onNull​(Expression onNull)
        The value to return if the input is null or missing.
        Parameters:
        onNull - the value
        Returns:
        this