Search in sources :

Example 16 with Index

use of com.amazonaws.services.dynamodbv2.document.Index in project qpp-conversion-tool by CMSgov.

the class Metadata method getCpcProcessedCreateDate.

/**
 * Returns an attribute that combines the CPC+ processed state and the date of creation.
 *
 * This is mostly useful in the CPC+ global secondary index.
 *
 * @return The combined attribute.
 */
@DoNotEncrypt
@DynamoDBAttribute(attributeName = Constants.DYNAMO_CPC_PROCESSED_CREATE_DATE_ATTRIBUTE)
public String getCpcProcessedCreateDate() {
    String combination = null;
    if (cpcProcessed != null) {
        DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT;
        combination = cpcProcessed.toString() + "#" + formatter.format(createdDate);
    }
    return combination;
}
Also used : DateTimeFormatter(java.time.format.DateTimeFormatter) DoNotEncrypt(com.amazonaws.services.dynamodbv2.datamodeling.encryption.DoNotEncrypt) DynamoDBAttribute(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute)

Aggregations

Table (com.amazonaws.services.dynamodbv2.document.Table)6 Item (com.amazonaws.services.dynamodbv2.document.Item)4 CreateTableRequest (com.amazonaws.services.dynamodbv2.model.CreateTableRequest)4 LocalSecondaryIndex (com.amazonaws.services.dynamodbv2.model.LocalSecondaryIndex)4 ProvisionedThroughput (com.amazonaws.services.dynamodbv2.model.ProvisionedThroughput)4 ArrayList (java.util.ArrayList)4 AttributeDefinition (com.amazonaws.services.dynamodbv2.model.AttributeDefinition)3 KeySchemaElement (com.amazonaws.services.dynamodbv2.model.KeySchemaElement)3 Projection (com.amazonaws.services.dynamodbv2.model.Projection)3 AmazonServiceException (com.amazonaws.AmazonServiceException)2 AmazonDynamoDB (com.amazonaws.services.dynamodbv2.AmazonDynamoDB)2 Index (com.amazonaws.services.dynamodbv2.document.Index)2 QueryOutcome (com.amazonaws.services.dynamodbv2.document.QueryOutcome)2 QuerySpec (com.amazonaws.services.dynamodbv2.document.spec.QuerySpec)2 UpdateItemSpec (com.amazonaws.services.dynamodbv2.document.spec.UpdateItemSpec)2 ValueMap (com.amazonaws.services.dynamodbv2.document.utils.ValueMap)2 AttributeValue (com.amazonaws.services.dynamodbv2.model.AttributeValue)2 Condition (com.amazonaws.services.dynamodbv2.model.Condition)2 GlobalSecondaryIndex (com.amazonaws.services.dynamodbv2.model.GlobalSecondaryIndex)2 QueryRequest (com.amazonaws.services.dynamodbv2.model.QueryRequest)2