use of sqlite.feature.typeadapter.kripton180.bean.insertselect.BindKripton180BeanInsertSelectDaoFactory in project kripton by xcesco.
the class TestKripton180BeanInsertSelectRuntime method testRun.
@Test
public void testRun() {
final Employee bean = new Employee();
bean.birthDate = new java.sql.Date((new java.util.Date()).getTime());
bean.fieldBoolean = "true";
bean.fieldByte = "42";
bean.fieldByteArray = "42";
bean.fieldCharacter = "a";
bean.fieldDouble = "120";
bean.fieldFloat = "120";
bean.fieldInteger = "11";
bean.fieldLong = "13";
bean.fieldShort = "2";
bean.fieldString = "a";
bean.hireDate = new java.sql.Date((new java.util.Date()).getTime());
BindKripton180BeanInsertSelectDataSource dataSource = BindKripton180BeanInsertSelectDataSource.instance();
dataSource.execute(new BindKripton180BeanInsertSelectDataSource.Transaction() {
@Override
public TransactionResult onExecute(BindKripton180BeanInsertSelectDaoFactory daoFactory) {
EmployeeBeanInsertSelectDaoImpl dao = daoFactory.getEmployeeBeanInsertSelectDao();
dao.insertJQL(bean);
Assert.assertTrue(bean.id > 0);
return TransactionResult.ROLLBACK;
}
});
}
Aggregations