Examples of Branche


Examples of de.forsthaus.backend.model.Branche

      return;
    }

    /* fix demo branch with id=1000 */
    final Branche branche = getBrancheService().getBrancheById(1000);

    final int countRecords = newRecords;

    final RandomDataEngine randomDataEngine = new RandomDataEngine();

View Full Code Here

Examples of de.forsthaus.backend.model.Branche

@Repository
public class BrancheDAOImpl extends BasisDAO<Branche> implements BrancheDAO {

  @Override
  public Branche getNewBranche() {
    return new Branche();
  }
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

    // check first, if the tabs are created
    if (getBranchDetailCtrl().getBinder() == null) {
      return;
    }

    final Branche aBranche = getSelectedBranche();

    // check for default demo data
    if (aBranche.getId() == 1033) {
      ZksampleMessageUtils.doShowNotAllowedForDemoRecords();
      return;
    }

    if (aBranche != null) {

      // Show a confirm box
      final String msg = Labels.getLabel("message.Question.Are_you_sure_to_delete_this_record") + "\n\n --> " + aBranche.getBraBezeichnung();
      final String title = Labels.getLabel("message.Deleting.Record");

      MultiLineMessageBox.doSetTemplate();
      if (MultiLineMessageBox.show(msg, title, Messagebox.YES | Messagebox.NO, Messagebox.QUESTION, true, new EventListener() {
        @Override
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

    }

    // remember the current object
    doStoreInitValues();

    /** !!! DO NOT BREAK THE TIERS !!! */
    // We don't create a new DomainObject() in the frontend.
    // We GET it from the backend.
    final Branche aBranche = getBrancheService().getNewBranche();

    // set the beans in the related databinded controllers
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

   * Event is forwarded in the corresponding listbox.
   */
  public void onDoubleClickedBranchItem(Event event) {
    // logger.debug(event.toString());

    final Branche aBranche = getSelectedBranche();

    if (aBranche != null) {
      setSelectedBranche(aBranche);
      setBranche(aBranche);

View Full Code Here

Examples of de.forsthaus.backend.model.Branche

   */
  public void onSelect$listBoxBranch(Event event) {
    // logger.debug(event.toString());

    // selectedBranche is filled by annotated databinding mechanism
    final Branche aBranche = getSelectedBranche();

    if (aBranche == null) {
      return;
    }

    // check first, if the tabs are created
    if (getBranchMainCtrl().getBranchDetailCtrl() == null) {
      Events.sendEvent(new Event("onSelect", getBranchMainCtrl().tabBranchDetail, null));
      // if we work with spring beanCreation than we must check a little
      // bit deeper, because the Controller are preCreated ?
    } else if (getBranchMainCtrl().getBranchDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event("onSelect", getBranchMainCtrl().tabBranchDetail, null));
    }

    // INIT ALL RELATED Queries/OBJECTS/LISTS NEW
    getBranchMainCtrl().getBranchDetailCtrl().setSelectedBranche(aBranche);
    getBranchMainCtrl().getBranchDetailCtrl().setBranche(aBranche);

    // store the selected bean values as current
    getBranchMainCtrl().doStoreInitValues();

    // show the objects data in the statusBar
    final String str = Labels.getLabel("common.Branch") + ": " + aBranche.getBraBezeichnung();
    EventQueues.lookup("selectedObjectEventQueue", EventQueues.DESKTOP, true).publish(new Event("onChangeSelectedObject", null, str));

  }
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

  // ############################## Tests ##################################

  @Test
  @Transactional
  public void getNewBranche() {
    Branche obj = getBrancheDAO().getNewBranche();
    Assert.assertEquals("Not the expected result", Long.MIN_VALUE+1, obj.getId());
  }
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

  }

  @Test
  @Transactional
  public void getBrancheByID() {
    Branche obj = getBrancheDAO().getBrancheByID(new Long(1000));
    Assert.assertEquals("Not the expected result", "Elektro", obj.getBraBezeichnung());
  }
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

  }

  @Test
  @Transactional
  public void getBrancheByName() {
    Branche obj = getBrancheDAO().getBrancheByName("Elektro");
    Assert.assertEquals("Not the expected result", 1000, obj.getId());
  }
View Full Code Here

Examples of de.forsthaus.backend.model.Branche

  }

  @Test
  @Transactional
  public void saveOrUpdateBranche() {
    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());
  }
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.