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();
    master = new Master();
    master.setId(5L);
    pet.setMaster(master);
    pet.setName("xiaobai");
    select = SqlFactory.getSelectSql(pet, "mysql");
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

    Map<String,Object> map = new HashMap<String,Object>();
    map.put("table", "t_pet");
    map.put("idColumn", "id");
    map.put("columns", new String[]{"num","name","age","cate"});
    map.put("values", new Object[]{123,"weiwei", 3, "dog"});
    Pet pet = new Pet();
    pet.setName("xxx");
    pet.setNumber("4444");
    pet.setAge(3);
    pet.setType("cat");
    final InsertSqlCreator<?> insert = SqlFactory.getInsertSql(map, pet);
    String[] sql = insert.create();
    Assert.assertEquals("INSERT INTO t_pet(num,name,age,cate) VALUES('123','weiwei','3','dog') ;", sql[0]);
    Assert.assertEquals("INSERT INTO t_pet(num,name,age,cate) VALUES('4444','xxx','3','cat') ;", sql[1]);
  }
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();
    pet.setAge(30);
    delete = SqlFactory.getDeleteSql(pet);
  }
View Full Code Here

  public void testMap() throws Exception {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("table", "t_pet");
    map.put("idColumn", "id");
    map.put("idValue", 7);
    Pet pet = new Pet();
    DeleteSqlCreator<?> delete = SqlFactory.getDeleteSql(map, pet);
    Assert.assertEquals("DELETE FROM t_pet WHERE id = '7' ;", delete.delete()[0]);
  }
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.