You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
814 B
36 lines
814 B
package com.student.service;
|
|
|
|
import com.student.bean.DashboardStats;
|
|
import com.student.dao.StatDao;
|
|
import com.student.dao.impl.StatDaoImpl;
|
|
|
|
import java.util.Map;
|
|
|
|
public class StatService {
|
|
|
|
private final StatDao statDao;
|
|
|
|
public StatService() {
|
|
this(new StatDaoImpl());
|
|
}
|
|
|
|
StatService(StatDao statDao) {
|
|
this.statDao = statDao;
|
|
}
|
|
|
|
public DashboardStats getDashboard() {
|
|
return statDao.getDashboardStats();
|
|
}
|
|
|
|
public Map<String, Integer> genderDistribution() {
|
|
return statDao.genderDistribution();
|
|
}
|
|
|
|
public Map<String, Integer> ageDistribution() {
|
|
return statDao.ageDistribution();
|
|
}
|
|
|
|
public Map<String, Integer> deptDistribution() {
|
|
return statDao.deptDistribution();
|
|
}
|
|
}
|
|
|