KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > producer > impl > StateData


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.producer.impl;
6
7 import org.exoplatform.commons.utils.IOUtil;
8 /**
9  * Created by The eXo Platform SARL .
10  * Author : Tuan Nguyen
11  * tuan08@users.sourceforge.net
12  * Date: Jun 14, 2003
13  * Time: 1:12:22 PM
14  *
15  * @hibernate.class table="WSRP_STATE"
16  */

17 public class StateData {
18   private String JavaDoc id_ ;
19   private String JavaDoc type_ ;
20   transient private Object JavaDoc object_ ;
21   
22   public StateData() {
23   }
24
25   /**
26    * @hibernate.id generator-class="assigned" unsaved-value="null"
27    ***/

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

34   public String JavaDoc getDataType() { return type_ ; }
35   public void setDataType(String JavaDoc s) { type_ = s ; }
36
37   /**
38    * @hibernate.property type="binary"
39    **/

40   public byte[] getData() throws Exception JavaDoc {
41     return IOUtil.serialize(object_) ;
42   }
43   public void setData(byte[] data) throws Exception JavaDoc {
44     object_ = IOUtil.deserialize(data) ;
45   }
46
47   public Object JavaDoc getDataObject() { return object_ ; }
48   public void setDataObject(Object JavaDoc o) { object_ = o ; }
49
50 }
51
Popular Tags