@Override public Ball createNewBall(Ball ball) { if (ball.getRadius().compareTo(100D) > 0) { logger.error("Ball radius > 100."); throw new AppException("Ball radius > 100."); } logger.debug("Adding new ball. color={} radius={}", ball.getColor(), ball.getRadius()); return ballDao.save(ball); }
@Override public List<Ball> findAllBalls() { logger.debug("Getting list of all balls."); return ballDao.findAll(); }