/**
   * Grava novo registro ou atualiza um registro.
   *
   * @throws UniqueConstraintException the unique constraint exception
   */
  public void save() throws UniqueConstraintException {
    service.save(getUser());

    JsfUtil.addSuccessMessage(WebUtils.SAVE_OK);

    clearScreen();
  }
  /** Exclui um registro da tabela parameters. */
  public void remove() {
    service.remove(getUser());

    JsfUtil.addSuccessMessage(WebUtils.DELETE_OK);

    clearScreen();
  }
  /**
   * Update.
   *
   * @throws UniqueConstraintException the unique constraint exception
   */
  public void update() throws UniqueConstraintException {
    System.out.println("update->" + getUser());
    service.update(getUser());

    JsfUtil.addSuccessMessage(WebUtils.EDIT_OK);

    clearScreen();
  }
 /** Limpa os campos input e atualiza a lista de usuários cadastrados. */
 private void clearScreen() {
   listUsers = service.all();
   listUserProfiles = service.findUserByUsername(getUserSession());
   user = new User();
 }