private String computeStringValue(final Object retval) { if (retval instanceof Clob) { try { return IOUtils.getInstance().readClob((Clob) retval); } catch (Exception e) { return null; } } if (retval != null) { return retval.toString(); } return null; }
private String computeStringValue( final Object retval ) throws EvaluationException { if ( retval instanceof Clob ) { try { return IOUtils.getInstance().readClob( (Clob) retval ); } catch ( Exception e ) { return null; } } if ( retval instanceof String ) { return (String) retval; } if ( retval != null ) { return unwrap( retval, new StringBuilder() ).toString(); } return null; }
protected Object[][] produceData( final ResultSet rs, final int colcount ) throws SQLException { final ArrayList<Object[]> rows = new ArrayList<Object[]>(); while ( rs.next() ) { final Object[] column = new Object[ colcount ]; for ( int i = 0; i < colcount; i++ ) { final Object val = rs.getObject( i + 1 ); try { if ( val instanceof Blob ) { column[ i ] = IOUtils.getInstance().readBlob( (Blob) val ); } else if ( val instanceof Clob ) { column[ i ] = IOUtils.getInstance().readClob( (Clob) val ); } else { column[ i ] = val; } } catch ( IOException ioe ) { logger.error( "IO error while copying data.", ioe ); throw new SQLException( "IO error while copying data: " + ioe.getMessage() ); } } rows.add( column ); } return rows.toArray( new Object[ rows.size() ][] ); }
final Clob clob = (Clob) object; try { return IOUtils.getInstance().readClob( clob ); } catch ( Exception e ) { return null;
private Object evaluate( final Expression ex ) throws IOException, SQLException { final Object retval = ex.getValue(); if ( retval instanceof Clob ) { return IOUtils.getInstance().readClob( (Clob) retval ); } if ( retval instanceof Blob ) { return IOUtils.getInstance().readBlob( (Blob) retval ); } return retval; } }
private Object evaluate( final Expression ex ) throws IOException, SQLException { final Object retval = ex.getValue(); if ( retval instanceof Clob ) { return IOUtils.getInstance().readClob( (Clob) retval ); } if ( retval instanceof Blob ) { return IOUtils.getInstance().readBlob( (Blob) retval ); } return retval; }