GitLab wurde erfolgreich aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Danke für Ihre Geduld.

Commit d486835a authored by Daniel Gerhardt's avatar Daniel Gerhardt

Merge branch 'repos-remove-redundant-param'

parents 0ae62670 f1619d06
package de.thm.arsnova.config;
import de.thm.arsnova.entities.Answer;
import de.thm.arsnova.entities.Comment;
import de.thm.arsnova.entities.Content;
import de.thm.arsnova.entities.DbUser;
import de.thm.arsnova.entities.LogEntry;
import de.thm.arsnova.entities.Motd;
import de.thm.arsnova.entities.MotdList;
import de.thm.arsnova.entities.Session;
import de.thm.arsnova.entities.VisitedSession;
import de.thm.arsnova.entities.serialization.CouchDbObjectMapperFactory;
import de.thm.arsnova.persistance.*;
import de.thm.arsnova.persistance.couchdb.*;
......@@ -48,56 +39,56 @@ public class PersistanceConfig {
@Bean
public LogEntryRepository logEntryRepository() throws Exception {
return new CouchDbLogEntryRepository(LogEntry.class, couchDbConnector(), false);
return new CouchDbLogEntryRepository(couchDbConnector(), false);
}
@Bean
public UserRepository userRepository() throws Exception {
return new CouchDbUserRepository(DbUser.class, couchDbConnector(), false);
return new CouchDbUserRepository(couchDbConnector(), false);
}
@Bean
public SessionRepository sessionRepository() throws Exception {
return new CouchDbSessionRepository(Session.class, couchDbConnector(), false);
return new CouchDbSessionRepository(couchDbConnector(), false);
}
@Bean
public CommentRepository commentRepository() throws Exception {
return new CouchDbCommentRepository(Comment.class, couchDbConnector(), false);
return new CouchDbCommentRepository(couchDbConnector(), false);
}
@Bean
public ContentRepository contentRepository() throws Exception {
return new CouchDbContentRepository(Content.class, couchDbConnector(), false);
return new CouchDbContentRepository(couchDbConnector(), false);
}
@Bean
public AnswerRepository answerRepository() throws Exception {
return new CouchDbAnswerRepository(Answer.class, couchDbConnector(), false);
return new CouchDbAnswerRepository(couchDbConnector(), false);
}
@Bean
public MotdRepository motdRepository() throws Exception {
return new CouchDbMotdRepository(Motd.class, couchDbConnector(), false);
return new CouchDbMotdRepository(couchDbConnector(), false);
}
@Bean
public MotdListRepository motdListRepository() throws Exception {
return new CouchDbMotdListRepository(MotdList.class, couchDbConnector(), false);
return new CouchDbMotdListRepository(couchDbConnector(), false);
}
@Bean
public VisitedSessionRepository visitedSessionRepository() throws Exception {
return new CouchDbVisitedSessionRepository(VisitedSession.class, couchDbConnector(), false);
return new CouchDbVisitedSessionRepository(couchDbConnector(), false);
}
@Bean
public StatisticsRepository statisticsRepository() throws Exception {
return new CouchDbStatisticsRepository(Object.class, couchDbConnector(), false);
return new CouchDbStatisticsRepository(couchDbConnector(), false);
}
@Bean
public SessionStatisticsRepository sessionStatisticsRepository() throws Exception {
return new CouchDbSessionStatisticsRepository(Object.class, couchDbConnector(), false);
return new CouchDbSessionStatisticsRepository(couchDbConnector(), false);
}
}
......@@ -52,8 +52,8 @@ public class CouchDbAnswerRepository extends CouchDbRepositorySupport<Answer> im
private ApplicationEventPublisher publisher;
public CouchDbAnswerRepository(Class<Answer> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbAnswerRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Answer.class, db, createIfNotExists);
}
@Scheduled(fixedDelay = 5000)
......
......@@ -30,8 +30,8 @@ public class CouchDbCommentRepository extends CouchDbRepositorySupport<Comment>
@Autowired
private SessionRepository sessionRepository;
public CouchDbCommentRepository(Class<Comment> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbCommentRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Comment.class, db, createIfNotExists);
}
@Override
......
......@@ -39,8 +39,8 @@ public class CouchDbContentRepository extends CouchDbRepositorySupport<Content>
@Autowired
private AnswerRepository answerRepository;
public CouchDbContentRepository(Class<Content> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbContentRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Content.class, db, createIfNotExists);
}
@Cacheable("skillquestions")
......
......@@ -29,8 +29,8 @@ import java.util.Map;
public class CouchDbLogEntryRepository extends CouchDbRepositorySupport<LogEntry> implements LogEntryRepository {
private static final Logger logger = LoggerFactory.getLogger(CouchDbLogEntryRepository.class);
public CouchDbLogEntryRepository(Class<LogEntry> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbLogEntryRepository(CouchDbConnector db, boolean createIfNotExists) {
super(LogEntry.class, db, createIfNotExists);
}
@Override
......
......@@ -15,8 +15,8 @@ import java.util.List;
public class CouchDbMotdListRepository extends CouchDbRepositorySupport<MotdList> implements MotdListRepository {
private static final Logger logger = LoggerFactory.getLogger(CouchDbMotdListRepository.class);
public CouchDbMotdListRepository(Class<MotdList> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbMotdListRepository(CouchDbConnector db, boolean createIfNotExists) {
super(MotdList.class, db, createIfNotExists);
}
@Override
......
......@@ -37,8 +37,8 @@ public class CouchDbMotdRepository extends CouchDbRepositorySupport<Motd> implem
@Autowired
private ISessionService sessionService;
public CouchDbMotdRepository(Class<Motd> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbMotdRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Motd.class, db, createIfNotExists);
}
@Override
......
......@@ -67,8 +67,8 @@ public class CouchDbSessionRepository extends CouchDbRepositorySupport<Session>
@Autowired
private MotdRepository motdRepository;
public CouchDbSessionRepository(Class<Session> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbSessionRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Session.class, db, createIfNotExists);
}
@Override
......
......@@ -11,8 +11,8 @@ import org.ektorp.support.CouchDbRepositorySupport;
import org.springframework.cache.annotation.Cacheable;
public class CouchDbSessionStatisticsRepository extends CouchDbRepositorySupport implements SessionStatisticsRepository {
public CouchDbSessionStatisticsRepository(Class type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, "learning_progress", createIfNotExists);
public CouchDbSessionStatisticsRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Object.class, db, "learning_progress", createIfNotExists);
}
@Cacheable("learningprogress")
......
......@@ -16,8 +16,8 @@ import java.util.Set;
public class CouchDbStatisticsRepository extends CouchDbRepositorySupport implements StatisticsRepository {
private static final Logger logger = LoggerFactory.getLogger(CouchDbStatisticsRepository.class);
public CouchDbStatisticsRepository(Class type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, "statistics", createIfNotExists);
public CouchDbStatisticsRepository(CouchDbConnector db, boolean createIfNotExists) {
super(Object.class, db, "statistics", createIfNotExists);
}
@Cacheable("statistics")
......
......@@ -37,8 +37,8 @@ public class CouchDbUserRepository extends CouchDbRepositorySupport<DbUser> impl
private static final Logger logger = LoggerFactory.getLogger(CouchDbUserRepository.class);
public CouchDbUserRepository(Class<DbUser> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbUserRepository(CouchDbConnector db, boolean createIfNotExists) {
super(DbUser.class, db, createIfNotExists);
}
private void log(Object... strings) {
......
......@@ -25,8 +25,8 @@ public class CouchDbVisitedSessionRepository extends CouchDbRepositorySupport<Vi
@Autowired
private LogEntryRepository dbLogger;
public CouchDbVisitedSessionRepository(Class<VisitedSession> type, CouchDbConnector db, boolean createIfNotExists) {
super(type, db, createIfNotExists);
public CouchDbVisitedSessionRepository(CouchDbConnector db, boolean createIfNotExists) {
super(VisitedSession.class, db, createIfNotExists);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment