org.clazzes.jdbc2xml.serialization.impl
Class DateSerializationHandler

java.lang.Object
  extended by org.clazzes.jdbc2xml.serialization.impl.DateSerializationHandler
All Implemented Interfaces:
SerializationHandler

public class DateSerializationHandler
extends java.lang.Object
implements SerializationHandler

Author:
wglas

Constructor Summary
DateSerializationHandler(java.util.TimeZone timeZone)
           
 
Method Summary
 void fetchData(java.sql.ResultSet rs, int column)
          Set the data to be serialized from the given column of an SQL result set.
 boolean isNull()
           
 void pushData(org.xml.sax.ContentHandler handler)
          Write the data of the database value to the CDATA content of the currently open tag by calling ContentHandler.characters(char[], int, int).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateSerializationHandler

public DateSerializationHandler(java.util.TimeZone timeZone)
Method Detail

fetchData

public void fetchData(java.sql.ResultSet rs,
                      int column)
               throws java.sql.SQLException
Description copied from interface: SerializationHandler
Set the data to be serialized from the given column of an SQL result set. After this call, SerializationHandler.isNull() or SerializationHandler.fetchData(ResultSet, int) may be called.

Specified by:
fetchData in interface SerializationHandler
Throws:
java.sql.SQLException

isNull

public boolean isNull()
Specified by:
isNull in interface SerializationHandler
Returns:
Whether the data received through SerializationHandler.fetchData(ResultSet, int) is a SQL null value.

pushData

public void pushData(org.xml.sax.ContentHandler handler)
              throws org.xml.sax.SAXException
Description copied from interface: SerializationHandler
Write the data of the database value to the CDATA content of the currently open tag by calling ContentHandler.characters(char[], int, int). This call resets the state of this handler, so SerializationHandler.fetchData(ResultSet, int) my be called again.

Specified by:
pushData in interface SerializationHandler
Parameters:
handler - The ContentHandler to push the characters to.
Throws:
org.xml.sax.SAXException


Copyright © 2008. All Rights Reserved.