All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nimbusds.infinispan.persistence.dynamodb.PrimaryKeyValue Maven / Gradle / Ivy

There is a newer version: 7.0
Show newest version
package com.nimbusds.infinispan.persistence.dynamodb;


/**
 * DynamoDB primary key value (hash key, with optional range key).
 */
public final class PrimaryKeyValue {
	
	
	/**
	 * The hash key value.
	 */
	private final String hashKeyValue;
	
	
	/**
	 * The optional range key value.
	 */
	private final String rangeKeyValue;
	
	
	/**
	 * Creates a new DynamoDB primary key value.
	 *
	 * @param hashKeyValue  The hash key value. Must not be {@code null}.
	 * @param rangeKeyValue The optional range key value, {@code null} if
	 *                      none.
	 */
	public PrimaryKeyValue(final String hashKeyValue, final String rangeKeyValue) {
		if (hashKeyValue == null) {
			throw new IllegalArgumentException("The hash key value must not be null");
		}
		this.hashKeyValue = hashKeyValue;
		this.rangeKeyValue = rangeKeyValue;
	}
	
	
	/**
	 * Returns the hash key value.
	 *
	 * @return The hash key value.
	 */
	public String getHashKeyValue() {
		
		return hashKeyValue;
	}
	
	
	/**
	 * Returns the range key value.
	 *
	 * @return The range key value, {@code null} if none.
	 */
	public String getRangeKeyValue() {
		
		return rangeKeyValue;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy