Examples of save()


Examples of org.apache.torque.test.BlobTest.save()

                bytes[i] = new Integer(i % 256).byteValue();
                chars.append(charTemplate.charAt(i % charTemplate.length()));
            }
            blobTest.setBlobValue(bytes);
        }
        blobTest.save();

        // read the BlobTests from the database
        // and check the values against the original values
        List blobTestList = BlobTestPeer.doSelect(new Criteria());
        assertTrue("blobTestList should contain 1 object but contains "
View Full Code Here

Examples of org.apache.torque.test.Book.save()

            {
                Book book = new Book();
                book.setAuthor(author);
                book.setTitle("Book " + j + " - Author " + i);
                book.setIsbn("unknown");
                book.save();
            }
        }
        // clean booleancheck table (because insert uses fixed keys)
        Criteria criteria = new Criteria();
        criteria.add(BooleanCheckPeer.TEST_KEY, (Object) null, Criteria.NOT_EQUAL);
View Full Code Here

Examples of org.apache.torque.test.BooleanCheck.save()

        BooleanCheck bc = new BooleanCheck();
        bc.setTestKey("t1");
        bc.setBintValue(true);
        bc.setBcharValue(true);
        bc.save();
        bc = new BooleanCheck();
        bc.setTestKey("f1");
        bc.setBintValue(false);
        bc.setBcharValue(false);
        bc.save();
View Full Code Here

Examples of org.apache.torque.test.ClobTest.save()

            {
                 chars.append(charTemplate.charAt(i % charTemplate.length()));
            }
            clobTest.setClobValue(chars.toString());
        }
        clobTest.save();

        // read the ClobTests from the database
        // and check the values against the original values
        List clobTestList = ClobTestPeer.doSelect(new Criteria());
        assertTrue("clobTestList should contain 1 object but contains "
View Full Code Here

Examples of org.apache.torque.test.DateTest.save()

        DateTest dateTest = new DateTest();
        Date now = new Date();
        dateTest.setDateValue(now);
        dateTest.setTimeValue(now);
        dateTest.setTimestampValue(now);
        dateTest.save();
        DateFormat dateFormat = new SimpleDateFormat();
        System.out.println(
                "testDateTime() : set date to : "
                + dateFormat.format(now));
View Full Code Here

Examples of org.apache.torque.test.InheritanceClassnameTestChild1.save()

        inheritanceClassnameTest.setPayload("0 parent");
        inheritanceClassnameTest.save();
        InheritanceClassnameTestChild1 inheritanceClassnameChild1
                = new InheritanceClassnameTestChild1();
        inheritanceClassnameChild1.setPayload("1 child");
        inheritanceClassnameChild1.save();
        InheritanceClassnameTestChild2 inheritanceClassnameChild2
                = new InheritanceClassnameTestChild2();
        inheritanceClassnameChild2.setPayload("2 child");
        inheritanceClassnameChild2.save();
View Full Code Here

Examples of org.apache.torque.test.InheritanceClassnameTestChild2.save()

        inheritanceClassnameChild1.setPayload("1 child");
        inheritanceClassnameChild1.save();
        InheritanceClassnameTestChild2 inheritanceClassnameChild2
                = new InheritanceClassnameTestChild2();
        inheritanceClassnameChild2.setPayload("2 child");
        inheritanceClassnameChild2.save();

        // Check that all objects are saved into the InheritanceTest table
        criteria = new Criteria();
        criteria.where(
                InheritanceClassnameTestPeer.INHERITANCE_TEST,
View Full Code Here

Examples of org.apache.torque.test.IntegerPk.save()

     * @throws Exception if the test fails
     */
    public void testMultiplePrimaryForeignKey() throws Exception
    {
        IntegerPk integerPk = new IntegerPk();
        integerPk.save();
        MultiPkForeignKey multiPkForeignKey = new MultiPkForeignKey();
        multiPkForeignKey.setId(10);
        multiPkForeignKey.setIntegerPk(integerPk);
        multiPkForeignKey.save();
        integerPk.save();
View Full Code Here

Examples of org.apache.torque.test.LargePk.save()

        long longId = 8771507845873286l;
        LargePk largePk = new LargePk();
        largePk.setLargePkId(longId);
        largePk.setName("testLargePk");
        largePk.save();

        List largePkList = LargePkPeer.doSelect(new Criteria());
        LargePk readLargePk = (LargePk) largePkList.get(0);
        assertTrue("the inserted Id, " + largePk.getLargePkId()
            + " , and the read id, " + readLargePk.getLargePkId()
View Full Code Here

Examples of org.apache.torque.test.MultiPk.save()

        MultiPkPeer.doDelete(criteria);

        // do test
        MultiPk mpk = new MultiPk();
        mpk.setPrimaryKey("Svarchar:N5:Schar:");
        mpk.save();
    }

    private static final String[] validTitles = {
        "Book 7 - Author 8", "Book 6 - Author 8", "Book 7 - Author 7",
        "Book 6 - Author 7", "Book 7 - Author 6", "Book 6 - Author 6",
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.