Package test.po

Examples of test.po.Pet


    String err = EWeb4JConfig.start("start.eweb.xml");
    if (err != null){
      System.out.println(">>>EWeb4J Start Error --> " + err);
      System.exit(-1);
    }
    pet = new Pet();
    update = SqlFactory.getUpdateSql(pet);
  }
View Full Code Here


      e.printStackTrace();
    }
  }

  public static void testOneUpdate() {
    Pet pet = new Pet();
    pet.setPetId(211);
    pet.setAge(8);
    pet.setName("test");
    pet.setType("fuck");
    Master master = new Master();
    master.setId(180);
    pet.setMaster(master);
    DAOFactory.getCascadeDAO().update(pet, "master");
  }
View Full Code Here

    Master master = new Master();
    master.setName("小日主人1");
    master.setGender("boy");
    Integer id = (Integer) DAOFactory.getInsertDAO().insert(master);
    master.setId(id);
    Pet pet = new Pet();
    pet.setName("小日1");
    pet.setType("dog");
    master.getPets().add(pet);

    pet = new Pet();
    pet.setName("小日2");
    pet.setType("cat");
    master.getPets().add(pet);

    DAOFactory.getCascadeDAO().insert(master);
  }
View Full Code Here

    String err = EWeb4JConfig.start("start.eweb.xml");
    if (err != null){
      System.out.println(">>>EWeb4J Start Error --> " + err);
      System.exit(-1);
    }
    pet = new Pet();
    master = new Master();
    master.setId(5);
    pet.setMaster(master);
    pet.setName("xiaobai");
    select = SqlFactory.getSelectSql(pet, "mysql");
View Full Code Here

    Master master = new Master();
    // master.setId(36);
    master.setName("日本人");
    master.setGender("boy");
    Pet pet = new Pet();
    pet.setName("小日1");
    pet.setType("dog");
    pet.setPetId(6490);
    master.getPets().add(pet);

    pet = new Pet();
    pet.setName("小日2");
    pet.setType("cat");
    master.getPets().add(pet);

    DAOFactory.getCascadeDAO().insert(master);
  }
View Full Code Here

  }

  @Test
  public void testSelect() throws Exception {
    Pet _pet = new Pet();
    _pet.setPetId(13);
    Pet pet = DAOFactory.getSelectDAO().selectOne(_pet, "petId");
    System.out.println(">>>>>>>>>>" + pet);
    Assert.assertEquals(true, true);
  }
View Full Code Here

  public static void testManyManyUpdate() {
    List<Master> masterList = DAOFactory.getSelectDAO().selectAll(
        Master.class);
    if (masterList != null) {
      for (Master m : masterList) {
        Pet p = new Pet();
        p.setPetId(3);
        // DAOFactory.getCascadeDAO().select(m);
        m.getPets().add(p);
        DAOFactory.getCascadeDAO().update(m);
        break;
      }
View Full Code Here

    try {
      masterList = DAOFactory.getSelectDAO().selectAll(Master.class);
      if (masterList != null) {
        for (Master m : masterList) {
          System.out.println(m + "|" + m.getPets());
          Pet p = new Pet();
          p.setPetId(5);
          m.getPets().add(p);
          DAOFactory.getCascadeDAO().delete(m, "pets");
          break;
        }
      }
View Full Code Here

    // TestCascadeDAO.testManyManyUpdate();
    EWeb4JConfig.start("start.eweb.xml");
    Master master = new Master();
    master.setId(10);

    Pet pet = new Pet();
    pet.setPetId(5);
    master.getPets().add(pet);
    pet = new Pet();
    pet.setPetId(6);
    master.getPets().add(pet);

    DAOFactory.getCascadeDAO().insert(master, "pets");

  }
View Full Code Here

    String err = EWeb4JConfig.start("start.eweb.xml");
    if (err != null){
      System.out.println(">>>EWeb4J Start Error --> " + err);
      System.exit(-1);
    }
    pet = new Pet();
    insert = SqlFactory.getInsertSql(pet);
  }
View Full Code Here

TOP

Related Classes of test.po.Pet

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.