public String getClobString(ResultSet rs, int column) throws SQLException { if (_driverBehavior != BEHAVE_ORACLE) return super.getClobString(rs, column); Clob clob = getClob(rs, column); if (clob == null) return null; if (clob.getClass().getName().equals("oracle.sql.CLOB")) { try { if (((Boolean) Class.forName("oracle.sql.CLOB"). getMethod("isEmptyLob", new Class[0]). invoke(clob, new Object[0])). booleanValue()) return null; } catch (Exception e) { // possibly different version of the driver } } if (clob.length() == 0) return null; // unlikely that we'll have strings over 4 billion chars return clob.getSubString(1, (int) clob.length()); }
@Override public String getClobString(ResultSet rs, int column) throws SQLException { if (_driverBehavior != BEHAVE_ORACLE) return super.getClobString(rs, column); Clob clob = getClob(rs, column); if (clob == null) return null; if (oracleClob_isEmptyLob_Method != null && clob.getClass().getName().equals("oracle.sql.CLOB")) { try { if (((Boolean) oracleClob_isEmptyLob_Method.invoke(clob, new Object[0])).booleanValue()) { return null; } } catch (Exception e) { // possibly different version of the driver } } if (clob.length() == 0) return null; // unlikely that we'll have strings over 4 billion chars return clob.getSubString(1, (int) clob.length()); }
@Override public String getClobString(ResultSet rs, int column) throws SQLException { if (_driverBehavior != BEHAVE_ORACLE) return super.getClobString(rs, column); Clob clob = getClob(rs, column); if (clob == null) return null; if (oracleClob_isEmptyLob_Method != null && clob.getClass().getName().equals("oracle.sql.CLOB")) { try { if (((Boolean) oracleClob_isEmptyLob_Method.invoke(clob, new Object[0])).booleanValue()) { return null; } } catch (Exception e) { // possibly different version of the driver } } if (clob.length() == 0) return null; // unlikely that we'll have strings over 4 billion chars return clob.getSubString(1, (int) clob.length()); }
@Override public String getClobString(ResultSet rs, int column) throws SQLException { if (_driverBehavior != BEHAVE_ORACLE) return super.getClobString(rs, column); Clob clob = getClob(rs, column); if (clob == null) return null; if (clob.getClass().getName().equals("oracle.sql.CLOB")) { try { if (((Boolean) Class.forName("oracle.sql.CLOB"). getMethod("isEmptyLob", new Class[0]). invoke(clob, new Object[0])). booleanValue()) return null; } catch (Exception e) { // possibly different version of the driver } } if (clob.length() == 0) return null; // unlikely that we'll have strings over 4 billion chars return clob.getSubString(1, (int) clob.length()); }
@Override public String getClobString(ResultSet rs, int column) throws SQLException { if (_driverBehavior != BEHAVE_ORACLE) return super.getClobString(rs, column); Clob clob = getClob(rs, column); if (clob == null) return null; if (clob.getClass().getName().equals("oracle.sql.CLOB")) { try { if (((Boolean) Class.forName("oracle.sql.CLOB"). getMethod("isEmptyLob", new Class[0]). invoke(clob, new Object[0])). booleanValue()) return null; } catch (Exception e) { // possibly different version of the driver } } if (clob.length() == 0) return null; // unlikely that we'll have strings over 4 billion chars return clob.getSubString(1, (int) clob.length()); }