//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public long position(Clob pattern, long start) throws SQLException public virtual long position(Clob pattern, long start) { if (start <= 0) { throw new SQLException("Bad start: " + start); } string patternString = pattern.getSubString(0, (int)(pattern.length() & 0x7FFFFFFF)); return(position(patternString, start)); }
public override bool Equals(object obj) { if (!(obj is Clob)) { return(false); } Clob other = (Clob)obj; return(StringUtils.Equals(value, other.value)); }
private void setArrayValue(ExprArray paramExprArray, object paramObject, int paramInt1, int paramInt2) { if (paramObject == null) { paramExprArray.set(paramInt1, paramInt2, new ExprString("")); } else if (paramObject is decimal) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(((decimal)paramObject).doubleValue())); } else if (paramObject is BigInteger) { paramExprArray.set(paramInt1, paramInt2, new ExprInteger(((BigInteger)paramObject).intValue())); } else if (paramObject is string) { paramExprArray.set(paramInt1, paramInt2, new ExprString(paramObject.ToString())); } else if (paramObject is bool?) { paramExprArray.set(paramInt1, paramInt2, new ExprBoolean(((bool?)paramObject).Value)); } else if (paramObject is long?) { paramExprArray.set(paramInt1, paramInt2, new ExprInteger(((long?)paramObject).Value)); } else if (paramObject is int?) { paramExprArray.set(paramInt1, paramInt2, new ExprInteger(((int?)paramObject).Value)); } else if (paramObject is Number) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(((Number)paramObject).doubleValue())); } else if (paramObject is Date) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(ExcelDate.toExcelDate(((Date)paramObject).Time))); } else if (paramObject is Number) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(((Number)paramObject).doubleValue())); } else if (paramObject is Clob) { Clob clob = (Clob)paramObject; paramExprArray.set(paramInt1, paramInt2, new ExprString(StringUtils.clobToString((Clob)paramObject))); } else { paramExprArray.set(paramInt1, paramInt2, new ExprString(paramObject.ToString())); } }
protected override Value getClobValue(Env env, ResultSet rs, ResultSetMetaData metaData, int column) { Clob clob = rs.getClob(column); OracleOciLob ociLob = new OracleOciLob(_conn, OracleModule.OCI_D_LOB); ociLob.setLob(clob); return(env.wrapJava(ociLob)); }
private string castToString(object paramObject) { if (paramObject is Clob) { Clob clob = (Clob)paramObject; try { return(clob.getSubString(1L, (int)clob.length())); } catch (SQLException sQLException) { Console.WriteLine(sQLException.ToString()); Console.Write(sQLException.StackTrace); } } return((paramObject == null) ? "" : paramObject.ToString()); }
private string clobToString(Clob paramClob) { StringBuilder stringBuilder = new StringBuilder(); try { using (StreamReader null = new StreamReader(paramClob.CharacterStream)) { while (null != (str = bufferedReader.readLine())) { stringBuilder.Append(str); } } } catch (Exception iOException) when(iOException is IOException || iOException is SQLException) { iOException.printStackTrace(); } return(stringBuilder.ToString()); }
public override bool Equals(Clob clob) { if (clob == null) { return(false); } if (clob == this) { return(true); } var ec = clob as ExternalClob; if (ec == null || !Connection.Equals(ec.Connection) || _identifier.Length != ec._identifier.Length || !_encoding.Equals(ec._encoding) || (_compression != ec._compression && _compression != null && !_compression.Equals(ec._compression))) { return(false); } byte[] a = _identifier, b = ec._identifier; return(!a.Where((t, i) => t != b[i]).Any()); }
/// <summary> /// Not implemented. /// /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void setClob(int parameterIndex, Clob x) throws SQLException public virtual void setClob(int parameterIndex, Clob x) { throw new NotImplementedException(); }
/// <param name="parm"> </param> /// <param name="arg1"> </param> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void setClob(String parm, java.sql.Clob arg1) throws java.sql.SQLException public virtual void setClob(string parm, Clob arg1) { throw new NotImplementedException(); }
private void setArrayValue(ExprArray paramExprArray, object paramObject, int paramInt1, int paramInt2) { if (paramObject == null) { paramExprArray.set(paramInt1, paramInt2, new ExprString("-")); } else if (paramObject is HqlResultValue) { HqlResultValue hqlResultValue = (HqlResultValue)paramObject; if (!string.ReferenceEquals(hqlResultValue.StringValue, null)) { paramExprArray.set(paramInt1, paramInt2, new ExprString(hqlResultValue.StringValue)); } else if (hqlResultValue.DecimalValue != null) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(hqlResultValue.DecimalValue.doubleValue())); } else if (hqlResultValue.LongValue != null) { paramExprArray.set(paramInt1, paramInt2, new ExprInteger(hqlResultValue.LongValue.Value)); } else if (hqlResultValue.BooleanValue != null) { paramExprArray.set(paramInt1, paramInt2, new ExprBoolean(hqlResultValue.BooleanValue.Value)); } else if (hqlResultValue.DateValue != null) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(ExcelDate.toExcelDate(hqlResultValue.DateValue.Ticks))); } } else if (paramObject is decimal) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(((decimal)paramObject).doubleValue())); } else if (paramObject is string) { paramExprArray.set(paramInt1, paramInt2, new ExprString(paramObject.ToString())); } else if (paramObject is bool?) { paramExprArray.set(paramInt1, paramInt2, new ExprBoolean(((bool?)paramObject).Value)); } else if (paramObject is long?) { paramExprArray.set(paramInt1, paramInt2, new ExprInteger(((long?)paramObject).Value)); } else if (paramObject is int?) { paramExprArray.set(paramInt1, paramInt2, new ExprInteger(((int?)paramObject).Value)); } else if (paramObject is double?) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(((double?)paramObject).Value)); } else if (paramObject is Number) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(((Number)paramObject).doubleValue())); } else if (paramObject is Date) { paramExprArray.set(paramInt1, paramInt2, new ExprDouble(ExcelDate.toExcelDate(((Date)paramObject).Time))); } else if (paramObject is Clob) { Clob clob = (Clob)paramObject; paramExprArray.set(paramInt1, paramInt2, new ExprString(StringUtils.clobToString((Clob)paramObject))); } else { paramExprArray.set(paramInt1, paramInt2, new ExprString(paramObject.ToString())); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public ValueClob(Object val) throws java.sql.SQLException public ValueClob(object val) { clob = (Clob)(val); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public ValueClob(java.sql.Clob val) throws java.sql.SQLException public ValueClob(java.sql.Clob val) { clob = new Clob(val); }