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

io.dataspray.singletable.DynamoMapper Maven / Gradle / Ivy

Go to download

DynamoDB best practices encourages a single-table design that allows multiple record types to reside within the same table. The goal of this library is to improve the experience of Java developers and make it safer to define non-conflicting schema of each record, serializing and deserializing automatically and working with secondary indexes.

The newest version!
// SPDX-FileCopyrightText: 2019-2022 Matus Faro 
// SPDX-License-Identifier: Apache-2.0
package io.dataspray.singletable;

import software.amazon.awscdk.services.dynamodb.Table;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
import software.constructs.Construct;

public interface DynamoMapper {

    String getTableName();

    Table createCdkTable(Construct scope, String stackId, int lsiCount, int gsiCount);

    void createTableIfNotExists(DynamoDbClient dynamo, int lsiCount, int gsiCount);

     TableSchema parseTableSchema(Class objClazz);

     IndexSchema parseLocalSecondaryIndexSchema(long indexNumber, Class objClazz);

     IndexSchema parseGlobalSecondaryIndexSchema(long indexNumber, Class objClazz);

     ShardedTableSchema parseShardedTableSchema(Class objClazz);

     ShardedIndexSchema parseShardedLocalSecondaryIndexSchema(long indexNumber, Class objClazz);

     ShardedIndexSchema parseShardedGlobalSecondaryIndexSchema(long indexNumber, Class objClazz);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy