Package java.sql

Examples of java.sql.NClob


          st.setAsciiStream(valueIndex, inputStream);
        } else if (value instanceof Reader) {
          Reader reader = (Reader) value;
          st.setCharacterStream(valueIndex, reader);
        } else if (value instanceof NClob) {
          NClob nclob = (NClob) value;
          st.setNClob(valueIndex, nclob);
        } else if (value instanceof Clob) {
          Clob clob = (Clob) value;
          st.setClob(valueIndex, clob);
        } else if (value instanceof String) {
View Full Code Here


  }

  @Override
  public NClob createNClob(String string) {
    try {
      final NClob nclob = createNClob();
      nclob.setString( 1, string );
      return nclob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to set NCLOB string after creation", e );
    }
View Full Code Here

          // otherwise we need to build a BinaryStream...
          return (X) new CharacterStreamImpl( DataHelper.extractString( value.getCharacterStream() ) );
        }
      }
      else if (NClob.class.isAssignableFrom( type )) {
        final NClob nclob =  WrappedNClob.class.isInstance( value )
            ? ( (WrappedNClob) value ).getWrappedNClob()
            : value;
        return (X) nclob;
      }
    }
View Full Code Here

  }

  @Override
  public NClob createNClob(String string) {
    try {
      NClob nclob = createNClob();
      nclob.setString( 1, string );
      return nclob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to set NCLOB string after creation", e );
    }
View Full Code Here

    return result;

  }

  public NClob createNClob() throws SQLException {
    NClob result = null;
    checkClosed();
    try {
      result = this.connection.createNClob();
    } catch (SQLException e) {
      throw markPossiblyBroken(e);
View Full Code Here

    public NClob resultSet_getNClob(ResultSetProxy resultSet, int columnIndex) throws SQLException {
        if (this.pos < filterSize) {
            return nextFilter().resultSet_getNClob(this, resultSet, columnIndex);
        }

        NClob nclob = resultSet.getResultSetRaw().getNClob(columnIndex);

        return wrap(resultSet.getStatementProxy().getConnectionProxy(), nclob);
    }
View Full Code Here

    public NClob resultSet_getNClob(ResultSetProxy resultSet, String columnLabel) throws SQLException {
        if (this.pos < filterSize) {
            return nextFilter().resultSet_getNClob(this, resultSet, columnLabel);
        }

        NClob nclob = resultSet.getResultSetRaw().getNClob(columnLabel);

        return wrap(resultSet.getStatementProxy().getConnectionProxy(), nclob);
    }
View Full Code Here

    public NClob callableStatement_getNClob(CallableStatementProxy statement, int parameterIndex) throws SQLException {
        if (this.pos < filterSize) {
            return nextFilter().callableStatement_getNClob(this, statement, parameterIndex);
        }

        NClob nclob = statement.getRawCallableStatement().getNClob(parameterIndex);

        return wrap(statement.getConnectionProxy(), nclob);
    }
View Full Code Here

    public NClob callableStatement_getNClob(CallableStatementProxy statement, String parameterName) throws SQLException {
        if (this.pos < filterSize) {
            return nextFilter().callableStatement_getNClob(this, statement, parameterName);
        }

        NClob nclob = statement.getRawCallableStatement().getNClob(parameterName);

        return wrap(statement.getConnectionProxy(), nclob);
    }
View Full Code Here

     * @throws SQLException upon any failure that occurs in the
     *         call to the method.
     */
    public void testSetNClob1() throws SQLException{
        try {
            NClob nclob = null;
            ps.setNClob(0,nclob);
            fail("setNClob should not be implemented");
        }
        catch(SQLFeatureNotSupportedException sqlfne) {
            //Do Nothing, This happens as expected
View Full Code Here

TOP

Related Classes of java.sql.NClob

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.