org.synchronoss.cpo.transform.jdbc
Class TransformGZipBytes

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

public class TransformGZipBytes
extends Object
implements JdbcCpoTransform<byte[],byte[]>

Converts a compressed byte[] from a jdbc datasource to an uncompressed byte[] and from a byte[] to a compressed byte[] in a datasource

Author:
david berry

Constructor Summary
TransformGZipBytes()
           
 
Method Summary
 byte[] transformIn(byte[] inBytes)
          Transforms the datasource object into an object required by the class
 byte[] transformOut(byte[] j)
           
 byte[] transformOut(JdbcCallableStatementFactory jpsf, byte[] attributeObject)
           
 byte[] 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

TransformGZipBytes

public TransformGZipBytes()
Method Detail

transformIn

public byte[] transformIn(byte[] inBytes)
                   throws CpoException
Transforms the datasource object into an object required by the class

Specified by:
transformIn in interface CpoTransform<byte[],byte[]>
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 byte[] transformOut(JdbcPreparedStatementFactory jpsf,
                           byte[] attributeObject)
                    throws CpoException
Transforms the data from the class attribute to the object required by the datasource

Specified by:
transformOut in interface JdbcCpoTransform<byte[],byte[]>
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 byte[] transformOut(JdbcCallableStatementFactory jpsf,
                           byte[] attributeObject)
                    throws CpoException,
                           UnsupportedOperationException
Specified by:
transformOut in interface JdbcCpoTransform<byte[],byte[]>
Throws:
CpoException
UnsupportedOperationException

transformOut

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


Copyright © 2014. All Rights Reserved.