org.jopendocument.util.convertor
Class StringClobConvertor

java.lang.Object
  extended by org.jopendocument.util.convertor.StringClobConvertor
All Implemented Interfaces:
ValueConvertor<java.lang.String,java.sql.Clob>

public class StringClobConvertor
extends java.lang.Object


Field Summary
static StringClobConvertor INSTANCE
           
static StringClobConvertor INSTANCE_LENIENT
           
 
Constructor Summary
StringClobConvertor(int maxLength)
           
StringClobConvertor(java.lang.Integer maxLength)
          Create a new instance.
 
Method Summary
 U convert(T o)
           
 T unconvert(U o)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final StringClobConvertor INSTANCE

INSTANCE_LENIENT

public static final StringClobConvertor INSTANCE_LENIENT
Constructor Detail

StringClobConvertor

public StringClobConvertor(int maxLength)

StringClobConvertor

public StringClobConvertor(java.lang.Integer maxLength)
Create a new instance. Since String can contain at most Integer.MAX_VALUE characters the maximum length of #unconvert(Clob) must be specified.

Parameters:
maxLength - the maximum length, null to throw an exception if the clob doesn't fit in a String.
Method Detail

convert

public final U convert(T o)
Specified by:
convert in interface ValueConvertor<T,U>

unconvert

public final T unconvert(U o)
Specified by:
unconvert in interface ValueConvertor<T,U>