Examples of PlannedMenuEvent


Examples of com.din.din.model.entities.PlannedMenuEvent

          return PlannedMenuEventDAO.getPlannedMenuEventsByPlannedMenu(plannedMenu);
        }
      });

      for(KeyEntity keyEntity : plannedMenuEvents) {
        PlannedMenuEvent event = (PlannedMenuEvent)keyEntity;
        addEvent(event);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of com.din.din.model.entities.PlannedMenuEvent

  public DinDinScheduleEvent(Date day, final Project project, EntityCachingManager cache) {
    super("", day, day, true);
    this.cache = cache;
    this.project = project;
   
    PlannedMenuEvent plannedMenuEvent = new PlannedMenuEvent();
    plannedMenuEvent.setEventDay(day);   
    try {
      List<KeyEntity> plannedMenus = cache.getChildren(PlannedMenu.class, "project", project, new CacheLoader<PlannedMenu>() {
        public List<PlannedMenu> onCacheLoad() {
          return PlannedMenuDAO.getPlannedMenuByProject(project);
        }
      });
      PlannedMenu plannedMenu = plannedMenus != null && plannedMenus.size() > 0 ? (PlannedMenu)plannedMenus.get(0) : new PlannedMenu();
      plannedMenuEvent.setPlannedMenu(plannedMenu);
    } catch (Exception e) {
      e.printStackTrace();
    }
    setData(plannedMenuEvent);
  }
View Full Code Here

Examples of com.din.din.model.entities.PlannedMenuEvent

    refreshEvent();
  }
 
  public void beginEdit() {
    if(revision == null) {
      PlannedMenuEvent event = (PlannedMenuEvent)super.getData();
      revision = (PlannedMenuEvent)BeanUtil.copy(event);
    }
  }
View Full Code Here

Examples of com.din.din.model.entities.PlannedMenuEvent

    revision = null;
  }
 
  public synchronized void save() throws Exception {
    if(revision != null) {
      PlannedMenuEvent event = (PlannedMenuEvent)super.getData();
     
      if(event.getPlannedMenu() != null) {
        PlannedMenu plannedMenu = event.getPlannedMenu();
        PlannedMenuEvent oldEvent = (PlannedMenuEvent)BeanUtil.copy(event);
       
        BeanUtil.copyProperties(revision, event);
       
        // Perform save of parent.  In case of error, restore original values
        try {
View Full Code Here

Examples of com.din.din.model.entities.PlannedMenuEvent

  public PlannedMenuEvent getData() {
    return revision != null ? revision : (PlannedMenuEvent)super.getData();
  }
 
  public void refreshEvent() {
    PlannedMenuEvent event = getData();
    setAllDay(true);
    setEditable(true);
    setStartDate(event.getEventDay());
    setEndDate(event.getEventDay());
   
    String key = event.getMealType() != null ? event.getMealType().toString() : "Unknown";
    setTitle(BeanUtil.getMessage(key));
  }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.