KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > consumer > impl > ProducerData


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.wsrp.consumer.impl;
6
7 import org.exoplatform.commons.utils.IOUtil;
8 import org.exoplatform.services.wsrp.consumer.Producer;
9 /**
10  * Created by The eXo Platform SARL .
11  * Author : Tuan Nguyen
12  * tuan08@users.sourceforge.net
13  * Date: Jun 14, 2003
14  * Time: 1:12:22 PM
15  *
16  * @hibernate.class table="WSRP_PRODUCER"
17  */

18 public class ProducerData {
19   private String JavaDoc id_ ;
20   transient private Producer producer_ ;
21   
22   public ProducerData() {
23   }
24   
25   /**
26    * @hibernate.id generator-class="assigned"
27    **/

28   public String JavaDoc getId() { return id_ ; }
29   public void setId(String JavaDoc id) { id_ = id ; }
30   
31   /**
32    * @hibernate.property type="binary"
33    **/

34   public byte[] getData() throws Exception JavaDoc {
35     return IOUtil.serialize(producer_) ;
36   }
37   
38   public void setData(byte[] data) throws Exception JavaDoc {
39     producer_ = (Producer) IOUtil.deserialize(data) ;
40   }
41
42   public Producer getProducer() { return producer_ ; }
43   public void setProducer(Producer p) { producer_ = p ; }
44
45 }
46
Popular Tags