Class TransformNoOp
java.lang.Object
org.synchronoss.cpo.jdbc.transform.TransformNoOp
- All Implemented Interfaces:
CpoTransform<Integer,,Integer> JdbcCpoTransform<Integer,Integer>
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontransformIn(Integer dbIn) Transforms the datasource object into an object required by the class.transformOut(JdbcCallableStatementFactory jcsf, Integer attrOut) Transforms the data from the class attribute to the object required by the datasource.transformOut(JdbcPreparedStatementFactory jpsf, Integer attrOut) Transforms the data from the class attribute to the object required by the datasource.
-
Constructor Details
-
TransformNoOp
public TransformNoOp()Constructs a TransformNoOp
-
-
Method Details
-
transformIn
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 bean.
- Specified by:
transformInin interfaceCpoTransform<Integer,Integer> - Parameters:
dbIn- The value from the datasource that will be transformed into the format that is required by the bean.- Returns:
- The object to be stored in the attribute
- Throws:
CpoException- An error occurred
-
transformOut
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 bean into a Blob object for the datasource.
- Specified by:
transformOutin interfaceJdbcCpoTransform<Integer,Integer> - 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- An error occurred
-
transformOut
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 bean into a Blob object for the datasource.
- Specified by:
transformOutin interfaceJdbcCpoTransform<Integer,Integer> - 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- An error occurred
-
transformOut
- Specified by:
transformOutin interfaceCpoTransform<Integer,Integer> - Throws:
CpoExceptionUnsupportedOperationException
-