Examples of OGearBox


Examples of com.avaje.tests.model.basic.OGearBox

  public void test() {

    OEngine engine = new OEngine();
    engine.setShortDesc("engine 1");

    OGearBox gearBox = new OGearBox();
    gearBox.setBoxDesc("6 speed manual");
    gearBox.setSize(6);

    OCar car = new OCar();
    car.setVin("xx4534");
    car.setName("test car");
    car.setEngine(engine);

    Ebean.beginTransaction();
    try {
      Ebean.save(gearBox);
      Ebean.save(car);

      Assert.assertNotNull(car.getId());
      Assert.assertNotNull(engine.getEngineId());
      Assert.assertNotNull(gearBox.getId());

      Ebean.commitTransaction();

    } finally {
      Ebean.endTransaction();
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.