Examples of CurrentTimestampTable


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

        if (!canUseCurrentTimestampAsDefaultForTimestamp())
        {
            return;
        }
        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());
        CurrentTimestampTable dbState = dbStateList.get(0);
        assertFalse(
                "currentDate should be >= currentDateBefore",
                dbState.getCurrentTimestampValue().before(
                        currentTimestampBefore));
        assertFalse(
                "currentDate should be <= currentDateAfter",
                dbState.getCurrentTimestampValue().after(
                        currentTimestampAfter));
    }
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.