Package mbg.test.common

Examples of mbg.test.common.MyTime


            record.setFirstname(fn);
            record.setId1(1);
            record.setId2(2);
            record.setLastname("Butler");

            MyTime myTime = new MyTime();
            myTime.setHours(12);
            myTime.setMinutes(34);
            myTime.setSeconds(05);
            record.setTimefield(myTime);
            record.setTimestampfield(new Date());

            mapper.insert(record);
View Full Code Here


            record.setFirstname(fn);
            record.setId1(1);
            record.setId2(2);
            record.setLastname("Butler");

            MyTime myTime = new MyTime();
            myTime.setHours(12);
            myTime.setMinutes(34);
            myTime.setSeconds(05);
            record.setTimefield(myTime);
            record.setTimestampfield(new Date());

            mapper.insert(record);
View Full Code Here

        Time time = resultGetter.getTime();
        if (time == null) {
            return null;
        } else {

            MyTime answer = new MyTime();

            Calendar c = Calendar.getInstance();
            c.setTime(time);

            answer.setHours(c.get(Calendar.HOUR_OF_DAY));
            answer.setMinutes(c.get(Calendar.MINUTE));
            answer.setSeconds(c.get(Calendar.SECOND));

            return answer;
        }
    }
View Full Code Here

    public void setParameter(ParameterSetter parameterSetter, Object value)
            throws SQLException {
        if (value == null) {
            parameterSetter.setNull(Types.TIME);
        } else {
            MyTime myTime = (MyTime) value;

            Calendar c = Calendar.getInstance();
            c.set(Calendar.HOUR_OF_DAY, myTime.getHours());
            c.set(Calendar.MINUTE, myTime.getMinutes());
            c.set(Calendar.SECOND, myTime.getSeconds());

            Time time = new Time(c.getTime().getTime());

            parameterSetter.setTime(time);
        }
View Full Code Here

        super();
    }

    public MyTime getResult(CallableStatement cs, int columnIndex)
            throws SQLException {
        MyTime answer = null;
        Time time = cs.getTime(columnIndex);
        if (time != null) {
            answer = new MyTime();

            Calendar c = Calendar.getInstance();
            c.setTime(time);

            answer.setHours(c.get(Calendar.HOUR_OF_DAY));
            answer.setMinutes(c.get(Calendar.MINUTE));
            answer.setSeconds(c.get(Calendar.SECOND));
        }
       
        return answer;
    }
View Full Code Here

        return answer;
    }

    public MyTime getResult(ResultSet rs, String columnName)
            throws SQLException {
        MyTime answer = null;
        Time time = rs.getTime(columnName);
        if (time != null) {
            answer = new MyTime();

            Calendar c = Calendar.getInstance();
            c.setTime(time);

            answer.setHours(c.get(Calendar.HOUR_OF_DAY));
            answer.setMinutes(c.get(Calendar.MINUTE));
            answer.setSeconds(c.get(Calendar.SECOND));
        }
       
        return answer;
    }
View Full Code Here

        return answer;
    }

    public MyTime getResult(ResultSet rs, int columnIndex)
            throws SQLException {
        MyTime answer = null;
        Time time = rs.getTime(columnIndex);
        if (time != null) {
            answer = new MyTime();

            Calendar c = Calendar.getInstance();
            c.setTime(time);

            answer.setHours(c.get(Calendar.HOUR_OF_DAY));
            answer.setMinutes(c.get(Calendar.MINUTE));
            answer.setSeconds(c.get(Calendar.SECOND));
        }
       
        return answer;
    }
View Full Code Here

            record.setFirstname(fn);
            record.setId1(1);
            record.setId2(2);
            record.setLastname("Butler");

            MyTime myTime = new MyTime();
            myTime.setHours(12);
            myTime.setMinutes(34);
            myTime.setSeconds(05);
            record.setTimefield(myTime);
            record.setTimestampfield(new Date());

            dao.insertMyObject(record);
View Full Code Here

            record.setFirstname(fn);
            record.setId1(1);
            record.setId2(2);
            record.setLastname("Butler");

            MyTime myTime = new MyTime();
            myTime.setHours(12);
            myTime.setMinutes(34);
            myTime.setSeconds(05);
            record.setTimefield(myTime);
            record.setTimestampfield(new Date());

            dao.insertMyObject(record);
View Full Code Here

            record.setFirstname(fn);
            record.setId1(1);
            record.setId2(2);
            record.setLastname("Butler");

            MyTime myTime = new MyTime();
            myTime.setHours(12);
            myTime.setMinutes(34);
            myTime.setSeconds(05);
            record.setTimefield(myTime);
            record.setTimestampfield(new Date());

            mapper.insert(record);
View Full Code Here

TOP

Related Classes of mbg.test.common.MyTime

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.