com.cedarsoft.serialization
Class DateTimeSerializer

java.lang.Object
  extended by com.cedarsoft.serialization.AbstractSerializer<T,org.codehaus.staxmate.out.SMOutputElement,org.codehaus.stax2.XMLStreamReader2,javax.xml.stream.XMLStreamException>
      extended by com.cedarsoft.serialization.stax.AbstractStaxMateSerializer<org.joda.time.DateTime>
          extended by com.cedarsoft.serialization.DateTimeSerializer
All Implemented Interfaces:
ExtendedSerializer<org.joda.time.DateTime>, PluggableSerializer<org.joda.time.DateTime,org.codehaus.staxmate.out.SMOutputElement,org.codehaus.stax2.XMLStreamReader2,javax.xml.stream.XMLStreamException>, Serializer<org.joda.time.DateTime,Lookup>

public class DateTimeSerializer
extends AbstractStaxMateSerializer<org.joda.time.DateTime>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.cedarsoft.serialization.stax.AbstractStaxMateSerializer
AbstractStaxMateSerializer.CB
 
Constructor Summary
DateTimeSerializer()
           
 
Method Summary
 org.joda.time.DateTime deserialize(org.codehaus.stax2.XMLStreamReader2 deserializeFrom, Lookup context)
          Deserializes the object from the given document
 org.codehaus.staxmate.out.SMOutputElement serialize(org.codehaus.staxmate.out.SMOutputElement serializeTo, org.joda.time.DateTime object, Lookup context)
          Serializes the object to the given element
 
Methods inherited from class com.cedarsoft.serialization.stax.AbstractStaxMateSerializer
closeTag, deserialize, ensureTag, getChildText, getText, nextTag, serialize, visitChildren
 
Methods inherited from class com.cedarsoft.serialization.AbstractSerializer
deserialize, getDefaultElementName, serialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeSerializer

public DateTimeSerializer()
Method Detail

serialize

@NotNull
public org.codehaus.staxmate.out.SMOutputElement serialize(@NotNull
                                                                   org.codehaus.staxmate.out.SMOutputElement serializeTo,
                                                                   @NotNull
                                                                   org.joda.time.DateTime object,
                                                                   @NotNull
                                                                   Lookup context)
                                                    throws java.io.IOException,
                                                           javax.xml.stream.XMLStreamException
Description copied from interface: PluggableSerializer
Serializes the object to the given element

Parameters:
serializeTo - the serializeTo
object - the object
context - the context
Returns:
the serializeTo (for fluent writing)
Throws:
java.io.IOException
javax.xml.stream.XMLStreamException

deserialize

@NotNull
public org.joda.time.DateTime deserialize(@NotNull
                                                  org.codehaus.stax2.XMLStreamReader2 deserializeFrom,
                                                  @NotNull
                                                  Lookup context)
                                   throws java.io.IOException,
                                          javax.xml.stream.XMLStreamException
Description copied from interface: PluggableSerializer
Deserializes the object from the given document

Parameters:
deserializeFrom - the deserializeFrom
context - the context
Returns:
the deserialized object
Throws:
java.io.IOException
javax.xml.stream.XMLStreamException


Copyright © 2009 cedarsoft GmbH. All Rights Reserved.