Example usage for com.amazonaws.services.dynamodbv2.xspec ExpressionSpecBuilder attribute

List of usage examples for com.amazonaws.services.dynamodbv2.xspec ExpressionSpecBuilder attribute

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.xspec ExpressionSpecBuilder attribute.

Prototype

public static PathOperand attribute(String path) 

Source Link

Document

Returns a path operand that refers to an attribute of some unspecified <a href="http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html">data type</a>; used for building expressions.

Usage

From source file:com.github.fge.jsonpatch.CopyOperation.java

License:LGPL

@Override
public void applyToBuilder(ExpressionSpecBuilder builder) {
    String copyPath = pathGenerator.apply(from);
    String setPath = pathGenerator.apply(path);
    //set the attribute in the path location
    builder.addUpdate(new PathSetAction(ExpressionSpecBuilder.attribute(setPath),
            ExpressionSpecBuilder.attribute(copyPath)));
}

From source file:com.github.fge.jsonpatch.MoveOperation.java

License:LGPL

@Override
public void applyToBuilder(ExpressionSpecBuilder builder) {
    String removePath = pathGenerator.apply(from);
    String setPath = pathGenerator.apply(path);
    //remove the attribute in the from location
    builder.addUpdate(ExpressionSpecBuilder.remove(removePath));
    //set the attribute in the path location
    builder.addUpdate(new PathSetAction(ExpressionSpecBuilder.attribute(setPath),
            ExpressionSpecBuilder.attribute(removePath)));
}