码迷,mamicode.com
首页 > 数据库 > 详细

oracle.sql.TIMESTAMP转为java.sql.TIMESTAMP的方法

时间:2018-03-07 11:36:08      阅读:1217      评论:0      收藏:0      [点我收藏+]

标签:ref   timestamp   pre   tcl   cep   let   nbsp   时间   方法   

/**
 * @reference oracle.sql.Datum.timestampValue();
 * @return
 */
private Timestamp getOracleTimestamp(Object value) {
    try {
        Class clz = value.getClass();
        Method m = clz.getMethod("timestampValue");
        //m = clz.getMethod("timeValue", null); 时间类型
        //m = clz.getMethod("dateValue", null); 日期类型
        return (Timestamp) m.invoke(value);

    } catch (Exception e) {
        return null;
    }
}

 

oracle.sql.TIMESTAMP转为java.sql.TIMESTAMP的方法

标签:ref   timestamp   pre   tcl   cep   let   nbsp   时间   方法   

原文地址:https://www.cnblogs.com/warling/p/8520955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!