简体   繁体   English

Toplink和Java存储Word或pdf文件

[英]Toplink & java storing word or pdf files

I'm creating a simple page with a form. 我正在用表单创建一个简单的页面。 Part of the form requires uploading a pdf or word document. 表格的一部分要求上传pdf或word文档。 This will be a small file, so ideally I would like to store it in my oracle database. 这将是一个小文件,因此理想情况下,我要将其存储在oracle数据库中。

I'm using ejb and toplink for all of my persistence. 我一直在使用ejb和toplink来保持持久性。 What object should my entity class have that will hold a word or pdf file, and how do I map it to toplink? 我的实体类应该具有哪个对象,该对象可以容纳word或pdf文件,如何将其映射到toplink?

See Can toplink map BLOB data . 请参阅可以顶部链接映射BLOB数据 In terms of what type your entity should use, it's either byte[] or a serializable type apparently. 就您的实体应使用的类型而言,它显然是byte[]或可序列化的类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM