use of mbg.test.mb3.generated.flat.model.Fieldsblobs in project generator by mybatis.
the class FlatJava5Test method testFieldsBlobsSelectByExampleWithBlobsNoCriteria.
@Test
public void testFieldsBlobsSelectByExampleWithBlobsNoCriteria() {
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
FieldsblobsMapper mapper = sqlSession.getMapper(FieldsblobsMapper.class);
Fieldsblobs record = new Fieldsblobs();
record.setFirstname("Jeff");
record.setLastname("Smith");
record.setBlob1(generateRandomBlob());
record.setBlob2(generateRandomBlob());
mapper.insert(record);
record = new Fieldsblobs();
record.setFirstname("Scott");
record.setLastname("Jones");
record.setBlob1(generateRandomBlob());
record.setBlob2(generateRandomBlob());
mapper.insert(record);
FieldsblobsExample example = new FieldsblobsExample();
example.createCriteria();
List<Fieldsblobs> answer = mapper.selectByExampleWithBLOBs(example);
assertEquals(2, answer.size());
} finally {
sqlSession.close();
}
}
use of mbg.test.mb3.generated.flat.model.Fieldsblobs in project generator by mybatis.
the class SimpleTest method testFieldsblobs.
@Test
public void testFieldsblobs() {
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
FieldsblobsMapper mapper = sqlSession.getMapper(FieldsblobsMapper.class);
Fieldsblobs record = new Fieldsblobs();
record.setFirstname("Fred");
record.setBlob1(TestUtilities.generateRandomBlob());
mapper.insert(record);
record = new Fieldsblobs();
record.setFirstname("Barney");
record.setBlob1(TestUtilities.generateRandomBlob());
mapper.insert(record);
List<Fieldsblobs> records = mapper.selectAll();
assertEquals(2, records.size());
} finally {
sqlSession.close();
}
}
Aggregations