示例#1
0
 public static CalendarEntryBean createAcademicCalendarBean(Partial begin, Partial end) {
   CalendarEntryBean bean = new CalendarEntryBean();
   bean.setBeginDateToDisplay(begin);
   bean.setEndDateToDisplay(end);
   bean.setType(AcademicCalendarRootEntry.class);
   return bean;
 }
示例#2
0
  public static CalendarEntryBean createCalendarEntryBeanToCreateEntry(
      AcademicCalendarRootEntry rootEntry,
      AcademicCalendarEntry parentEntry,
      Partial begin,
      Partial end) {

    CalendarEntryBean bean = new CalendarEntryBean();
    bean.setRootEntry(rootEntry);
    bean.setEntry(parentEntry);
    bean.setBeginDateToDisplay(begin);
    bean.setEndDateToDisplay(end);
    return bean;
  }
示例#3
0
  public static CalendarEntryBean createCalendarEntryBeanToEditEntry(
      AcademicCalendarRootEntry rootEntry,
      AcademicCalendarEntry entry,
      Partial begin,
      Partial end) {

    CalendarEntryBean bean = new CalendarEntryBean();

    bean.setRootEntry(rootEntry);
    bean.setEntry(entry);
    bean.setBeginDateToDisplay(begin);
    bean.setEndDateToDisplay(end);

    bean.setTemplateEntry(entry.getTemplateEntry());
    bean.setType(entry.getClass());
    bean.setTitle(entry.getTitle());
    bean.setDescription(entry.getDescription());
    bean.setBegin(entry.getBegin());
    bean.setEnd(entry.getEnd());

    return bean;
  }