Examples of firstItemId()


Examples of com.vaadin.data.Container.Indexed.firstItemId()

        Date minDate = null;
        for (TimelineDatasourceProperties ds : datasources) {
            Indexed cont = ds.getDatasource();
            Object timestampPropertyId = getGraphTimestampPropertyId(cont);
            if (timestampPropertyId != null && cont.size() > 0) {
                Item item = cont.getItem(cont.firstItemId());
                if (item != null
                        && item.getItemPropertyIds().contains(
                                timestampPropertyId)) {
                    Property<?> property = item
                            .getItemProperty(timestampPropertyId);
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        TableQuery tQuery = new TableQuery("versioned", connectionPool,
                SQLTestsConstants.sqlGen);
        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        row.getItemProperty("TEXT").setValue("asdf");
        container.commit();
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        TableQuery tQuery = new TableQuery("versioned", connectionPool,
                SQLTestsConstants.sqlGen);
        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        row.getItemProperty("TEXT").setValue("asdf");

        // Update the version using another connection.
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        TableQuery tQuery = new TableQuery("versioned", connectionPool,
                SQLTestsConstants.sqlGen);
        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        container.removeItem(container.firstItemId());
        container.commit();
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        container.removeItem(container.firstItemId());
        container.commit();

        Connection conn = connectionPool.reserveConnection();
        PreparedStatement stmt = conn
                .prepareStatement("SELECT * FROM VERSIONED WHERE \"TEXT\" = ?");
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        TableQuery tQuery = new TableQuery("versioned", connectionPool,
                SQLTestsConstants.sqlGen);
        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        // Update the version using another connection.
        Connection conn = connectionPool.reserveConnection();
        PreparedStatement stmt = conn
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        stmt.executeUpdate();
        stmt.close();
        conn.commit();
        connectionPool.releaseConnection(conn);

        container.removeItem(container.firstItemId());
        container.commit();
    }

    @Test
    public void removeRow_throwsOptimisticLockException_shouldStillWork()
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        TableQuery tQuery = new TableQuery("versioned", connectionPool,
                SQLTestsConstants.sqlGen);
        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        // Update the version using another connection.
        Connection conn = connectionPool.reserveConnection();
        PreparedStatement stmt = conn
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.firstItemId()

        stmt.executeUpdate();
        stmt.close();
        conn.commit();
        connectionPool.releaseConnection(conn);

        Object itemToRemove = container.firstItemId();
        try {
            container.removeItem(itemToRemove);
            container.commit();
        } catch (OptimisticLockException e) {
            // This is expected, refresh and try again.
View Full Code Here

Examples of com.vaadin.ui.Table.firstItemId()

                                for (int i = 4; i < 30; i++) {
                                    v4 = new ValueHolder<String>("test" + i);
                                    bic.addBean(v4);

                                }
                                t.select(t.firstItemId());
                                t.focus();
                            }
                        }));
    }
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.