public static Clob toClob(Connection conn,Object value) throws PageException, SQLException {
  if (value instanceof Clob)   return (Clob)value;
  if (SystemUtil.JAVA_VERSION >= SystemUtil.JAVA_VERSION_1_6) {
    Clob clob=conn.createClob();
    clob.setString(1,Caster.toString(value));
    return clob;
  }
  if (isOracle(conn)) {
    Clob clob=OracleClob.createClob(conn,Caster.toString(value),null);
    if (clob != null)     return clob;
  }
  return ClobImpl.toClob(value);
}

public static Clob toClob ( Connection conn , Object value ) throws PageException , SQLException { if ( value instanceof Clob ) return ( Clob ) value ; if ( SystemUtil . JAVA_VERSION >= SystemUtil . JAVA_VERSION_1_6 ) { Clob clob = conn . createClob ( ) ; clob . setString ( 1 , Caster . toString ( value ) ) ; return clob ; } if ( isOracle ( conn ) ) { Clob clob = OracleClob . createClob ( conn , Caster . toString ( value ) , null ) ; if ( clob != null ) return clob ; } return ClobImpl . toClob ( value ) ; }
create a clob object
