use of test.po.Pet in project eweb4j-framework by laiweiwei.
the class TestInsertSql method prepare.
@BeforeClass
public static void prepare() throws Exception {
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);
}
use of test.po.Pet in project eweb4j-framework by laiweiwei.
the class TestSelectSql method prepare.
@BeforeClass
public static void prepare() throws Exception {
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");
fieldAdd = "+0";
}
use of test.po.Pet in project eweb4j-framework by laiweiwei.
the class TestUpdateSql method prepare.
@BeforeClass
public static void prepare() throws Exception {
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);
}
use of test.po.Pet in project eweb4j-framework by laiweiwei.
the class CascadeTest method testOneRel.
@Test
public void testOneRel() throws Exception {
Master master = new Master();
master.setId(1L);
master.getPets().add(new Pet());
master.getPets().add(new Pet());
master.getPets().add(new Pet());
//DAOFactory.getCascadeDAO().insert(master, "pets");
Assert.assertEquals(true, true);
}
use of test.po.Pet in project eweb4j-framework by laiweiwei.
the class TestCascadeDAO method testOneSelect.
public static void testOneSelect() {
List<Pet> petList;
try {
petList = DAOFactory.getSelectDAO().selectAll(Pet.class);
if (petList != null) {
for (Pet p : petList) {
System.out.println(p + "|" + p.getMaster());
DAOFactory.getCascadeDAO().select(p, "master");
System.out.println(p.getMaster());
// break;
}
}
} catch (DAOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Aggregations