Class DynamoDBIdIsHashKeyEntityInformationImpl<T,ID>
- java.lang.Object
-
- org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
-
- org.socialsignin.spring.data.dynamodb.repository.support.FieldAndGetterReflectionEntityInformation<T,ID>
-
- org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBIdIsHashKeyEntityInformationImpl<T,ID>
-
- All Implemented Interfaces:
DynamoDBEntityInformation<T,ID>,DynamoDBHashKeyExtractingEntityMetadata<T>,org.springframework.data.repository.core.EntityInformation<T,ID>,org.springframework.data.repository.core.EntityMetadata<T>
public class DynamoDBIdIsHashKeyEntityInformationImpl<T,ID> extends FieldAndGetterReflectionEntityInformation<T,ID> implements DynamoDBEntityInformation<T,ID>
Encapsulates minimal information needed to load DynamoDB entities. This default implementation is NOT range-key aware - getRangeKey(ID id) will always return null Delegates to wrapped DynamoDBHashKeyExtractingEntityMetadata component for many operations - it is the responsibility of calling clients to ensure they pass in a valid DynamoDBHashKeyExtractingEntityMetadata implementation for this entity. Entities of type T must have a public getter method of return type ID annotated with @DynamoDBHashKey to ensure correct behavior- Author:
- Michael Lavelle, Sebastian Just
-
-
Field Summary
-
Fields inherited from class org.socialsignin.spring.data.dynamodb.repository.support.FieldAndGetterReflectionEntityInformation
method
-
-
Constructor Summary
Constructors Constructor Description DynamoDBIdIsHashKeyEntityInformationImpl(java.lang.Class<T> domainClass, DynamoDBHashKeyExtractingEntityMetadata<T> metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDynamoDBTableName()java.util.Map<java.lang.String,java.lang.String[]>getGlobalSecondaryIndexNamesByPropertyName()java.lang.ObjectgetHashKey(ID id)java.lang.StringgetHashKeyPropertyName()java.util.Optional<java.lang.Integer>getLimit()<V extends com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMarshaller<?>>
VgetMarshallerForProperty(java.lang.String propertyName)java.util.Optional<java.lang.String>getOverriddenAttributeName(java.lang.String attributeName)java.util.Optional<java.lang.String>getProjection()java.lang.ObjectgetRangeKey(ID id)com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter<?,?>getTypeConverterForProperty(java.lang.String propertyName)booleanisCompositeHashAndRangeKeyProperty(java.lang.String propertyName)booleanisGlobalIndexHashKeyProperty(java.lang.String propertyName)booleanisGlobalIndexRangeKeyProperty(java.lang.String propertyName)booleanisHashKeyProperty(java.lang.String propertyName)-
Methods inherited from class org.socialsignin.spring.data.dynamodb.repository.support.FieldAndGetterReflectionEntityInformation
getId, getIdType
-
Methods inherited from class org.springframework.data.repository.core.support.AbstractEntityInformation
getJavaType, isNew
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBEntityInformation
isRangeKeyAware
-
-
-
-
Constructor Detail
-
DynamoDBIdIsHashKeyEntityInformationImpl
public DynamoDBIdIsHashKeyEntityInformationImpl(java.lang.Class<T> domainClass, DynamoDBHashKeyExtractingEntityMetadata<T> metadata)
-
-
Method Detail
-
getProjection
public java.util.Optional<java.lang.String> getProjection()
- Specified by:
getProjectionin interfaceDynamoDBEntityInformation<T,ID>
-
getLimit
public java.util.Optional<java.lang.Integer> getLimit()
- Specified by:
getLimitin interfaceDynamoDBEntityInformation<T,ID>
-
getHashKey
public java.lang.Object getHashKey(ID id)
- Specified by:
getHashKeyin interfaceDynamoDBEntityInformation<T,ID>
-
getOverriddenAttributeName
public java.util.Optional<java.lang.String> getOverriddenAttributeName(java.lang.String attributeName)
- Specified by:
getOverriddenAttributeNamein interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
isHashKeyProperty
public boolean isHashKeyProperty(java.lang.String propertyName)
- Specified by:
isHashKeyPropertyin interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
isCompositeHashAndRangeKeyProperty
public boolean isCompositeHashAndRangeKeyProperty(java.lang.String propertyName)
- Specified by:
isCompositeHashAndRangeKeyPropertyin interfaceDynamoDBEntityInformation<T,ID>
-
getMarshallerForProperty
public <V extends com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMarshaller<?>> V getMarshallerForProperty(java.lang.String propertyName)
- Specified by:
getMarshallerForPropertyin interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
getTypeConverterForProperty
public com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter<?,?> getTypeConverterForProperty(java.lang.String propertyName)
- Specified by:
getTypeConverterForPropertyin interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
getRangeKey
public java.lang.Object getRangeKey(ID id)
- Specified by:
getRangeKeyin interfaceDynamoDBEntityInformation<T,ID>
-
getDynamoDBTableName
public java.lang.String getDynamoDBTableName()
- Specified by:
getDynamoDBTableNamein interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
getHashKeyPropertyName
public java.lang.String getHashKeyPropertyName()
- Specified by:
getHashKeyPropertyNamein interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
getGlobalSecondaryIndexNamesByPropertyName
public java.util.Map<java.lang.String,java.lang.String[]> getGlobalSecondaryIndexNamesByPropertyName()
- Specified by:
getGlobalSecondaryIndexNamesByPropertyNamein interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
isGlobalIndexHashKeyProperty
public boolean isGlobalIndexHashKeyProperty(java.lang.String propertyName)
- Specified by:
isGlobalIndexHashKeyPropertyin interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
isGlobalIndexRangeKeyProperty
public boolean isGlobalIndexRangeKeyProperty(java.lang.String propertyName)
- Specified by:
isGlobalIndexRangeKeyPropertyin interfaceDynamoDBHashKeyExtractingEntityMetadata<T>
-
-