ojb.broker.accesslayer
Interface ConversionStrategy

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ArticleConversionStrategy, ConversionStrategyDefaultImpl

public interface ConversionStrategy
extends java.io.Serializable

ConversionStrategy declares a protocol for type and Value conversions between Java objects and SQL types and values. The default implementation does not modify its input. But OJB users are free to build their own conversions that perform arbitrary mappings. the mapping has to defined in the xml repository.

Author:
Thomas Mahler

Method Summary
 java.lang.Object javaToSql(java.lang.Object source, FieldDescriptor fld)
          convert a Java object to its SQL pendant, used for insert & update
 java.lang.Object sqlToJava(java.lang.Object source, FieldDescriptor fld)
          convert a SQL value to a Java Object, used for SELECT
 

Method Detail

javaToSql

public java.lang.Object javaToSql(java.lang.Object source,
                                  FieldDescriptor fld)
convert a Java object to its SQL pendant, used for insert & update


sqlToJava

public java.lang.Object sqlToJava(java.lang.Object source,
                                  FieldDescriptor fld)
convert a SQL value to a Java Object, used for SELECT



Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04