Package mbg.test.mb3.generated.conditional.model

Examples of mbg.test.mb3.generated.conditional.model.PkfieldsExample


            record.setLastname("Rubble");
            record.setId1(new Integer(2));
            record.setId2(new Integer(3));
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andFirstnameLike("B%");
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(3, answer.size());
            Pkfields returnedRecord = (Pkfields) answer.get(0);
            assertEquals(2, returnedRecord.getId1().intValue());
            assertEquals(1, returnedRecord.getId2().intValue());
View Full Code Here


            record.setLastname("Rubble");
            record.setId1(new Integer(2));
            record.setId2(new Integer(3));
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andFirstnameNotLike("B%");
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(3, answer.size());
            Pkfields returnedRecord = (Pkfields) answer.get(0);
            assertEquals(1, returnedRecord.getId1().intValue());
            assertEquals(1, returnedRecord.getId2().intValue());
View Full Code Here

            record.setLastname("Rubble");
            record.setId1(new Integer(2));
            record.setId2(new Integer(3));
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andFirstnameLike("B%").andId2EqualTo(
                    new Integer(3));
            example.or(example.createCriteria().andFirstnameLike("Wi%"));
   
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(2, answer.size());
            Pkfields returnedRecord = (Pkfields) answer.get(0);
            assertEquals(1, returnedRecord.getId1().intValue());
            assertEquals(2, returnedRecord.getId2().intValue());
View Full Code Here

   
            List ids = new ArrayList();
            ids.add(new Integer(1));
            ids.add(new Integer(3));
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andId2In(ids);
   
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(4, answer.size());
            Pkfields returnedRecord = (Pkfields) answer.get(0);
            assertEquals(1, returnedRecord.getId1().intValue());
            assertEquals(1, returnedRecord.getId2().intValue());
View Full Code Here

            record.setLastname("Rubble");
            record.setId1(new Integer(2));
            record.setId2(new Integer(3));
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andId2Between(new Integer(1),
                    new Integer(3));
   
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(6, answer.size());
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

            record.setLastname("Rubble");
            record.setId1(new Integer(2));
            record.setId2(new Integer(3));
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria();
   
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(6, answer.size());
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

   
            List values = new ArrayList();
            values.add(new Integer(11));
            values.add(new Integer(22));
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andWierdFieldLessThan(new Integer(40))
                    .andWierdFieldIn(values);
   
            example.setOrderByClause("ID1, ID2");
            List answer = dao.selectByExample(example);
            assertEquals(2, answer.size());
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

            key.setId2(new Integer(2));
   
            int rows = dao.deleteByPrimaryKey(key);
            assertEquals(1, rows);
   
            PkfieldsExample example = new PkfieldsExample();
            List answer = dao.selectByExample(example);
            assertEquals(0, answer.size());
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

            record.setId1(new Integer(3));
            record.setId2(new Integer(4));
   
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            example.createCriteria().andLastnameLike("J%");
            int rows = dao.countByExample(example);
            assertEquals(1, rows);
   
            example.clear();
            rows = dao.countByExample(example);
            assertEquals(2, rows);
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

            record.setId1(new Integer(3));
            record.setId2(new Integer(4));
   
            dao.insert(record);
   
            PkfieldsExample example = new PkfieldsExample();
            List answer = dao.selectByExample(example);
            assertEquals(2, answer.size());
   
            example = new PkfieldsExample();
            example.createCriteria().andLastnameLike("J%");
            int rows = dao.deleteByExample(example);
            assertEquals(1, rows);
   
            example = new PkfieldsExample();
            answer = dao.selectByExample(example);
            assertEquals(1, answer.size());
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

TOP

Related Classes of mbg.test.mb3.generated.conditional.model.PkfieldsExample

Copyright © 2018 www.massapicom. 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.