/** {@inheritDoc} */ @Override public Job addJob(final Job job) { if (job.getStatistic() == null) { Statistic statistic = new Statistic(job.getId(), Long.valueOf(0), null, Long.valueOf(0)); statistic.setJob(job); job.setStatistic(statistic); } final Job savedJob = jobDao.save(job); saveJobStatistics(job); return savedJob; }
/** {@inheritDoc} */ @Override public void updateJob(final Job job) { if (job.getStatistic() == null) { Statistic statistic = new Statistic(job.getId(), Long.valueOf(0), null, Long.valueOf(0)); statistic.setJob(job); job.setStatistic(statistic); } final Job savedJob = jobDao.save(job); saveJobStatistics(savedJob); String tweetMessage = "Job Update: " + job.getJobTitle() + " @ " + job.getBusinessName(); final URI uri = createShortenedJobDetailUrl(job); tweetMessage = tweetMessage + ": " + uri.toString(); // notificationService.sendTweetToTwitter(tweetMessage); }