org.synchronoss.cpo.transform.jdbc
Class TransformNoOp

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

public class TransformNoOp
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
TransformNoOp()
           
 
Method Summary
 int transformIn(int dbIn)
          Transforms the datasource object into an object required by the class.
 int transformOut(JdbcCallableStatementFactory jcsf, int attrOut)
          Transforms the data from the class attribute to the object required by the datasource.
 int transformOut(JdbcPreparedStatementFactory jpsf, int attrOut)
          Transforms the data from the class attribute to the object required by the datasource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformNoOp

public TransformNoOp()
Method Detail

transformIn

public int transformIn(int dbIn)
                throws CpoException
Transforms the datasource object into an object required by the class. The type of the dbIn parameter and the type of the return value must change to match the types being converted. Reflection is used to true everything up at runtime. e.g public byte[] transformIn(Blob dbIn) would be the signature for converting a Blob to a byte[] to be stored in the pojo.

Parameters:
dbIn - The value from the datasource that will be transformed into the format that is required by the pojo.
Returns:
The object to be stored in the attribute
Throws:
CpoException

transformOut

public int transformOut(JdbcCallableStatementFactory jcsf,
                        int attrOut)
                 throws CpoException
Transforms the data from the class attribute to the object required by the datasource. The type of the attrOut parameter and the type of the return value must change to match the types being converted. Reflection is used to true everything up at runtime. e.g public Blob transformOut(JdbcCallableStatementFactory jcsf, byte[] attrOut) would be the signature for converting a byte[] stored in the pojo into a Blob object for the datasource.

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.
attrOut - The attribute object that needs to get transformed into the db representation
Returns:
The object to be stored in the datasource
Throws:
CpoException

transformOut

public int transformOut(JdbcPreparedStatementFactory jpsf,
                        int attrOut)
                 throws CpoException
Transforms the data from the class attribute to the object required by the datasource. The type of the attrOut parameter and the type of the return value must change to match the types being converted. Reflection is used to true everything up at runtime. e.g public Blob transformOut(JdbcPreparedStatementFactory jpsf, byte[] attrOut) would be the signature for converting a byte[] stored in the pojo into a Blob object for the datasource.

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.
attrOut - The attribute object that needs to get transformed into the db representation
Returns:
The object to be stored in the datasource
Throws:
CpoException


Copyright © 2010. All Rights Reserved.