org.kuali.rice.core.util.jaxb
Class StringToDateTimeAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<String,Date>
      extended by org.kuali.rice.core.util.jaxb.StringToDateTimeAdapter

public class StringToDateTimeAdapter
extends XmlAdapter<String,Date>

An XML Adapter that relies on the DateTimeService to marshal and unmarshal datetime values in String form. Converts Strings to java.util.Date instances and vice versa.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
StringToDateTimeAdapter()
           
 
Method Summary
 String marshal(Date v)
           
 Date unmarshal(String v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringToDateTimeAdapter

public StringToDateTimeAdapter()
Method Detail

unmarshal

public Date unmarshal(String v)
               throws Exception
Specified by:
unmarshal in class XmlAdapter<String,Date>
Throws:
Exception
See Also:
XmlAdapter.unmarshal(java.lang.Object)

marshal

public String marshal(Date v)
               throws Exception
Specified by:
marshal in class XmlAdapter<String,Date>
Throws:
Exception
See Also:
XmlAdapter.marshal(java.lang.Object)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.