在oracle数据库中
字段类型 是BLOB、CLOB、TIMESTAMP 代表的什么意思
我在java中的映射类 应怎么写呢?请大家帮帮忙!比如像数据库中的字段类型 是 number 在java中写 Int 就可以了!

解决方案 »

  1.   

    BLOB 一个二进制大型对象;最大4G字节
    CLOB 一个字符大型对象,可容纳单字节的字符;不支持宽度不等的字符集;最大为4G字节
    TIMESTAMP(java类型) 时间类型 去取值带时分秒 与dataTime有点小区别
      

  2.   

    分别对应 java.sql.Clob, java.sql.Blob, java.sql.Timestamp如果要用Hibernate映射对应为<property name="content" column="content" type="java.sql.Clob"></property><property name="content" column="content" type="java.sql.Blob"></property><timestamp name="orderTime" column="order_time"></timestamp>
      

  3.   


    Number不一定是int 也可能是long或者是double 最保险的还是BigDecimal你说的类型 前两个不同的数据库有不同的实现(如com.mysql.jdbc.Blob 或者 ) 至于TIMESTAMP可能对应的就是java.util.Date了 貌似也可以直接转成java.sql.Timestamp;
      

  4.   

    3楼给出了答案,或你用myEclipes自动生成下看看不就好了!
      

  5.   

       /**
        * 获得上下文对象ActionContext
        * 
        * @return actionContext
        */
       protected final ActionContext getActionContext()
       {
          return (actionContext == null) ? actionContext = ActionContext.getContext() : actionContext;
       }
      

  6.   

    3楼  咱用的把Clob映射成String类型也是对的  <property name="mailContent" type="java.lang.String">
                <column name="MAIL_CONTENT" />
            </property>增删查改都对着
      

  7.   

    BLOB 是以二进制流的形式将图片存储在数据库中的特殊格式