Class ConvertExpression
- java.lang.Object
-
- dev.morphia.aggregation.experimental.expressions.impls.Expression
-
- dev.morphia.aggregation.experimental.expressions.impls.ConvertExpression
-
public class ConvertExpression extends Expression
-
-
Constructor Summary
Constructors Constructor Description ConvertExpression(Expression input, ConvertType to)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(Mapper mapper, org.bson.BsonWriter writer, org.bson.codecs.EncoderContext encoderContext)
ConvertExpression
onError(Expression onError)
The value to return on encountering an error during conversion, including unsupported type conversions.ConvertExpression
onNull(Expression onNull)
The value to return if the input is null or missing.-
Methods inherited from class dev.morphia.aggregation.experimental.expressions.impls.Expression
getOperation, getValue, toString
-
-
-
-
Constructor Detail
-
ConvertExpression
public ConvertExpression(Expression input, ConvertType to)
-
-
Method Detail
-
encode
public void encode(Mapper mapper, org.bson.BsonWriter writer, org.bson.codecs.EncoderContext encoderContext)
- Overrides:
encode
in classExpression
- Parameters:
mapper
- the mapperwriter
- the writerencoderContext
- 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
-
-