View Javadoc
1   package org.kuali.ole.ncip.converter;
2   
3   import com.thoughtworks.xstream.XStream;
4   import org.kuali.ole.ncip.bo.OLEHold;
5   
6   /**
7    * Created with IntelliJ IDEA.
8    * User: sheiksalahudeenm
9    * Date: 8/20/13
10   * Time: 5:42 PM
11   * To change this template use File | Settings | File Templates.
12   */
13  public class OLEHoldConverter {
14      public String generateHoldXml(OLEHold oleHold){
15          XStream xStream = new XStream();
16          xStream.alias("hold",OLEHold.class);
17          return xStream.toXML(oleHold);
18      }
19  
20      public Object generateHoldObject(String xml){
21          XStream xStream = new XStream();
22          xStream.alias("hold",OLEHold.class);
23          return xStream.fromXML(xml);
24      }
25  }