Examples of TableQuery


Examples of com.google.gdata.client.spreadsheet.TableQuery

   * @throws IOException when an error occurs in communication with the Google
   *         Spreadsheets service.
   */
  public void search(String titleSearchString) throws IOException,
      ServiceException {
    TableQuery query = new TableQuery(tablesFeedUrl);
   
    query.setTitleQuery(titleSearchString);
    TableFeed feed = service.query(query, TableFeed.class);

    out.println("Results for [" + titleSearchString + "]");

    for (TableEntry entry : feed.getEntries()) {
View Full Code Here

Examples of com.vaadin.addon.sqlcontainer.query.TableQuery

     * @return true if the identifier is valid
     */
    private boolean isColumnIdentifierValid(String identifier) {
        if (identifier.equalsIgnoreCase("rownum")
                && delegate instanceof TableQuery) {
            TableQuery tq = (TableQuery) delegate;
            if (tq.getSqlGenerator() instanceof MSSQLGenerator
                    || tq.getSqlGenerator() instanceof OracleGenerator) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

     * @return true if the identifier is valid
     */
    private boolean isColumnIdentifierValid(String identifier) {
        if (identifier.equalsIgnoreCase("rownum")
                && queryDelegate instanceof TableQuery) {
            TableQuery tq = (TableQuery) queryDelegate;
            if (tq.getSqlGenerator() instanceof MSSQLGenerator
                    || tq.getSqlGenerator() instanceof OracleGenerator) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

            SimpleJDBCConnectionPool connectionPool = new SimpleJDBCConnectionPool(
                    "org.hsqldb.jdbc.JDBCDriver",
                    "jdbc:hsqldb:mem:sqlcontainer", "SA", "", 2, 20);
            generateTestData(connectionPool);

            TableQuery query = new TableQuery("people", connectionPool,
                    new DefaultSQLGenerator());

            SQLContainer container = new LimitedSQLContainer(query);

            final VerticalLayout rootLayout = new VerticalLayout();
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

        }
    }

    private void initContainers() {
        try {
            TableQuery q1 = new TableQuery(TABLENAME, connectionPool);
            q1.setVersionColumn("id");
            testContainer = new SQLContainer(q1);

            TableQuery q2 = new TableQuery(LARGE_TABLENAME, connectionPool);
            q2.setVersionColumn("id");
            largeContainer = new SQLContainer(q2);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

                    "jdbc:hsqldb:mem:sqlcontainer", "SA", "", 2, 20);

            createTestTable(connectionPool);
            insertTestData(connectionPool);

            TableQuery q = new TableQuery("MYTABLE2", connectionPool);
            q.setVersionColumn("VERSION");
            SQLContainer myContainer = new SQLContainer(q);
            // Uncommenting these works around the issue
            // myContainer.addOrderBy(new OrderBy("PFX", true));
            // myContainer.addOrderBy(new OrderBy("NUMERO", true));
            myContainer.removeAllContainerFilters();
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

            JDBCConnectionPool pool = getConnectionPool();
            if (pool != null) {
                try {
                    int cents = 100;
                    for (int cent = 0; cent < cents; cent++) {
                        TableQuery q = new TableQuery("AUTHOR", pool);
                        q.setVersionColumn("ID");
                        SQLContainer c = new SQLContainer(q);
                        for (int i = 0; i < 100; i++) {
                            Object id = c.addItem();
                            c.getContainerProperty(id, "FIRST_NAMES").setValue(
                                    getRandonName());
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

        if (SQLTestsConstants.sqlGen instanceof MSSQLGenerator
                || SQLTestsConstants.sqlGen instanceof OracleGenerator) {
            return;
        }
        SQLGenerator sg = SQLTestsConstants.sqlGen;
        TableQuery query = new TableQuery("people", connectionPool,
                SQLTestsConstants.sqlGen);
        SQLContainer container = new SQLContainer(query);

        StatementHelper sh = sg.generateDeleteQuery(
                "people",
                query.getPrimaryKeyColumns(),
                null,
                (RowItem) container.getItem(container.getItemIds().iterator()
                        .next()));
        Assert.assertEquals("DELETE FROM people WHERE \"ID\" = ?",
                sh.getQueryString());
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

        if (SQLTestsConstants.sqlGen instanceof MSSQLGenerator
                || SQLTestsConstants.sqlGen instanceof OracleGenerator) {
            return;
        }
        SQLGenerator sg = new DefaultSQLGenerator();
        TableQuery query = new TableQuery("people", connectionPool);
        SQLContainer container = new SQLContainer(query);

        RowItem ri = (RowItem) container.getItem(container.getItemIds()
                .iterator().next());
        ri.getItemProperty("NAME").setValue("Viljami");
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.query.TableQuery

        if (SQLTestsConstants.sqlGen instanceof MSSQLGenerator
                || SQLTestsConstants.sqlGen instanceof OracleGenerator) {
            return;
        }
        SQLGenerator sg = new DefaultSQLGenerator();
        TableQuery query = new TableQuery("people", connectionPool);
        SQLContainer container = new SQLContainer(query);

        RowItem ri = (RowItem) container.getItem(container.addItem());
        ri.getItemProperty("NAME").setValue("Viljami");
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.