class AppGroupService {

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

}