Examples of ProductUI


Examples of org.sab.invsys.web.model.product.ProductUI

import org.springframework.data.domain.Pageable;

public class ProductMapper {

  public ProductUI toUIBean(Product product) {
    ProductUI uiBean = null;

    if (product != null) {
      uiBean = new ProductUI();
      uiBean.setCreateadBy(product.getCreateadBy());
      uiBean.setCreatedDate(product.getCreatedDate());
      uiBean.setDescription(product.getDescription());
      uiBean.setId(product.getId());
      uiBean.setModifiedBy(product.getModifiedBy());
      uiBean.setModifiedDate(product.getModifiedDate());
      uiBean.setPrice(product.getPrice());
      if (product.getGroup() != null) {
        uiBean.setProductGroup(product.getGroup().getGroupName());
      }
      uiBean.setProductName(product.getProductName());
    }

    return uiBean;
  }
View Full Code Here

Examples of org.sab.invsys.web.model.product.ProductUI

  }

  @RequestMapping(value = "/view/{productName}")
  public String view(@PathVariable String productName, Model model)
      throws Exception {
    ProductUI product = service.findByProductname(productName);
    model.addAttribute("productBean", product);

    return "product/view";
  }
View Full Code Here

Examples of org.sab.invsys.web.model.product.ProductUI

  @RequestMapping(value = "/update")
  public @ResponseBody
  Map<String, ? extends Object> update(ProductUI data) throws Exception {
    try {
      ProductUI product = service.update(data);

      if (product != null) {
        return extJS.mapOK(product, "Product Updated Succesfully");
      } else {
        return extJS.mapError("Error trying to update product.");
View Full Code Here

Examples of org.sab.invsys.web.model.product.ProductUI

    try {
      if (service.findByProductname(data.getProductName()) != null) {
        return extJS.mapError("Product Name already exists");
      }

      ProductUI saved = service.create(data);
      if (saved != null) {
        return extJS.mapOK(saved, "Product Created Succesfully");
      } else {
        return extJS.mapError("Error trying to create product.");
      }
View Full Code Here

Examples of org.sab.invsys.web.model.product.ProductUI

      List<ProductUI> deletedUsers = new ArrayList<ProductUI>();

      for (String productName : name.substring(1, name.length() - 1)
          .replaceAll("\"", "").split(",")) {
        ProductUI product = service.findByProductname(productName);

        if (product != null) {
          service.delete(product);
          deletedUsers.add(product);
        }
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.