Examples of eDish


Examples of com.softserve.academy.food.entity.eDish

  }
 
  @SuppressWarnings("unchecked")
  public eDish Read(int id
  {
    eDish dish = new eDish();
   
    List<eDish> list = sessionFactory.getCurrentSession().createQuery("from eDish where id = "+id).list();
   
    if (list.isEmpty())
    {
View Full Code Here

Examples of com.softserve.academy.food.entity.eDish

  @Override
    @Transactional
  public void addDish(mDish dish, MultipartFile image)
  {
    eDish edish = new eDish( dish );
   
    if (dish!=null)
    {
     
      edish = daoDish.add( edish );
     
      if (image!=null)
      {
        try
        {
          image.transferTo( new File( root_dir+"dishsimage/"+edish.getId()+".png" ));
          edish.setImage( "dishsimage/"+edish.getId()+".png" );
          daoDish.Update(edish);
        }
        catch (IllegalStateException | IOException e)
        {
          e.printStackTrace();
View Full Code Here

Examples of com.softserve.academy.food.entity.eDish

  @Transactional
  public void updateDish(mDish dish)
  {
    if (dish!=null)
    {
      eDish oldDish = daoDish.Read( dish.getId() );
     
      oldDish.setName( dish.getName() );
      oldDish.setDescription( dish.getDescription() );
      oldDish.setWeight( dish.getWeight() );
      oldDish.setPrice( dish.getPrice() );
      oldDish.setType( dish.getType() );
     
      daoDish.Update( oldDish );
    }
  }
View Full Code Here

Examples of main.entity.eDish

  }
 
  @SuppressWarnings("unchecked")
  public eDish Read(int id
  {
    eDish dish = new eDish();
   
    List<eDish> list = sessionFactory.getCurrentSession().createQuery("from eDish where id = "+id).list();
   
    if (list.isEmpty())
    {
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.