mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Refactor: Remove unused subscribe method from CardRepository (#9243)
This commit is contained in:
parent
14485ae635
commit
5d11bab6dd
1 changed files with 0 additions and 8 deletions
|
@ -12,7 +12,6 @@ import com.j256.ormlite.table.TableUtils;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SetType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.events.Listener;
|
||||
import mage.util.RandomUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
@ -37,7 +36,6 @@ public enum CardRepository {
|
|||
private static final long CARD_CONTENT_VERSION = 241;
|
||||
private Dao<CardInfo, Object> cardDao;
|
||||
private Set<String> classNames;
|
||||
private final RepositoryEventSource eventSource = new RepositoryEventSource();
|
||||
|
||||
public static final Set<String> snowLandSetCodes = new HashSet<>(Arrays.asList(
|
||||
"CSP",
|
||||
|
@ -65,16 +63,11 @@ public enum CardRepository {
|
|||
|
||||
TableUtils.createTableIfNotExists(connectionSource, CardInfo.class);
|
||||
cardDao = DaoManager.createDao(connectionSource, CardInfo.class);
|
||||
eventSource.fireRepositoryDbLoaded();
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(CardRepository.class).error("Error creating card repository - ", ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void subscribe(Listener<RepositoryEvent> listener) {
|
||||
eventSource.addListener(listener);
|
||||
}
|
||||
|
||||
public void saveCards(final List<CardInfo> newCards, long newContentVersion) {
|
||||
try {
|
||||
cardDao.callBatchTasks(() -> {
|
||||
|
@ -99,7 +92,6 @@ public enum CardRepository {
|
|||
});
|
||||
|
||||
setContentVersion(newContentVersion);
|
||||
eventSource.fireRepositoryDbUpdated();
|
||||
} catch (Exception ex) {
|
||||
//
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue