org.synchronoss.cpo.transform.jdbc
Class TransformClob

java.lang.Object
  extended by org.synchronoss.cpo.transform.jdbc.TransformClob
All Implemented Interfaces:
CpoTransform<Clob,char[]>, JdbcCpoTransform<Clob,char[]>

public class TransformClob
extends Object
implements JdbcCpoTransform<Clob,char[]>

Converts a java.sql.Blob from a jdbc datasource to a byte[] and from a byte[] to a java.sql.Blob

Author:
david berry

Constructor Summary
TransformClob()
           
 
Method Summary
 char[] transformIn(Clob clob)
          Transforms the datasource object into an object required by the class
 Clob transformOut(char[] j)
           
 Clob transformOut(JdbcCallableStatementFactory jpsf, char[] attributeObject)
           
 Clob transformOut(JdbcPreparedStatementFactory jpsf, char[] attributeObject)
          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

TransformClob

public TransformClob()
Method Detail

transformIn

public char[] transformIn(Clob clob)
                   throws CpoException
Transforms the datasource object into an object required by the class

Specified by:
transformIn in interface CpoTransform<Clob,char[]>
Parameters:
cpoAdapter - The CpoAdapter for the datasource where the attribute is being retrieved
parentObject - The object that contains the attribute being retrieved.
The - object that represents the datasource object being retrieved
Returns:
The object to be stored in the attribute
Throws:
CpoException

transformOut

public Clob transformOut(JdbcPreparedStatementFactory jpsf,
                         char[] attributeObject)
                  throws CpoException
Transforms the data from the class attribute to the object required by the datasource

Specified by:
transformOut in interface JdbcCpoTransform<Clob,char[]>
Parameters:
cpoAdapter - The CpoAdapter for the datasource where the attribute is being persisted
parentObject - The object that contains the attribute being persisted.
attributeObject - The object that represents the attribute being persisted.
Returns:
The object to be stored in the datasource
Throws:
CpoException

transformOut

public Clob transformOut(JdbcCallableStatementFactory jpsf,
                         char[] attributeObject)
                  throws CpoException,
                         UnsupportedOperationException
Specified by:
transformOut in interface JdbcCpoTransform<Clob,char[]>
Throws:
CpoException
UnsupportedOperationException

transformOut

public Clob transformOut(char[] j)
                  throws CpoException,
                         UnsupportedOperationException
Specified by:
transformOut in interface CpoTransform<Clob,char[]>
Throws:
CpoException
UnsupportedOperationException


Copyright © 2014. All Rights Reserved.