Examples of save()


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

        }
        CurrentTimeTablePeer.doDelete(new Criteria());
        CurrentTimeTable currentTime = new CurrentTimeTable();

        Date currentDateBefore = doSelect("CURRENT_TIME", Time.class);
        currentTime.save();
        Date currentDateAfter = doSelect("CURRENT_TIME", Time.class);

        List<CurrentTimeTable> dbStateList
                = CurrentTimeTablePeer.doSelect(new Criteria());
        assertEquals(1, dbStateList.size());
View Full Code Here

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

        }
        CurrentTimestampTablePeer.doDelete(new Criteria());
        CurrentTimestampTable currentTimestamp = new CurrentTimestampTable();

        Date currentTimestampBefore = doSelect("CURRENT_TIMESTAMP", Timestamp.class);
        currentTimestamp.save();
        Date currentTimestampAfter = doSelect("CURRENT_TIMESTAMP", Timestamp.class);

        List<CurrentTimestampTable> dbStateList
                = CurrentTimestampTablePeer.doSelect(new Criteria());
        assertEquals(1, dbStateList.size());
View Full Code Here

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

    {
        DatabaseDefaultValuesPeer.doDelete(new Criteria());
        DatabaseDefaultValues databaseDefaultValues
                = new DatabaseDefaultValues();

        databaseDefaultValues.save();

        // saved object should stay the same
        assertEquals(Integer.valueOf(2), databaseDefaultValues.getOInteger());
        assertEquals(4, databaseDefaultValues.getPInt());
        assertEquals("Default!", databaseDefaultValues.getVarcharField());
View Full Code Here

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

        DateTimeTimestampType dateTimeTimestamp = new DateTimeTimestampType();
        Date now = new Date();
        dateTimeTimestamp.setDateValue(now);
        dateTimeTimestamp.setTimeValue(now);
        dateTimeTimestamp.setTimestampValue(now);
        dateTimeTimestamp.save();

        // reload dateTest from db
        DateTimeTimestampType loaded = DateTimeTimestampTypePeer.retrieveByPK(
                dateTimeTimestamp.getPrimaryKey());
View Full Code Here

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

        assertTrue("IfcTable should be an instance of TestInterface", ifc instanceof TestInterface);

        ifc.setID(1);
        ifc.setName("John Doe");
        ifc.save();

        List<IfcTable> results = IfcTablePeer.doSelect(new Criteria());

        for (IfcTable ifcTable : results)
        {
View Full Code Here

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

        InheritanceTest inheritanceTest = new InheritanceTest();
        inheritanceTest.setPayload("payload1");
        inheritanceTest.save();
        InheritanceChildB inheritanceChildB = new InheritanceChildB();
        inheritanceChildB.setPayload("payload 2");
        inheritanceChildB.save();
        InheritanceChildC inheritanceChildC = new InheritanceChildC();
        inheritanceChildC.setPayload("payload 3");
        inheritanceChildC.save();
        InheritanceChildD inheritanceChildD = new InheritanceChildD();
        inheritanceChildD.setPayload("payload 4");
View Full Code Here

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

        InheritanceChildB inheritanceChildB = new InheritanceChildB();
        inheritanceChildB.setPayload("payload 2");
        inheritanceChildB.save();
        InheritanceChildC inheritanceChildC = new InheritanceChildC();
        inheritanceChildC.setPayload("payload 3");
        inheritanceChildC.save();
        InheritanceChildD inheritanceChildD = new InheritanceChildD();
        inheritanceChildD.setPayload("payload 4");
        inheritanceChildD.save();

        // Check that all objects are saved into the InheritanceTest table
View Full Code Here

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

        InheritanceChildC inheritanceChildC = new InheritanceChildC();
        inheritanceChildC.setPayload("payload 3");
        inheritanceChildC.save();
        InheritanceChildD inheritanceChildD = new InheritanceChildD();
        inheritanceChildD.setPayload("payload 4");
        inheritanceChildD.save();

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

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

        // create & save test data
        InheritanceClassnameTest inheritanceClassnameTest
                = new InheritanceClassnameTest();
        inheritanceClassnameTest.setPayload("0 parent");
        inheritanceClassnameTest.save();
        InheritanceClassnameTestChild1 inheritanceClassnameChild1
                = new InheritanceClassnameTestChild1();
        inheritanceClassnameChild1.setPayload("1 child");
        inheritanceClassnameChild1.save();
        InheritanceClassnameTestChild2 inheritanceClassnameChild2
View Full Code Here

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

                new CountHelper().count(criteria));

        // create & save test data
        InheritanceTest inheritanceTest = new InheritanceTest();
        inheritanceTest.setPayload("payload1");
        inheritanceTest.save();
        InheritanceChildB inheritanceChildB = new InheritanceChildB();
        inheritanceChildB.setPayload("payload 2");
        inheritanceChildB.save();
        InheritanceChildC inheritanceChildC = new InheritanceChildC();
        inheritanceChildC.setPayload("payload 3");
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.