org.synchronoss.cpo.transform.jdbc
Class TransformTimestampToCalendar

Package class diagram package TransformTimestampToCalendar
java.lang.Object
  extended by org.synchronoss.cpo.transform.jdbc.TransformTimestampToCalendar

public class TransformTimestampToCalendar
extends java.lang.Object

This is an example of a transform that does nothing. It is used to test the mechanics of the transform logic within CPO.

Author:
david berry

Constructor Summary
TransformTimestampToCalendar()
           
 
Method Summary
 java.util.Calendar transformIn(java.sql.Timestamp ts)
          Transforms the java.sql.Timestamp returned from JDBC into a java.util.Calendar to be used by the class.
 java.sql.Timestamp transformOut(JdbcCallableStatementFactory jcsf, java.util.Calendar cal)
          Transforms a java.util.Calendar from the CPO Bean into a java.sql.Timestamp to be stored by JDBC
 java.sql.Timestamp transformOut(JdbcPreparedStatementFactory jpsf, java.util.Calendar cal)
          Transforms a java.util.Calendar from the CPO Bean into a java.sql.Timestamp to be stored by JDBC
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformTimestampToCalendar

public TransformTimestampToCalendar()
Method Detail

transformIn

public java.util.Calendar transformIn(java.sql.Timestamp ts)
                               throws CpoException
Transforms the java.sql.Timestamp returned from JDBC into a java.util.Calendar to be used by the class.

Parameters:
ts - The Timestamp from JDBC.
Returns:
A Calendar Object
Throws:
CpoException

transformOut

public java.sql.Timestamp transformOut(JdbcCallableStatementFactory jcsf,
                                       java.util.Calendar cal)
                                throws CpoException
Transforms a java.util.Calendar from the CPO Bean into a java.sql.Timestamp to be stored by JDBC

Parameters:
jcsf - a reference to the JdbcCallableStatementFactory. This is necessary as some DBMSs (ORACLE !#$%^&!) that require access to the connection to deal with certain datatypes.
A - Calendar instance
Returns:
A Timestamp object to be stored in the database.
Throws:
CpoException

transformOut

public java.sql.Timestamp transformOut(JdbcPreparedStatementFactory jpsf,
                                       java.util.Calendar cal)
                                throws CpoException
Transforms a java.util.Calendar from the CPO Bean into a java.sql.Timestamp to be stored by JDBC

Parameters:
jpsf - a reference to the JdbcPreparedStatementFactory. This is necessary as some DBMSs (ORACLE !#$%^&!) that require access to the connection to deal with certain datatypes.
A - Calendar instance
Returns:
A Timestamp object to be stored in the database.
Throws:
CpoException


Copyright © 2010. All Rights Reserved.