Package java.sql

Examples of java.sql.RowId


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


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

    RowId retValue = ((com.mysql.jdbc.JDBC4ResultSet) rs)
        .getRowId(fixParameterName(parameterName));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
View Full Code Here

    PreparedStatement pstmt = conn.prepareStatement("INSERT INTO texttable (te) VALUES (?)", new String[] {"ctid"});
    pstmt.setString(1, "some text");
    pstmt.executeUpdate();
    ResultSet keys = pstmt.getGeneratedKeys();
    assertTrue(keys.next());
    RowId rowId = keys.getRowId(1);
    keys.close();
    pstmt.close();

    pstmt = conn.prepareStatement("SELECT te FROM texttable WHERE ctid = ?");
    pstmt.setRowId(1, rowId);
View Full Code Here

     * @tests {@link javax.sql.rowset.serial.SQLInputImpl#readRowId()}
     *
     * @since 1.6
     */
    public void testReadRowId() throws SQLException {
        RowId rowId = new MockRowId();
        Object[] attributes = new Object[] { null, rowId };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        try {
            impl.readRowId();
View Full Code Here

        assertEquals(Integer.valueOf(54), ((Object[]) params[2])[2]);
    }

    public void testSetRowID() throws Exception {
        BaseRowSetImpl brs = new BaseRowSetImpl();
        RowId rowid = new RowId() {

            public byte[] getBytes() {
                return null;
            }
        };
View Full Code Here

    }

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

    }

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

  }

  public RowId getRowId(int parameterIndex) throws SQLException {
    ResultSetInternalMethods rs = getOutputParameters(parameterIndex);

    RowId retValue = ((com.mysql.jdbc.JDBC4ResultSet) rs)
        .getRowId(mapOutputParameterIndexToRsIndex(parameterIndex));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
View Full Code Here

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

    RowId retValue = ((com.mysql.jdbc.JDBC4ResultSet) rs)
        .getRowId(fixParameterName(parameterName));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
View Full Code Here

    }

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

TOP

Related Classes of java.sql.RowId

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.