1

I have to save the "javax.activation.DataHandler-object" in database.

Which JPA 2.0 annotation do I have to use to save the object?

What is the mapping file for this class?

 /**
 * <pre>
 * <complexType name="TXLKAORG_SL_DATA_Type">
 *  <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="daten" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * </pre>     
 */

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TXLKAORG_SL_DATA_Type", propOrder = { "erstellungsDatum", "daten" })
@Embeddable
public class TXLKAORGSLDATAType implements Serializable
{

@XmlElement(required = true)
@XmlMimeType("application/vnd.vdv.ah.txlkaorglist.sl.zip")
protected DataHandler daten;

 ...
 ...
 }
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
user1167253
  • 813
  • 1
  • 11
  • 27
  • I don't think there is an out-of-the box mapping. Try to get the contents of the DataHandler to a string and save that. – ManuPK Apr 12 '12 at 13:21

0 Answers0