hibernate+spring彻底搞定clob、blob的存取

hibernate+spring彻底搞定clob、blob的存取

ID:12053970

大小:67.06 KB

页数:11页

时间:2018-07-15

hibernate+spring彻底搞定clob、blob的存取_第1页
hibernate+spring彻底搞定clob、blob的存取_第2页
hibernate+spring彻底搞定clob、blob的存取_第3页
hibernate+spring彻底搞定clob、blob的存取_第4页
hibernate+spring彻底搞定clob、blob的存取_第5页
资源描述:

《hibernate+spring彻底搞定clob、blob的存取》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、Hibernate+Spring彻底搞定Clob、Blob的存取摘要:本文通过一个实例讲述如何通过Spring2+Hibernate3来快捷操作数据库中的Lob字段。环境:Oracle10g、Srping2、Hibernate3、JUint4说明:由于时间紧迫,没有详细写出思路。运行一下例子就明白了。一、创建实体并添加Xdoclet的Hibernate标签/***@authorleizhimin*@hibernate.mappingdefault-lazy="false"*@hibernate.metaattribut

2、e="class-description"value="工作日志"*@hibernate.classtable="rc_gzrz"*/publicclassWorkNote{privateLongid;//标识privateDateworkDate;//日期privateStringweather;//天气privateStringcontent;//日志内容(Clob)privateStringstate;//日志状态privateLongorgId;//机构idprivateLonguserId;//用户idpri

3、vateDatecreateDate;//创建日期privatebyte[]image;//图片publicstaticfinalStringWORKNOTE_BLANK="00";//未填写publicstaticfinalStringWORKNOTE_FULL="11";//已填写/***@hibernate.idgenerator-class="sequence"column="BS"*@hibernate.metaattribute="field-description"value="标识"*@hibernat

4、e.generator-paramname="sequence"value="SEQ_GW"*/publicLonggetId(){returnid;}publicvoidsetId(Longid){this.id=id;}/***@hibernate.propertycolumn="workDate"not-null="false"type="timestamp"*@hibernate.metaattribute="field-description"value="工作日期"*/publicDategetWorkDa

5、te(){returnworkDate;}publicvoidsetWorkDate(DateworkDate){this.workDate=workDate;}/***@hibernate.propertycolumn="weather"not-null="false"length="24"*@hibernate.metaattribute="field-description"value="天气"*/publicStringgetWeather(){returnweather;}publicvoidsetWeath

6、er(Stringweather){this.weather=weather;}/***@hibernate.propertycolumn="content"not-null="false"type="text"*@hibernate.metaattribute="field-description"value="内容"*/publicStringgetContent(){returncontent;}publicvoidsetContent(Stringcontent){this.content=content;}/

7、***@hibernate.propertycolumn="state"not-null="false"length="2"*@hibernate.metaattribute="field-description"value="状态"*/publicStringgetState(){returnstate;}publicvoidsetState(Stringstate){this.state=state;}/***@hibernate.propertycolumn="orgId"type="long"*@hiberna

8、te.metaattribute="field-description"value="机构id"*/publicLonggetOrgId(){returnorgId;}publicvoidsetOrgId(LongorgId){this.orgId=orgId;}/***@hibernate.propertycolumn="use

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。