class ProjectService {

    public boolean isNotExistByName(Project project) throws SQLException {
        Long n = projectDao.getCountByName(project.getName());
        Long i = projectDao.getCountByIdAndName(project.getId(), project.getName());
        if (n == 0 || (n == 1 && i == 1)) {
            return true;
        }
        return false;
    }

}