TreeSet<AcademicServiceRequestSituation> sortedSituations =
new TreeSet<AcademicServiceRequestSituation>(
AcademicServiceRequestSituation.COMPARATOR_BY_MOST_RECENT_SITUATION_DATE_AND_ID);
sortedSituations.addAll(getAcademicServiceRequestSituationsSet());
AcademicServiceRequestSituation deliveredSituation, concludedSituation, receivedSituation, sentSituation, processedSituation, newSituation;
try {
Iterator<AcademicServiceRequestSituation> situationsIterator = sortedSituations.iterator();
deliveredSituation = situationsIterator.next();
concludedSituation = situationsIterator.next();
receivedSituation = situationsIterator.next();
sentSituation = situationsIterator.next();
processedSituation = situationsIterator.next();
newSituation = situationsIterator.next();
} catch (NoSuchElementException ex) {
return false;
}
if (!deliveredSituation.getAcademicServiceRequestSituationType().equals(AcademicServiceRequestSituationType.DELIVERED)) {
return false;
}
if (!deliveredSituation.getJustification().equals("-")) {
return false;
}
if (!(deliveredSituation.getSituationDate().hourOfDay().get() == 0)) {
return false;
}
if (!(deliveredSituation.getSituationDate().minuteOfHour().get() == 5)) {
return false;
}
// #####################################################
if (!concludedSituation.getCreator().equals(deliveredSituation.getCreator())) {
return false;
}
if (!concludedSituation.getAcademicServiceRequestSituationType().equals(AcademicServiceRequestSituationType.CONCLUDED)) {
return false;
}
if (!concludedSituation.getJustification().equals("-")) {
return false;
}
if (!(concludedSituation.getSituationDate().hourOfDay().get() == 0)) {
return false;
}
if (!(concludedSituation.getSituationDate().minuteOfHour().get() == 4)) {
return false;
}
// #####################################################
if (!receivedSituation.getCreator().equals(deliveredSituation.getCreator())) {
return false;
}
if (!receivedSituation.getAcademicServiceRequestSituationType().equals(
AcademicServiceRequestSituationType.RECEIVED_FROM_EXTERNAL_ENTITY)) {
return false;
}
if (!receivedSituation.getJustification().equals("-")) {
return false;
}
if (!(receivedSituation.getSituationDate().hourOfDay().get() == 0)) {
return false;
}
if (!(receivedSituation.getSituationDate().minuteOfHour().get() == 3)) {
return false;
}
// #####################################################
if (!sentSituation.getCreator().equals(deliveredSituation.getCreator())) {
return false;
}
if (!sentSituation.getAcademicServiceRequestSituationType().equals(
AcademicServiceRequestSituationType.SENT_TO_EXTERNAL_ENTITY)) {
return false;
}
if (!sentSituation.getJustification().equals("-")) {
return false;
}
if (!(sentSituation.getSituationDate().hourOfDay().get() == 0)) {
return false;
}
if (!(sentSituation.getSituationDate().minuteOfHour().get() == 2)) {
return false;
}
if (!sentSituation.getSituationDate().toLocalDate().equals(receivedSituation.getSituationDate().toLocalDate())) {
return false;
}
// #####################################################
if (!processedSituation.getCreator().equals(deliveredSituation.getCreator())) {
return false;
}
if (!processedSituation.getAcademicServiceRequestSituationType().equals(AcademicServiceRequestSituationType.PROCESSING)) {
return false;
}
if (!processedSituation.getJustification().equals("-")) {
return false;
}
if (!(processedSituation.getSituationDate().hourOfDay().get() == 0)) {
return false;
}
if (!(processedSituation.getSituationDate().minuteOfHour().get() == 1)) {
return false;
}
if (!processedSituation.getSituationDate().toLocalDate().equals(receivedSituation.getSituationDate().toLocalDate())) {
return false;
}
// #####################################################
if (!newSituation.getCreator().equals(deliveredSituation.getCreator())) {
return false;
}
if (!newSituation.getAcademicServiceRequestSituationType().equals(AcademicServiceRequestSituationType.NEW)) {
return false;
}