Class AbstractDynamoDBConfiguration
- java.lang.Object
-
- org.socialsignin.spring.data.dynamodb.config.AbstractDynamoDBConfiguration
-
@Configuration public abstract class AbstractDynamoDBConfiguration extends java.lang.ObjectBase class for Spring Data DynamoDB configuration using JavaConfig.- Author:
- Vito Limandibhrata
-
-
Constructor Summary
Constructors Constructor Description AbstractDynamoDBConfiguration()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.amazonaws.auth.AWSCredentialsamazonAWSCredentials()abstract com.amazonaws.services.dynamodbv2.AmazonDynamoDBamazonDynamoDB()DynamoDBMappingContextdynamoDBMappingContext()Creates aDynamoDBMappingContextequipped with entity classes scanned from the mapping base package.protected java.util.Set<java.lang.Class<?>>getInitialEntitySet()Scans the mapping base package for classes annotated withDynamoDBTable.protected java.lang.String[]getMappingBasePackages()Return the base packages to scan for mappedDynamoDBTables.
-
-
-
Method Detail
-
amazonDynamoDB
public abstract com.amazonaws.services.dynamodbv2.AmazonDynamoDB amazonDynamoDB()
-
amazonAWSCredentials
public abstract com.amazonaws.auth.AWSCredentials amazonAWSCredentials()
-
getMappingBasePackages
protected java.lang.String[] getMappingBasePackages()
Return the base packages to scan for mappedDynamoDBTables. Will return the package name of the configuration class' (the concrete class, not this one here) by default. So if you have acom.acme.AppConfigextendingAbstractDynamoDBConfigurationthe base package will be consideredcom.acmeunless the method is overriden to implement alternate behaviour.- Returns:
- the base package to scan for mapped
DynamoDBTableclasses or null to not enable scanning for entities.
-
dynamoDBMappingContext
@Bean public DynamoDBMappingContext dynamoDBMappingContext() throws java.lang.ClassNotFoundException
Creates aDynamoDBMappingContextequipped with entity classes scanned from the mapping base package.- Returns:
- A newly created
DynamoDBMappingContext - Throws:
java.lang.ClassNotFoundException- if the class withDynamoDBTableannotation can't be loaded- See Also:
getMappingBasePackages()
-
getInitialEntitySet
protected java.util.Set<java.lang.Class<?>> getInitialEntitySet() throws java.lang.ClassNotFoundExceptionScans the mapping base package for classes annotated withDynamoDBTable.- Returns:
- All classes with
DynamoDBTableannotation - Throws:
java.lang.ClassNotFoundException- if the class withDynamoDBTableannotation can't be loaded- See Also:
getMappingBasePackages()
-
-