Package mbg.test.mb3.generated.mixed.hierarchical.Immutable.Model

Examples of mbg.test.mb3.generated.mixed.hierarchical.Immutable.Model.PkfieldsExample.createCriteria()


            record.setLastname("Jones");
            record.setBlob1(generateRandomBlob());
            mapper.insert(record);

            PkfieldsblobsExample example = new PkfieldsblobsExample();
            example.createCriteria();
            List<Pkfieldsblobs> answer = mapper.selectByExampleWithBLOBs(example);
            assertEquals(2, answer.size());
        } finally {
            sqlSession.close();
        }
View Full Code Here


            record.setLastname("Jones");
            record.setBlob1(generateRandomBlob());
            mapper.insert(record);

            PkfieldsblobsExample example = new PkfieldsblobsExample();
            example.createCriteria().andId1NotEqualTo(3);
            int rows = mapper.countByExample(example);
            assertEquals(1, rows);

            example.clear();
            rows = mapper.countByExample(example);
View Full Code Here

            key.setId(7);
            key.setSeqNum(8);
            mapper.insert(key);

            PkonlyExample example = new PkonlyExample();
            example.createCriteria().andIdGreaterThan(4);
            int rows = mapper.deleteByExample(example);
            assertEquals(2, rows);

            example = new PkonlyExample();
            List<Pkonly> answer = mapper.selectByExample(example);
View Full Code Here

            key.setId(7);
            key.setSeqNum(8);
            mapper.insert(key);

            PkonlyExample example = new PkonlyExample();
            example.createCriteria().andIdGreaterThan(4);
            List<Pkonly> answer = mapper.selectByExample(example);
            assertEquals(2, answer.size());
        } finally {
            sqlSession.close();
        }
View Full Code Here

            key.setId(7);
            key.setSeqNum(8);
            mapper.insert(key);

            PkonlyExample example = new PkonlyExample();
            example.createCriteria();
            List<Pkonly> answer = mapper.selectByExample(example);
            assertEquals(3, answer.size());
        } finally {
            sqlSession.close();
        }
View Full Code Here

            key.setId(7);
            key.setSeqNum(8);
            mapper.insert(key);

            PkonlyExample example = new PkonlyExample();
            example.createCriteria().andIdGreaterThan(4);
            int rows = mapper.countByExample(example);
            assertEquals(2, rows);

            example.clear();
            rows = mapper.countByExample(example);
View Full Code Here

            PkfieldsExample example = new PkfieldsExample();
            List<Pkfields> answer = mapper.selectByExample(example);
            assertEquals(2, answer.size());

            example = new PkfieldsExample();
            example.createCriteria().andLastnameLike("J%");
            int rows = mapper.deleteByExample(example);
            assertEquals(1, rows);

            example = new PkfieldsExample();
            answer = mapper.selectByExample(example);
View Full Code Here

            record.setId1(2);
            record.setId2(3);
            mapper.insert(record);

            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andFirstnameLike("B%");
            example.setOrderByClause("ID1, ID2");
            List<Pkfields> answer = mapper.selectByExample(example);
            assertEquals(3, answer.size());
            Pkfields returnedRecord = answer.get(0);
            assertEquals(2, returnedRecord.getId1().intValue());
View Full Code Here

            record.setId1(2);
            record.setId2(3);
            mapper.insert(record);

            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andFirstnameNotLike("B%");
            example.setOrderByClause("ID1, ID2");
            List<Pkfields> answer = mapper.selectByExample(example);
            assertEquals(3, answer.size());
            Pkfields returnedRecord = answer.get(0);
            assertEquals(1, returnedRecord.getId1().intValue());
View Full Code Here

            record.setId1(2);
            record.setId2(3);
            mapper.insert(record);

            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andFirstnameLike("B%").andId2EqualTo(3);
            example.or(example.createCriteria().andFirstnameLike("Wi%"));

            example.setOrderByClause("ID1, ID2");
            List<Pkfields> answer = mapper.selectByExample(example);
            assertEquals(2, answer.size());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.