org.apache.ojb.broker.accesslayer.conversions
Class Object2ByteArrFieldConversion

java.lang.Object
  extended by org.apache.ojb.broker.accesslayer.conversions.Object2ByteArrFieldConversion
All Implemented Interfaces:
java.io.Serializable, FieldConversion

public class Object2ByteArrFieldConversion
extends java.lang.Object
implements FieldConversion

This implementation of the FieldConversion interface converts between java.lang.Objects values and byte[] values in the rdbms. This conversion is useful to store serialized objects in database columns.

NOTE: This implementation use GZIPOutputStream and GZIPInputStream to compress data.

Version:
$Id: Object2ByteArrFieldConversion.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
Thomas Mahler
See Also:
Object2ByteArrUncompressedFieldConversion, Serialized Form

Constructor Summary
Object2ByteArrFieldConversion()
           
 
Method Summary
 java.lang.Object javaToSql(java.lang.Object source)
          Convert an object of the persistent class to a counterpart object supported by the JDBC specification.
 java.lang.Object sqlToJava(java.lang.Object source)
          Convert a JDBC object to a persistent class value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Object2ByteArrFieldConversion

public Object2ByteArrFieldConversion()
Method Detail

javaToSql

public java.lang.Object javaToSql(java.lang.Object source)
Description copied from interface: FieldConversion
Convert an object of the persistent class to a counterpart object supported by the JDBC specification.

Specified by:
javaToSql in interface FieldConversion

sqlToJava

public java.lang.Object sqlToJava(java.lang.Object source)
Description copied from interface: FieldConversion
Convert a JDBC object to a persistent class value.

Specified by:
sqlToJava in interface FieldConversion


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30