private Word getWord(String wordSyllables) { Word word = new Word(); word.setSyllables(wordSyllables); String wordId = wordSyllables.replace("-", ""); word.setId(wordId); word.setLength(wordId.length()); return word; }
private void processWords(String wordId) { System.out.println("Processing word: " + wordId); Word word = getWord(wordId); if (!wordIds.contains(word.getId())) { words.add(word); wordIds.add(word.getId()); wordDao.save(word); } }