Skip to content

Commit

Permalink
#398 Refactor as per comments from kubko
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsanbagwan authored and Brutus5000 committed Feb 20, 2021
1 parent efbbceb commit 51c6e86
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/com/faforever/api/config/elide/ElideConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;
import java.time.Duration;
import java.time.Instant;
import java.time.OffsetDateTime;
Expand All @@ -57,12 +55,12 @@ public class ElideConfig {
public static final String DEFAULT_CACHE_NAME = "Elide.defaultCache";

@Bean
public Elide elide(DataStore dataStore, ObjectMapper objectMapper, EntityDictionary entityDictionary, ExtendedAuditLogger extendedAuditLogger) {
public Elide elide(SearchDataStore searchStore, ObjectMapper objectMapper, EntityDictionary entityDictionary, ExtendedAuditLogger extendedAuditLogger) {
RSQLFilterDialect rsqlFilterDialect = new RSQLFilterDialect(entityDictionary, new CaseSensitivityStrategy.UseColumnCollation());

registerAdditionalConverters();

return new Elide(new ElideSettingsBuilder(dataStore)
return new Elide(new ElideSettingsBuilder(searchStore)
.withJsonApiMapper(new JsonApiMapper(entityDictionary, objectMapper))
.withAuditLogger(extendedAuditLogger)
.withEntityDictionary(entityDictionary)
Expand All @@ -79,8 +77,8 @@ SpringHibernateDataStore springHibernateDataStore(PlatformTransactionManager txM
}

@Bean
DataStore searchStore(SpringHibernateDataStore shds, EntityManagerFactory entityManagerFactory) {
return new SearchDataStore(shds, entityManagerFactory,true);
SearchDataStore searchStore(SpringHibernateDataStore springHibernateDataStore, EntityManagerFactory entityManagerFactory) {
return new SearchDataStore(springHibernateDataStore, entityManagerFactory,true);
}

/**
Expand Down

0 comments on commit 51c6e86

Please sign in to comment.