Added findAll methods to service level.

This commit is contained in:
Ilkka Seppala
2015-04-15 21:39:31 +03:00
parent 281f225a54
commit 3d3828933c
4 changed files with 51 additions and 4 deletions

View File

@@ -1,5 +1,31 @@
package com.iluwatar;
public class MagicServiceImpl implements MagicService {
import java.util.List;
public class MagicServiceImpl implements MagicService {
private WizardDao wizardDao;
private SpellbookDao spellbookDao;
private SpellDao spellDao;
public MagicServiceImpl(WizardDao wizardDao, SpellbookDao spellbookDao, SpellDao spellDao) {
this.wizardDao = wizardDao;
this.spellbookDao = spellbookDao;
this.spellDao = spellDao;
}
@Override
public List<Wizard> findAllWizards() {
return wizardDao.findAll();
}
@Override
public List<Spellbook> findAllSpellbooks() {
return spellbookDao.findAll();
}
@Override
public List<Spell> findAllSpells() {
return spellDao.findAll();
}
}