添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Package org.springframework.data.mongodb.core.aggregation

Class ConvertOperators.ToString

java.lang.Object
org.springframework.data.mongodb.core.aggregation.ConvertOperators.ToString
All Implemented Interfaces:
AggregationExpression , MongoExpression
Enclosing class:
ConvertOperators
public static class ConvertOperators.ToString extends Object
AggregationExpression for $toString that converts a value to string. Shorthand for Convert#to("string") .
NOTE: Requires MongoDB 4.0 or later.
Since:
Author:
Christoph Strobl
See Also:
  • https://docs.mongodb.com/manual/reference/operator/aggregation/toString/
  • protected List < Object >
    append ( Object value, org.springframework.data.mongodb.core.aggregation.AbstractAggregationExpression.Expand expandList)
    protected Map < String , Object >
    protected Map < String , Object >
    appendAt (int index, String key, Object value)
    Append the given key at the position in the underlying LinkedHashMap .
    protected Map < String , Object >
    protected Map < String , Object >
    Get the argument map.
    protected static List < Field >
    asFields ( String ... fieldRefs)
    protected boolean
    Check if the given key is available.
    protected <T> T
    get (int index)
    Get the value at a given index.
    protected <T> T
    Get the value for a given key.
    protected String
    protected boolean
    protected Map < String , Object >
    org.bson.Document
    org.bson.Document
    Turns the AggregationExpression into a Document within the given AggregationOperationContext .
    Creates new ConvertOperators.ToString using the given value as input.
    protected List < Object >

    Methods inherited from class java.lang. Object

    clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait

    Methods inherited from interface org.springframework.data.mongodb.core.aggregation. AggregationExpression

    toDocument

    toString

    public static ConvertOperators.ToString toString ( Object value)
    Creates new ConvertOperators.ToString using the given value as input.
    Parameters:
    value - must not be null.
    Returns:
    new instance of ConvertOperators.ToString .

    toDocument

    public org.bson.Document toDocument ( AggregationOperationContext context)
    Description copied from interface: AggregationExpression
    Turns the AggregationExpression into a Document within the given AggregationOperationContext .
    Specified by:
    toDocument in interface AggregationExpression
    Parameters:
    context - must not be null.
    Returns:
    the MongoDB native ( Document ) form of the expression.
    String key, Object value)
    Append the given key at the position in the underlying LinkedHashMap .
    Parameters:
    index -
    key -
    value -
    Returns:
    Since:

    contains

    protected boolean contains ( Object key)
    Check if the given key is available.
    Parameters:
    key -
    Returns:
    Since: