  private long getTimeForSituation(SituationBean bean) {
    TimeRangeBean window = bean.getPublicationWindow();
    if (window != null && window.getFrom() != 0)
      return window.getFrom();
    if (CollectionsLibrary.isEmpty(bean.getConsequences())) {
      long t = Long.MAX_VALUE;
      for (SituationConsequenceBean consequence : bean.getConsequences()) {
        TimeRangeBean period = consequence.getPeriod();
        if (period != null && period.getFrom() != 0)
          t = Math.min(t, period.getFrom());
      }
      if (t != Long.MAX_VALUE)
        return t;
    }
    return bean.getCreationTime();
  }

  private long getTimeForSituation(SituationBean bean) {
    TimeRangeBean window = bean.getPublicationWindow();
    if (window != null && window.getFrom() != 0)
      return window.getFrom();
    if (! CollectionsLibrary.isEmpty(bean.getConsequences())) {
      long t = Long.MAX_VALUE;
      for (SituationConsequenceBean consequence : bean.getConsequences()) {
        TimeRangeBean period = consequence.getPeriod();
        if (period != null && period.getFrom() != 0)
          t = Math.min(t, period.getFrom());
      }
      if (t != Long.MAX_VALUE)
        return t;
    }
    return bean.getCreationTime();
  }
