Skip to content

Commit

Permalink
chore: passing settings to implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Maximillian Arruda <dearrudam@gmail.com>
  • Loading branch information
dearrudam committed Mar 12, 2024
1 parent 6206570 commit 6969a61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public class DynamoDBDocumentConfiguration extends DynamoDBConfiguration
@Override
public DynamoDBDocumentManagerFactory apply(Settings settings) {
var dynamoDB = getDynamoDB(settings);
return new DynamoDBDocumentManagerFactory(dynamoDB);
return new DynamoDBDocumentManagerFactory(dynamoDB, settings);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package org.eclipse.jnosql.databases.dynamodb.communication;

import org.eclipse.jnosql.communication.Settings;
import org.eclipse.jnosql.communication.document.DocumentManager;
import org.eclipse.jnosql.communication.document.DocumentManagerFactory;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
Expand All @@ -24,14 +25,16 @@
public class DynamoDBDocumentManagerFactory implements DocumentManagerFactory {

private final DynamoDbClient dynamoDB;
private final Settings settings;

public DynamoDBDocumentManagerFactory(DynamoDbClient dynamoDB) {
public DynamoDBDocumentManagerFactory(DynamoDbClient dynamoDB, Settings settings) {
this.dynamoDB = dynamoDB;
this.settings = settings;
}

@Override
public DocumentManager apply(String database) {
return new DynamoDBDocumentManager(database, dynamoDB);
return new DynamoDBDocumentManager(database, dynamoDB, settings);
}

@Override
Expand Down

0 comments on commit 6969a61

Please sign in to comment.