Package org.jitterbit.integration.database.info

Examples of org.jitterbit.integration.database.info.DatabaseTable


                     TargetId tgtId,
                     boolean bForTable,
                     boolean bForView) {
    DatabaseObject[] tables = new DatabaseObject[tableNames.length];
    for (int n = 0; n < tableNames.length; ++n) {
      tables[n] = new DatabaseTable(tableNames[n][1], tableNames[n][0]);
    }
    return createColumnInfo(tables, srcId, tgtId, bForTable, bForView);
  }
View Full Code Here


        new UpdateSourceDatabasePageUiTest().run();
    }

    public void run() {
        TableCreator factory = new TableCreator(TableCreator.POSTGRES_QUOTES, false);
        DatabaseTable table = factory.createOrdersTable();
        UpdateSourceDatabasePageUi ui = new UpdateSourceDatabasePageUi(table, new HashSet<DatabaseColumn>());
        QuickFrame.show(ui, getClass().getSimpleName());
    }
View Full Code Here

        this.quotes = (quotes != null ? quotes : BeginEndQuote.BLANK);
        this.includeSchema = includeSchema;
    }

    public DatabaseTable createOrdersTable() {
        DatabaseTable table = new DatabaseTable("Orders", "public");
        DatabaseColumn col = new DatabaseColumn(table, "OrderId", "int", 0, null, false, true);
        table.addColumn(col);
        table.addColumn(new DatabaseColumn(table, "CustomerId", "int", 0, null, false, false));
        table.addColumn(new DatabaseColumn(table, "OrderDate", "date", 0, null, false, false));
        table.addColumn(new DatabaseColumn(table, "ShippedDate", "date", 0, null, false, false));
        table.addColumn(new DatabaseColumn(table, "ShipVia", "int", 0, null, false, false));
        return checkSchema(table);
    }
View Full Code Here

        table.addColumn(new DatabaseColumn(table, "ShipVia", "int", 0, null, false, false));
        return checkSchema(table);
    }

    public DatabaseTable createOrderDetailsTable() {
        DatabaseTable table = new DatabaseTable(quotes.escapeNameIfNeeded("Order Details"), "public");
        DatabaseColumn col = new DatabaseColumn(table, "OrderId", "int", 0, null, false, true);
        table.addColumn(col);
        col = new DatabaseColumn(table, "ProductId", "int", 0, null, false, true);
        table.addColumn(col);
        table.addColumn(new DatabaseColumn(table, "UnitPrice", "money", 0, null, false, false));
        table.addColumn(new DatabaseColumn(table, "Quantity", "int", 0, null, false, false));
        return checkSchema(table);
    }
View Full Code Here

        table.addColumn(new DatabaseColumn(table, "Quantity", "int", 0, null, false, false));
        return checkSchema(table);
    }

    public DatabaseTable createProductsTable() {
        DatabaseTable table = new DatabaseTable(quotes.escapeNameIfNeeded("Products"), "public");
        table.addColumn(new DatabaseColumn(table, "ProductId", "int", 0, null, false, true));
        table.addColumn(new DatabaseColumn(table, "Name", "varchar", 0, null, false, false));
        table.addColumn(new DatabaseColumn(table, "Type", "varchar", 0, null, false, false));
        return checkSchema(table);
    }
View Full Code Here

        table.addColumn(new DatabaseColumn(table, "Type", "varchar", 0, null, false, false));
        return checkSchema(table);
    }

    public DatabaseTable createOrderLogTable() {
        DatabaseTable table = new DatabaseTable(quotes.escapeNameIfNeeded("Order.Log"), "public");
        DatabaseColumn col = new DatabaseColumn(table, "OrderId", "int", 0, null, false, true);
        table.addColumn(col);
        table.addColumn(new DatabaseColumn(table, quotes.escapeNameIfNeeded("Log.A"), "string", 0, null, false, false));
        table.addColumn(new DatabaseColumn(table, quotes.escapeNameIfNeeded("Log.B"), "string", 0, null, false, false));
        return checkSchema(table);
    }
View Full Code Here

        new SingleTableWhereClausePageUiTest().run();
    }

    public void run() {
        TableCreator factory = new TableCreator(TableCreator.POSTGRES_QUOTES, false);
        DatabaseTable table = factory.createOrdersTable();
        UiProvider ui = new SingleTableWhereClausePageUi(table);
        QuickFrame.show(ui, getClass().getName());
    }
View Full Code Here

    @Test
    public void ensureThatTableWithoutSchemaInformationDoesNotGiveMatch() {
        String tableName = "orders";
        String schema = null;
        DatabaseTable table = new DatabaseTable(tableName, schema);
        BeginEndQuote guessed = BeginEndQuoteGuesser.guess(table);
        assertNull(guessed);
    }
View Full Code Here

        ensureQuotesCanBeFiguredOutIfSchemaIsPresent(BeginEndQuote.ORACLE);
        ensureQuotesCanBeFiguredOutIfSchemaIsPresent(BeginEndQuote.SQL_SERVER);
    }

    private void ensureQuotesCanBeFiguredOutIfSchemaIsPresent(BeginEndQuote quotes) {
        DatabaseTable table = createTableWithSchemaInName(quotes);
        BeginEndQuote guessed = BeginEndQuoteGuesser.guess(table);
        assertEquals(quotes, guessed);
    }
View Full Code Here

    private DatabaseTable createTableWithSchemaInName(BeginEndQuote quotes) {
        String schema = "MDB";
        String tableName = "ORDERS";
        String qualifiedName = quotes.getQualifiedName(schema, tableName);
        return new DatabaseTable(qualifiedName, schema);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.database.info.DatabaseTable

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.