Package org.springframework.data.mongodb.core.spel

Examples of org.springframework.data.mongodb.core.spel.LiteralNode


     */
    @Override
    @SuppressWarnings("unchecked")
    protected Object convert(AggregationExpressionTransformationContext<LiteralNode> context) {

      LiteralNode node = context.getCurrentNode();
      Object value = node.getValue();

      if (context.hasPreviousOperation()) {

        if (node.isUnaryMinus(context.getParentNode())) {
          // unary minus operator
          return NumberUtils.convertNumberToTargetClass(((Number) value).doubleValue() * -1,
              (Class<Number>) value.getClass()); // retain type, e.g. int to -int
        }

View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.spel.LiteralNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.