Skip to content

Commit

Permalink
Polish 5284914
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniycheban committed Aug 5, 2022
1 parent fcc6569 commit 9e72db9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
*/
public class ReindexerTransactionManager<T> extends AbstractPlatformTransactionManager {

private final ReindexerNamespace<T> namespace;

private final Reindexer reindexer;

private final ReindexerNamespace<T> namespace;

/**
* Creates an instance.
*
Expand All @@ -52,12 +52,12 @@ public ReindexerTransactionManager(Reindexer reindexer, Class<T> domainClass) {
Assert.notNull(reindexer, "reindexer cannot be null");
Assert.notNull(domainClass, "domainClass cannot be null");
this.reindexer = reindexer;
this.namespace = getNamespace(reindexer, domainClass);
this.namespace = openNamespace(domainClass);
}

private ReindexerNamespace<T> getNamespace(Reindexer reindexer, Class<T> domainClass) {
private ReindexerNamespace<T> openNamespace(Class<T> domainClass) {
ReindexerEntityInformation<T, ?> entityInformation = MappingReindexerEntityInformation.getInstance(domainClass);
return (ReindexerNamespace<T>) reindexer.openNamespace(entityInformation.getNamespaceName(),
return (ReindexerNamespace<T>) this.reindexer.openNamespace(entityInformation.getNamespaceName(),
entityInformation.getNamespaceOptions(), domainClass);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public class SimpleReindexerRepository<T, ID> implements ReindexerRepository<T,
*/
public SimpleReindexerRepository(ReindexerEntityInformation<T, ID> entityInformation, Reindexer reindexer) {
this.entityInformation = entityInformation;
this.namespace = getNamespace(entityInformation, reindexer);
this.namespace = openNamespace(entityInformation, reindexer);
}

private TransactionalNamespace<T> getNamespace(ReindexerEntityInformation<T, ID> entityInformation, Reindexer reindexer) {
private TransactionalNamespace<T> openNamespace(ReindexerEntityInformation<T, ID> entityInformation, Reindexer reindexer) {
Namespace<T> namespace = reindexer.openNamespace(entityInformation.getNamespaceName(),
entityInformation.getNamespaceOptions(), entityInformation.getJavaType());
return new TransactionalNamespace<>(namespace);
Expand Down

0 comments on commit 9e72db9

Please sign in to comment.