Package org.apache.torque.test.dbobject

Examples of org.apache.torque.test.dbobject.BitType


            return;
        }
        fillTables();

        // read data
        BitType bitType = BitTypePeer.doSelectSingleRecord(
                new Criteria().where(BitTypePeer.ID, "t1"));
        assertTrue("BIT should be true but is: "
                + bitType.getBitValue(), bitType.getBitValue());

        bitType = BitTypePeer.retrieveByPK(new StringKey("f1"));
        assertFalse("BIT should be false but is: "
                + bitType.getBitValue(), bitType.getBitValue());
    }
View Full Code Here


        // query data
        Criteria criteria = new Criteria()
                .where(BitTypePeer.BIT_VALUE, new Boolean(true));
        List<BitType> bitTypeList = BitTypePeer.doSelect(criteria);
        assertEquals(1, bitTypeList.size());
        BitType bitType = bitTypeList.get(0);
        // use trim() for testkey because some databases will return the
        // testkey filled up with blanks, as it is defined as char(10)
        assertEquals("t1", bitType.getId());
    }
View Full Code Here

                BitTypePeer.BIT_VALUE, new Boolean(false));
        List<BitType> bitTypeList = BitTypePeer.doSelect(criteria);
        assertTrue("Should have read 1 dataset "
                + "but read " + bitTypeList.size(),
                bitTypeList.size() == 1);
        BitType bitValue = bitTypeList.get(0);
        assertTrue("Primary key of data set should be f1 but is "
                + bitValue.getId(),
                "f1".equals(bitValue.getId()));
    }
View Full Code Here

        bitCompositePk.setPk1("value");
        bitCompositePk.setPk2(Boolean.TRUE);
        bitCompositePk.setPayload("payload");
        bitCompositePk.save();

        BitType bitType = new BitType();
        bitType.setId("t1");
        bitType.setBitValue(true);
        bitType.save();

        bitType = new BitType();
        bitType.setId("f1");
        bitType.setBitValue(false);
        bitType.save();
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.test.dbobject.BitType

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.