org.synchronoss.cpo.transform.jdbc
Class TransformBlob

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

public class TransformBlob
extends java.lang.Object

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
TransformBlob()
           
 
Method Summary
 byte[] transformIn(java.sql.Blob blob)
          Transforms the datasource object into an object required by the class
 java.sql.Blob transformOut(JdbcPreparedStatementFactory jpsf, byte[] 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

TransformBlob

public TransformBlob()
Method Detail

transformIn

public byte[] transformIn(java.sql.Blob blob)
                   throws CpoException
Transforms the datasource object into an object required by the class

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 java.sql.Blob transformOut(JdbcPreparedStatementFactory jpsf,
                                  byte[] attributeObject)
                           throws CpoException
Transforms the data from the class attribute to the object required by the datasource

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


Copyright © 2010. All Rights Reserved.