Examples of RowId


Examples of com.vaadin.data.util.sqlcontainer.RowId

                    primaryKeyColumns.toArray(new String[0]));
            sh.setParameterValuesToStatement(pstmt);
            getLogger().log(Level.FINE, "DB -> {0}", sh.getQueryString());
            int result = pstmt.executeUpdate();
            genKeys = pstmt.getGeneratedKeys();
            RowId newId = getNewRowId(row, genKeys);
            bufferedEvents.add(new RowIdChangeEvent(row.getId(), newId));
            return result;
        } finally {
            releaseConnection(connection, pstmt, genKeys);
        }
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.RowId

            } else {
                for (String s : primaryKeyColumns) {
                    newRowId.add(values.get(s));
                }
            }
            return new RowId(newRowId.toArray());
        } catch (Exception e) {
            getLogger()
                    .log(Level.FINE,
                            "Failed to fetch key values on insert: {0}",
                            e.getMessage());
View Full Code Here

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

Examples of java.sql.RowId

    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

Examples of java.sql.RowId

    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

Examples of java.sql.RowId

     * @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

Examples of java.sql.RowId

        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

Examples of java.sql.RowId

    }

    @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

Examples of java.sql.RowId

    }

    @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

Examples of java.sql.RowId

  }

  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
TOP
Copyright © 2018 www.massapi.com. 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.