Examples of save()


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

        IntegerPk integerPk = new IntegerPk();
        integerPk.save();
        MultiPkForeignKey multiPkForeignKey = new MultiPkForeignKey();
        multiPkForeignKey.setId(10);
        multiPkForeignKey.setIntegerPk(integerPk);
        multiPkForeignKey.save();
        integerPk.save();
    }

    /**
     * Tests inserting single quotes in Strings.
View Full Code Here

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

        NullValueTable nvt = new NullValueTable();
        nvt.setNumber1(1);
        nvt.setNumber3(3);
        nvt.setText1("text");
        nvt.setNumberObj1(new Integer(1));
        nvt.save();
    }

    /**
     * test boolean values
     * @throws Exception if the test fails
View Full Code Here

Examples of org.apache.torque.test.dbobject.Author.save()

    {
        cleanBookstore();

        Author otherAuthor = new Author();
        otherAuthor.setName("OtherName");
        otherAuthor.save();

        Author author = new Author();
        author.setName("Name");
        author.save();
View Full Code Here

Examples of org.apache.torque.test.dbobject.BigintType.save()

        BigintTypePeer.doDelete(new Criteria());

        long longId = 8771507845873286l;
        BigintType bigintType = new BigintType();
        bigintType.setId(longId);
        bigintType.save();

        List<BigintType> bigintTypeList = BigintTypePeer.doSelect(new Criteria());
        BigintType readBigintType = bigintTypeList.get(0);
        assertEquals(bigintType.getId(), readBigintType.getId());
        assertEquals(longId, readBigintType.getId());
View Full Code Here

Examples of org.apache.torque.test.dbobject.BintBcharType.save()

        bc.setId("t1");
        bc.setBintValue(true);
        bc.setBcharValue(true);
        bc.setBintObjectValue(Boolean.TRUE);
        bc.setBcharObjectValue(Boolean.TRUE);
        bc.save();
        bc = new BintBcharType();
        bc.setId("f1");
        bc.setBintValue(false);
        bc.setBcharValue(false);
        bc.setBintObjectValue(Boolean.FALSE);
View Full Code Here

Examples of org.apache.torque.test.dbobject.BitCompositePk.save()

        BitCompositePk bitCompositePk = new BitCompositePk();
        bitCompositePk.setPk1("false value");
        bitCompositePk.setPk2(Boolean.FALSE);
        bitCompositePk.setPayload("false payload");
        bitCompositePk.save();

        bitCompositePk = new BitCompositePk();
        bitCompositePk.setPk1("true value");
        bitCompositePk.setPk2(Boolean.TRUE);
        bitCompositePk.setPayload("true payload");
View Full Code Here

Examples of org.apache.torque.test.dbobject.BitType.save()

        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

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

                book.isModified());
        assertTrue("isNew() should return true after creation of object "
                + " from new bean",
                book.isNew());
        book.setAuthor(author);
        book.save();

        List<Book> bookList = BookPeer.doSelect(new Criteria());
        assertTrue("Ther should be one book in DB but there are "
                + bookList.size(),
                bookList.size() == 1);
View Full Code Here

Examples of org.apache.torque.test.dbobject.CompPkContainsFk.save()

        OIntegerPk oIntegerPk = new OIntegerPk();
        oIntegerPk.save();
        CompPkContainsFk compPkContainsFk = new CompPkContainsFk();
        compPkContainsFk.setId1(oIntegerPk.getId());
        compPkContainsFk.setId2("test");
        compPkContainsFk.save();

        List<CompPkContainsFk> selectedList
                = CompPkContainsFkPeer.doSelect(new Criteria());
        assertEquals(1, selectedList.size());
        CompPkContainsFk selected = selectedList.get(0);
View Full Code Here

Examples of org.apache.torque.test.dbobject.CurrentDateTable.save()

        }
        CurrentDateTablePeer.doDelete(new Criteria());
        CurrentDateTable currentDate = new CurrentDateTable();

        Date currentDateBefore = doSelect("CURRENT_DATE", java.sql.Date.class);
        currentDate.save();
        Date currentDateAfter = doSelect("CURRENT_DATE", java.sql.Date.class);

        List<CurrentDateTable> dbStateList
                = CurrentDateTablePeer.doSelect(new Criteria());
        assertEquals(1, dbStateList.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.