use of mbg.test.ib2j2.generated.flat.model.Pkfields in project generator by mybatis.
the class FlatJava5Test method testEquals4.
@Test
public void testEquals4() {
Pkfields pkfields1 = new Pkfields();
pkfields1.setId1(2);
Pkfields pkfields2 = new Pkfields();
pkfields2.setId1(3);
assertFalse(pkfields1.equals(pkfields2));
}
use of mbg.test.ib2j2.generated.flat.model.Pkfields in project generator by mybatis.
the class FlatJava5Test method testEquals2.
@Test
public void testEquals2() {
Pkfields pkfields1 = new Pkfields();
Pkfields pkfields2 = new Pkfields();
assertTrue(pkfields1.equals(pkfields2));
}
use of mbg.test.ib2j2.generated.flat.model.Pkfields in project generator by mybatis.
the class FlatJava5Test method testEquals3.
@Test
public void testEquals3() {
Pkfields pkfields1 = new Pkfields();
pkfields1.setId1(2);
Pkfields pkfields2 = new Pkfields();
pkfields2.setId1(2);
assertTrue(pkfields1.equals(pkfields2));
}
use of mbg.test.ib2j2.generated.flat.model.Pkfields in project generator by mybatis.
the class UpdateByExampleTest method testPKFieldsUpdateByExample.
@Test
public void testPKFieldsUpdateByExample() {
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
PkfieldsMapper mapper = sqlSession.getMapper(PkfieldsMapper.class);
Pkfields record = new Pkfields();
record.setFirstname("Jeff");
record.setLastname("Smith");
record.setId1(1);
record.setId2(2);
mapper.insert(record);
record = new Pkfields();
record.setFirstname("Bob");
record.setLastname("Jones");
record.setId1(3);
record.setId2(4);
mapper.insert(record);
record = new Pkfields();
record.setFirstname("Fred");
record.setId1(3);
record.setId2(4);
PkfieldsExample example = new PkfieldsExample();
example.createCriteria().andId1EqualTo(3).andId2EqualTo(4);
int rows = mapper.updateByExample(record, example);
assertEquals(1, rows);
example.clear();
example.createCriteria().andFirstnameEqualTo("Fred").andLastnameIsNull().andId1EqualTo(3).andId2EqualTo(4);
long returnedRows = mapper.countByExample(example);
assertEquals(1, returnedRows);
} finally {
sqlSession.close();
}
}
use of mbg.test.ib2j2.generated.flat.model.Pkfields in project generator by mybatis.
the class FlatJava5Test method testEquals2.
@Test
public void testEquals2() {
Pkfields pkfields1 = new Pkfields();
Pkfields pkfields2 = new Pkfields();
assertTrue(pkfields1.equals(pkfields2));
}
Aggregations