Package de.peacei.gae.foodsupplier.data

Examples of de.peacei.gae.foodsupplier.data.Comment


    if(isValuable(name) && isValuable(msg) && isValuable(email) && isValuable(client) && isValuable(menuKey)) {
     
      final Key key = KeyFactory.stringToKey(menuKey);
     
      if(menuDAO.isMenuKey(key)) {
        final Comment comment = new Comment();
       
        final UserDAO userDAO = new UserDAO();
        User user = userDAO.getUserViaMail(email);
        if(user == null) {
          user = new User();
          user.setEmail(email);
          user.setName(name);
        }
        comment.setUser(user);
       
        DateTime dateTime = new DateTime(DateTimeZone.forTimeZone(CalendarUtil.getCalendar().getTimeZone()));
        comment.setTimestamp(dateTime.getMillis());
       
        comment.setMenuKey(key);
        comment.setText(msg);
        comment.setClient(client);
        comment.setIsRating(false);
       
        commentDAO.saveComment(comment);
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.peacei.gae.foodsupplier.data.Comment

Copyright © 2018 www.massapicom. 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.