class PublicStrategyService {

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

}