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

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

public class StringVector2VarcharFieldConversion
extends java.lang.Object
implements FieldConversion

Converts a Vector of string elements back and forth from a database varchar field Strings may not contain "#" as this is used as separator. This class maybe useful if it's important to have the string vector stored in a human readable form that allows editing.

Version:
$Id: StringVector2VarcharFieldConversion.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
sschloesser mailto: stefan.schl@gmx.de
See Also:
uses Java serialization and is not suited for this purpose., Serialized Form

Constructor Summary
StringVector2VarcharFieldConversion()
          Creates a new instance of StringVector2VarcharFieldConversion
 
Method Summary
 java.lang.Object javaToSql(java.lang.Object obj)
          Convert an object of the persistent class to a counterpart object supported by the JDBC specification.
 java.lang.Object sqlToJava(java.lang.Object obj)
          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

StringVector2VarcharFieldConversion

public StringVector2VarcharFieldConversion()
Creates a new instance of StringVector2VarcharFieldConversion

Method Detail

javaToSql

public java.lang.Object javaToSql(java.lang.Object obj)
                           throws ConversionException
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
Throws:
ConversionException

sqlToJava

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

Specified by:
sqlToJava in interface FieldConversion
Throws:
ConversionException


(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