Package de.forsthaus.backend.model

Examples of de.forsthaus.backend.model.Branche


  }

  @Test
  @Transactional
  public void saveBranche() {
    Branche entity = getBrancheDAO().getNewBranche();
    entity.setBraBezeichnung("TEST-BRANCHE");

    getBrancheDAO().save(entity);

    List<Branche> list = getBrancheDAO().getAllBranches();
    for (Branche obj : list) {
      System.out.println(obj.getId() + " / " + obj.getBraBezeichnung());
    }

    Branche obj2 = getBrancheDAO().getBrancheByName("TEST-BRANCHE");
    Assert.assertEquals("Not the expected result", "TEST-BRANCHE", obj2.getBraBezeichnung());
  }
View Full Code Here


  }

  @Test
  @Transactional
  public void deleteBranche() {
    Branche entity = getBrancheDAO().getNewBranche();
    entity.setBraBezeichnung("TEST-BRANCHE");

    getBrancheDAO().saveOrUpdate(entity);

    List<Branche> list = getBrancheDAO().getAllBranches();
    for (Branche obj : list) {
      System.out.println(obj.getId() + " / " + obj.getBraBezeichnung());
    }

    Branche obj2 = getBrancheDAO().getBrancheByName("TEST-BRANCHE");
    Assert.assertEquals("Not the expected result", "TEST-BRANCHE", obj2.getBraBezeichnung());

    getBrancheDAO().delete(obj2);
  }
View Full Code Here

  }

  @Test
  @Transactional
  public void getCustomersByBranche() {
    Branche aBranche = getBrancheDAO().getBrancheByID(new Long(1000));
    List<Customer> result = getCustomerDAO().getCustomersByBranche(aBranche);
    Assert.assertEquals("Not the expected result", 15, result.size());
  }
View Full Code Here

    this.listheader_Branch_Description.setSortDescending(this.fcBraBezeichnung_Desc);

    this.listBoxBranch.setItemRenderer(new ListitemRenderer() {
      @Override
      public void render(Listitem item, Object data) throws Exception {
        final Branche branche = (Branche) data;
        Listcell lc;
        lc = new Listcell(String.valueOf(branche.getBraBezeichnung()));
        lc.setStyle("text-align: left; padding-left: 5px;");
        lc.setParent(item);
        lc = new Listcell(String.valueOf(branche.getId()));
        lc.setStyle("text-align: left; padding-left: 5px;");
        lc.setParent(item);
      }
    });
View Full Code Here

    this.pagedListWrapperCustomer.init(so2, this.listBoxCustomer, this.pagingKunde);
  }

  public void onClick$button_insertCustomers(Event event) throws InterruptedException {

    final Branche branche = getBrancheService().getBrancheById(1000);
    final Office office = getOfficeService().getOfficeByID(Long.valueOf(1));

    final int countRecords = 10000;

    final RandomDataEngine randomDataEngine = new RandomDataEngine();
View Full Code Here

    @Override
    public void onEvent(Event event) throws Exception {

      if (BranchExtendedSearchListBox.this.listbox.getSelectedItem() != null) {
        Listitem li = BranchExtendedSearchListBox.this.listbox.getSelectedItem();
        Branche branche = (Branche) li.getAttribute("data");

        setBranche(branche);
      }
      onClose();
    }
View Full Code Here

   */
  public void onDoubleClicked(Event event) {

    if (listbox.getSelectedItem() != null) {
      Listitem li = listbox.getSelectedItem();
      Branche branche = (Branche) li.getAttribute("data");

      setBranche(branche);
      this.onClose();
    }
  }
View Full Code Here

  final class SearchBoxItemRenderer implements ListitemRenderer {

    @Override
    public void render(Listitem item, Object data) throws Exception {

      Branche branche = (Branche) data;

      Listcell lc = new Listcell(branche.getBraBezeichnung());
      lc.setParent(item);

      item.setAttribute("data", data);
      ComponentsCtrl.applyForward(item, "onDoubleClick=onDoubleClicked");
    }
View Full Code Here

    @Override
    public void onEvent(Event event) throws Exception {

      if (listbox.getSelectedItem() != null) {
        Listitem li = listbox.getSelectedItem();
        Branche branche = (Branche) li.getAttribute("data");

        setBranche(branche);
      }
      onClose();
    }
View Full Code Here

          kunOrt.setValue(filter.getValue().toString());
        } else if (filter.getProperty().equals("branche")) {
          restoreOperator(sortOperator_kunBranch, filter);
          ListModelList lml = (ListModelList) this.kunBranche.getModel();
          // get and select the customers branch
          Branche branche = (Branche) filter.getValue();
          kunBranche.setSelectedIndex(lml.indexOf(branche));
        }
      }
    }
View Full Code Here

TOP

Related Classes of de.forsthaus.backend.model.Branche

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.