public int compareTo(NoteList other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; NoteList typedOther = (NoteList) other; lastComparison = Boolean.valueOf(isSetStartIndex()).compareTo(typedOther.isSetStartIndex()); if (lastComparison != 0) { return lastComparison; } if (isSetStartIndex()) { lastComparison = TBaseHelper.compareTo(this.startIndex, typedOther.startIndex); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTotalNotes()).compareTo(typedOther.isSetTotalNotes()); if (lastComparison != 0) { return lastComparison; } if (isSetTotalNotes()) { lastComparison = TBaseHelper.compareTo(this.totalNotes, typedOther.totalNotes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNotes()).compareTo(typedOther.isSetNotes()); if (lastComparison != 0) { return lastComparison; } if (isSetNotes()) { lastComparison = TBaseHelper.compareTo(this.notes, typedOther.notes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStoppedWords()).compareTo(typedOther.isSetStoppedWords()); if (lastComparison != 0) { return lastComparison; } if (isSetStoppedWords()) { lastComparison = TBaseHelper.compareTo(this.stoppedWords, typedOther.stoppedWords); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSearchedWords()).compareTo(typedOther.isSetSearchedWords()); if (lastComparison != 0) { return lastComparison; } if (isSetSearchedWords()) { lastComparison = TBaseHelper.compareTo(this.searchedWords, typedOther.searchedWords); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUpdateCount()).compareTo(typedOther.isSetUpdateCount()); if (lastComparison != 0) { return lastComparison; } if (isSetUpdateCount()) { lastComparison = TBaseHelper.compareTo(this.updateCount, typedOther.updateCount); if (lastComparison != 0) { return lastComparison; } } return 0; }