/**
   * API to display entry-form for adding a new UtilityAttribute time Usage :
   * /UtilityAttribute/create
   *
   * @param
   * @return : name of jsp file
   */
  @RequestMapping(value = "/utilityattribute/create/{uid}/{slno}", method = RequestMethod.GET)
  public String showNewUtilityAttribute(
      ModelMap model, @PathVariable("uid") int utilityid, @PathVariable("slno") int slno) {

    int stat = -1;
    if (slno != -1) {
      boolean bln = mastersservice.deleteUtilityAttr(slno);
      if (bln) {
        stat = 1;
      } else {
        stat = -1;
      }
    }

    logger.info(" going to create new UtilityAttribute");
    UtilityAttributes uattr = new UtilityAttributes();
    uattr.setUtilityid(utilityid);
    model.addAttribute("utilityattribute", uattr);
    List<Attributes> attrList = mastersservice.getAttributeList();
    model.addAttribute("attrList", attrList);
    model.addAttribute("utilityid", utilityid);
    List<UtilityAttributes> utlyattr = mastersservice.getUtilityAttr(utilityid);
    model.addAttribute("utlyattr", utlyattr);
    model.addAttribute("stat", stat);
    return "utilityattributes";
  }
  /**
   * API to display an existing Utility Usage : /utility/update/{id}
   *
   * @param : id of Utility
   * @return : name of jsp file to which control is to be returned
   */
  @RequestMapping(value = "/utilityattribute/update/{utilityid}/{slno}", method = RequestMethod.GET)
  public String showExistingUtilityAttribute(
      @PathVariable("utilityid") int utilityid, @PathVariable("slno") int slno, Model model) {
    logger.info("inside UtilityAttributeController.utilityattribute: id= " + slno);
    UtilityAttributes utilityattribute = mastersservice.getSelUtilityAttr(slno);
    utilityattribute.setUtilityid(utilityid);
    model.addAttribute("utilityattribute", utilityattribute);
    List<UtilityAttributes> utlyattr = mastersservice.getUtilityAttr(utilityid);
    model.addAttribute("utlyattr", utlyattr);

    List<Attributes> attrList = mastersservice.getAttributeList();
    model.addAttribute("attrList", attrList);
    model.addAttribute("stat", -1);
    return "utilityattributes";
  }