package com.betting.web.service;

import com.betting.common.dao.MatchDao;
import com.betting.common.module.Match;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import static org.apache.commons.lang3.Validate.notNull;

/**
 * @author Rob
 * @since 14.02.2016
 */
@Service
public class MatchService {

    private final MatchDao matchDao;

    @Autowired
    public MatchService(MatchDao matchDao) {
        this.matchDao = notNull(matchDao, "matchDao cannot be null");
    }

    public List<Match> getAllMatches() {
        return matchDao.getAllMatches();
    }

}
