Package java.sql

Examples of java.sql.SQLXML


    return (sourceClass != null ? xmlObject.getSource(sourceClass) : xmlObject.getSource(DOMSource.class));
  }

  @Override
  public Source getXmlAsSource(ResultSet rs, int columnIndex, Class<? extends Source> sourceClass) throws SQLException {
    SQLXML xmlObject = rs.getSQLXML(columnIndex);
    return (sourceClass != null ? xmlObject.getSource(sourceClass) : xmlObject.getSource(DOMSource.class));
  }
View Full Code Here


            String column = metaData.getColumnLabel(i);
            Object value = resultSet.getObject(i);

            if (value instanceof SQLXML)
            {
                SQLXML sqlxml = (SQLXML) value;

                result.put(column, sqlxml.getString());
            }
            else
            {
                result.put(column, value);
            }
View Full Code Here

    }

    @Override
    public SQLXML getSQLXML(int columnIndex) throws SQLException {
        FilterChainImpl chain = createChain();
        SQLXML value = chain.resultSet_getSQLXML(this, columnIndex);
        recycleFilterChain(chain);
        return value;
    }
View Full Code Here

    }

    @Override
    public SQLXML getSQLXML(String columnLabel) throws SQLException {
        FilterChainImpl chain = createChain();
        SQLXML value = chain.resultSet_getSQLXML(this, columnLabel);
        recycleFilterChain(chain);
        return value;
    }
View Full Code Here

                if (columnTypes[col - 1] == Types.CLOB) {
                    sb.append(anObj != null ? anObj : "null"); //$NON-NLS-1$
                } else if (columnTypes[col - 1] == Types.BLOB) {
                    sb.append(anObj != null ? "BLOB" : "null"); //$NON-NLS-1$ //$NON-NLS-2$
                } else if (columnTypes[col - 1] == Types.SQLXML) {
                    final SQLXML xml = (SQLXML)anObj;
                    sb.append(anObj != null ? prettyPrint(xml) : "null"); //$NON-NLS-1$
                } else {
                    sb.append(anObj != null ? anObj : "null"); //$NON-NLS-1$
                }
                if (col != columnCount) {
View Full Code Here

//#ifdef JAVA6
    public SQLXML getSQLXML(int columnIndex) throws SQLException {

        checkColumn(columnIndex);

        SQLXML sqlxml;
        int    type = resultMetaData.columnTypes[columnIndex - 1].typeCode;

        switch (type) {

            case Types.SQL_XML : {
View Full Code Here

  }

  public SQLXML getSQLXML(int parameterIndex) throws SQLException {
    ResultSetInternalMethods rs = getOutputParameters(parameterIndex);

    SQLXML retValue = ((com.mysql.jdbc.JDBC4ResultSet) rs)
        .getSQLXML(mapOutputParameterIndexToRsIndex(parameterIndex));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
View Full Code Here

    ResultSetInternalMethods rs = getOutputParameters(0); // definitely
                                // not going to
                                // be
    // from ?=

    SQLXML retValue = ((com.mysql.jdbc.JDBC4ResultSet) rs)
        .getSQLXML(fixParameterName(parameterName));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
View Full Code Here

    }

    @Override
    public SQLXML createSQLXML() throws SQLException {
        FilterChainImpl chain = createChain();
        SQLXML value = chain.connection_createSQLXML(this);
        recycleFilterChain(chain);
        return value;
    }
View Full Code Here

    }

    protected IRubyObject xmlToRuby(final ThreadContext context,
        final Ruby runtime, final ResultSet resultSet, final int column)
        throws SQLException {
        final SQLXML xml = resultSet.getSQLXML(column);
        try {
            return RubyString.newUnicodeString(runtime, xml.getString());
        }
        finally { xml.free(); }
    }
View Full Code Here

TOP

Related Classes of java.sql.SQLXML

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.