com.amazonaws.services.dynamodbv2.xspec.SubstitutionContext Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dynamodb Show documentation
/*
* Copyright 2015-2022 Amazon Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://aws.amazon.com/apache2.0
*
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and
* limitations under the License.
*/
package com.amazonaws.services.dynamodbv2.xspec;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* An internal class to represent the substitution context for name maps and
* value maps.
*
* To avoid attribute names that may conflict with the DynamoDB reserved words,
* the expressions builder will automatically transform every component of a
* document path into the use of an "expression attribute name" (that begins
* with "#") as a placeholder. The actual mapping from the
* "expression attribute name" to the actual attribute name is automatically
* taken care of by the builder in a "name map". Similarly, the actual mapping
* from the "expression attribute value" (that begins with ":") to the actual
* attribute value is automatically taken care of by the builder in a
* "value map". See more information at Using Placeholders for Attribute Names and Values.
*/
final class SubstitutionContext {
private final Map nameToToken =
new LinkedHashMap();
private final Map