package org.academiadecodigo.bootcamp.fxlogin.persistence.dao.jpa;

import org.academiadecodigo.bootcamp.fxlogin.model.Cadet;
import org.academiadecodigo.bootcamp.fxlogin.persistence.dao.CadetDao;

import java.util.List;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class JpaCadetDao extends JpaDao<Cadet> implements CadetDao {

    public JpaCadetDao() {
        super(Cadet.class);

    }

    @Override
    public List<Cadet> findAllByGender(Cadet.Gender gender) {
        return super.findAll("gender", gender);

    }

    @Override
    public List<Cadet> findAllByBootcampId(Integer bootcampId) {
        return super.findAll("bootcamp", bootcampId);

    }
}
