Package org.apache.torque.test.dbobject

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


    public void testSelectWithSqlTimestampOnTimestamp() throws TorqueException
    {
        cleanDateTimeTimestampTable();

        // insert new DateTest object to db
        DateTimeTimestampType dateTimeTimestamp = new DateTimeTimestampType();
        dateTimeTimestamp.setDateValue(new Date());
        dateTimeTimestamp.setTimeValue(new Date());
        dateTimeTimestamp.setTimestampValue(
                new GregorianCalendar(2010, 1, 23).getTime());
        dateTimeTimestamp.save();

        // execute select
        Criteria criteria = new Criteria();
        Date toSelect = new GregorianCalendar(2010, 1, 23).getTime();
        criteria.where(
View Full Code Here


     * @throws TorqueException if the data cannot be deleted or saved.
     */
    private void fillDateTimeTimestampWithPastEntry() throws TorqueException
    {
        DateTimeTimestampTypePeer.doDelete(new Criteria());
        DateTimeTimestampType dateTimeTimestamp = new DateTimeTimestampType();
        dateTimeTimestamp.setDateValue(
                new GregorianCalendar(2000, 1, 1).getTime());
        dateTimeTimestamp.setTimeValue(
                new GregorianCalendar(2000, 1, 1).getTime());
        dateTimeTimestamp.setTimestampValue(
                new GregorianCalendar(2000, 1, 1).getTime());
        dateTimeTimestamp.save();
    }
View Full Code Here

TOP

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

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.