Search in sources :

Example 1 with DoNotEncrypt

use of com.amazonaws.services.dynamodbv2.datamodeling.encryption.DoNotEncrypt 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

DynamoDBAttribute (com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute)1 DoNotEncrypt (com.amazonaws.services.dynamodbv2.datamodeling.encryption.DoNotEncrypt)1 DateTimeFormatter (java.time.format.DateTimeFormatter)1