Package mbg.test.ib2j2.generated.flat.dao

Examples of mbg.test.ib2j2.generated.flat.dao.PkfieldsDAO.selectByPrimaryKey()


            record.setSecondFirstName("fred22");
            record.setThirdFirstName("fred33");

            Integer generatedKey = dao.insert(record);

            AwfulTable returnedRecord = dao.selectByPrimaryKey(generatedKey);

            assertNotNull(returnedRecord);
            assertEquals(record.getCustomerId(), returnedRecord.getCustomerId());
            assertEquals(record.geteMail(), returnedRecord.geteMail());
            assertEquals(record.getEmailaddress(), returnedRecord
View Full Code Here


            record.setBlob1(TestUtilities.generateRandomBlob());
            record.setBlob2(TestUtilities.generateRandomBlob());
            int rows = dao.updateByPrimaryKey(record);
            assertEquals(1, rows);

            Pkblobs newRecord = dao.selectByPrimaryKey(new Integer(3));

            assertNotNull(newRecord);
            assertEquals(record.getId(), newRecord.getId());
            assertTrue(TestUtilities.blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
            assertTrue(TestUtilities.blobsAreEqual(record.getBlob2(), newRecord.getBlob2()));
View Full Code Here

            Pkblobs newRecord = new Pkblobs();
            newRecord.setId(new Integer(3));
            newRecord.setBlob2(TestUtilities.generateRandomBlob());
            dao.updateByPrimaryKeySelective(newRecord);

            Pkblobs returnedRecord = dao.selectByPrimaryKey(new Integer(3));
            assertNotNull(returnedRecord);
            assertEquals(record.getId(), returnedRecord.getId());
            assertTrue(TestUtilities.blobsAreEqual(record.getBlob1(), returnedRecord
                    .getBlob1()));
            assertTrue(TestUtilities.blobsAreEqual(newRecord.getBlob2(), returnedRecord
View Full Code Here

            record.setId(new Integer(6));
            record.setBlob1(TestUtilities.generateRandomBlob());
            record.setBlob2(TestUtilities.generateRandomBlob());
            dao.insert(record);

            Pkblobs newRecord = dao.selectByPrimaryKey(new Integer(6));
            assertNotNull(newRecord);
            assertEquals(record.getId(), newRecord.getId());
            assertTrue(TestUtilities.blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
            assertTrue(TestUtilities.blobsAreEqual(record.getBlob2(), newRecord.getBlob2()));
        } catch (SQLException e) {
View Full Code Here

            record.setTimestampfield(new Date());
            record.setStringboolean(true);

            dao.insert(record);

            Pkfields returnedRecord = dao.selectByPrimaryKey(new Integer(2),
                    new Integer(1));
            assertNotNull(returnedRecord);

            assertTrue(TestUtilities.datesAreEqual(record.getDatefield(), returnedRecord
                    .getDatefield()));
View Full Code Here

            record.setLastname("Jones");

            int rows = dao.updateByPrimaryKey(record);
            assertEquals(1, rows);

            Pkfields record2 = dao.selectByPrimaryKey(new Integer(2),
                    new Integer(1));

            assertEquals(record.getFirstname(), record2.getFirstname());
            assertEquals(record.getLastname(), record2.getLastname());
            assertEquals(record.getId1(), record2.getId1());
View Full Code Here

            newRecord.setDecimal60field(new Integer(4));

            int rows = dao.updateByPrimaryKeySelective(newRecord);
            assertEquals(1, rows);

            Pkfields returnedRecord = dao.selectByPrimaryKey(new Integer(2),
                    new Integer(1));

            assertTrue(TestUtilities.datesAreEqual(record.getDatefield(), returnedRecord
                    .getDatefield()));
            assertEquals(record.getDecimal100field(), returnedRecord
View Full Code Here

            record.setLastname("Jones");
            record.setId1(new Integer(3));
            record.setId2(new Integer(4));
            dao.insert(record);

            Pkfields newRecord = dao.selectByPrimaryKey(new Integer(4),
                    new Integer(3));

            assertNotNull(newRecord);
            assertEquals(record.getFirstname(), newRecord.getFirstname());
            assertEquals(record.getLastname(), newRecord.getLastname());
View Full Code Here

            updateRecord.setBlob1(TestUtilities.generateRandomBlob());

            int rows = dao.updateByPrimaryKeyWithBLOBs(updateRecord);
            assertEquals(1, rows);

            Pkfieldsblobs newRecord = dao.selectByPrimaryKey(new Integer(3),
                    new Integer(4));
            assertEquals(updateRecord.getFirstname(), newRecord.getFirstname());
            assertEquals(updateRecord.getLastname(), newRecord.getLastname());
            assertEquals(record.getId1(), newRecord.getId1());
            assertEquals(record.getId2(), newRecord.getId2());
View Full Code Here

            updateRecord.setLastname("Jones");

            int rows = dao.updateByPrimaryKeyWithoutBLOBs(updateRecord);
            assertEquals(1, rows);

            Pkfieldsblobs newRecord = dao.selectByPrimaryKey(new Integer(3),
                    new Integer(4));
            assertEquals(updateRecord.getFirstname(), newRecord.getFirstname());
            assertEquals(updateRecord.getLastname(), newRecord.getLastname());
            assertEquals(record.getId1(), newRecord.getId1());
            assertEquals(record.getId2(), newRecord.getId2());
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.