Java 8 SQLXML - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SQLXML class.

This code example shows how to use the following methods:setString
	@Override 
	public SqlXmlValue newSqlXmlValue(final String value) {
		return new AbstractJdbc4SqlXmlValue() { 
			@Override 
			protected void provideXml(SQLXML xmlObject) throws SQLException, IOException {
				xmlObject.setString(value);
			} 
		}; 
	} 
 
	@Override 
	public SqlXmlValue newSqlXmlValue(final XmlBinaryStreamProvider provider) {
		return new AbstractJdbc4SqlXmlValue() { 
			@Override 
			protected void provideXml(SQLXML xmlObject) throws SQLException, IOException {
				provider.provideXml(xmlObject.setBinaryStream());
			} 
		}; 
	} 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSource, getString
            tf.setOutputProperty(OutputKeys.STANDALONE, "yes");//$NON-NLS-1$
            tf.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
 
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            StreamResult xmlOut = new StreamResult(new BufferedOutputStream(out));
            tf.transform(xml.getSource(StreamSource.class), xmlOut);
 
            return out.toString();
        } catch (Exception e) {
            return xml.getString();
        } 
    } 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setSQLXML
		stat.setRowId(parameterIndex, x);
	} 
 
	@Override 
	public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
		stat.setSQLXML(parameterIndex, xmlObject);
	} 
 
	@Override 
	public void setShort(int parameterIndex, short x) throws SQLException {
		stat.setShort(parameterIndex, x);
	} 
 
	@Override 
	public void setString(int parameterIndex, String x) throws SQLException {
		stat.setString(parameterIndex, x);
	} 
 
	@Override 
	public void setTime(int parameterIndex, Time x) throws SQLException {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQLXML
		return stat.getRowId(parameterName);
	} 
 
	@Override 
	public SQLXML getSQLXML(int parameterIndex) throws SQLException {
		return stat.getSQLXML(parameterIndex);
	} 
 
	@Override 
	public SQLXML getSQLXML(String parameterName) throws SQLException {
		return stat.getSQLXML(parameterName);
	} 
 
	@Override 
	public short getShort(int parameterIndex) throws SQLException {
		return stat.getShort(parameterIndex);
	} 
 
	@Override 
	public short getShort(String parameterName) throws SQLException {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQLXML
    } 
 
    @Override 
    public Object getParameterValue(CallableStatement statement, int index) throws SQLException
    { 
        return statement.getSQLXML(index);
    } 
 
    @Override 
    public void setParameterValue(PreparedStatement statement, int index, Object value) throws SQLException
    { 
        try 
        { 
            if (value instanceof String)
            { 
                statement.setObject(index, createXmlType(statement.getConnection(), (String) value), OPAQUE_TYPE_ID);
                return; 
            } 
            if (value instanceof InputStream)
            { 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQLXML
        return delegate.getNClob(columnLabel);
    } 
 
    @Override 
    public SQLXML getSQLXML(int columnIndex) throws SQLException {
        return delegate.getSQLXML(columnIndex);
    } 
 
    @Override 
    public SQLXML getSQLXML(String columnLabel) throws SQLException {
        return delegate.getSQLXML(columnLabel);
    } 
 
    @Override 
    public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
        delegate.updateSQLXML(columnIndex, xmlObject);
    } 
 
    @Override 
    public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setSQLXML
  public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
    delegate.setNClob(parameterIndex, reader, length);
  } 
 
  public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
    delegate.setSQLXML(parameterIndex, xmlObject);
  } 
 
  public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)
      throws SQLException {
    delegate.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
  } 
 
  public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
    delegate.setAsciiStream(parameterIndex, x, length);
  } 
 
  public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
    delegate.setBinaryStream(parameterIndex, x, length);
  } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQLXML
    } 
 
    @Override 
    protected SQLXML doGetValue(CallableStatement callableStatement, int index)
            throws SQLException {
        return callableStatement.getSQLXML(index);
    } 
 
    @Override 
    protected String doConvertToLogFormat(SQLXML value) {
        return value.toString();
    } 
} 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQLXML
    } 
     
    public void testGetSQLXMLStringNotImplemented() 
        throws SQLException {
        try { 
            cStmt.getSQLXML("some-parameter-name");
            fail("CallableStatement.getSQLXML(String) " + 
                 "should not be implemented"); 
        } catch (SQLFeatureNotSupportedException sfnse) {
            // We are fine, do nothing. 
        } 
    } 
 
    public void testSetSQLXMLNotImplemented() 
        throws SQLException {
        try { 
            cStmt.setSQLXML("some-parameter-name", null);
            fail("CallableStatement.setSQLXML(String, SQLXML) " + 
                 "should not be implemented"); 
        } catch (SQLFeatureNotSupportedException sfnse) {
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSQLXML
   * {@inheritDoc} 
   */ 
  @Override 
  public SQLXML getSQLXML(int parameterIndex) throws SQLException {
    try { 
      return delegator.getSQLXML(parameterIndex);
    } 
    catch (SQLException se) {
      owner.fireStatementError(this, se);
      throw se;
    } 
  } 
 
  /** 
   * {@inheritDoc} 
   */ 
  @Override 
  public SQLXML getSQLXML(String parameterName) throws SQLException {
    try { 
      return delegator.getSQLXML(parameterName);
1
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 SQLXML Methods: