Examples of BeginEndQuote


Examples of org.jitterbit.integration.database.BeginEndQuote

        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

Examples of org.jitterbit.integration.database.BeginEndQuote

    }
   
    @Test
    public void ensureCoincidentalSchemaMatchDoesNotGiveFalsePositive() {
        DatabaseTable table = createTableWithoutSchemaInName();
        BeginEndQuote guessed = BeginEndQuoteGuesser.guess(table);
        assertNull(guessed);
    }
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

        return new DatabaseTable(tableName, schema);
    }
   
    @Test
    public void ensureSearchThroughCollectionWorks() {
        BeginEndQuote quotes = BeginEndQuote.ORACLE;
        DatabaseObject[] tables = { createTableWithSchemaInName(quotes) };
        BeginEndQuote guessed = BeginEndQuoteGuesser.guess(tables);
        assertEquals(quotes, guessed);
        tables = new DatabaseObject[] { createTableWithoutSchemaInName() };
        guessed = BeginEndQuoteGuesser.guess(tables);
        assertEquals(BeginEndQuote.BLANK, guessed);
    }
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

        layout.south(InvisiblePanel.newPanel(new JButton(new ValidateAction())));
        QuickFrame.show(layout, getClass().getSimpleName());
    }

    private DatabaseObject[] createSelectedObjects() {
        TableCreator tableFactory = new TableCreator(new BeginEndQuote("\""), false);
        DatabaseObject[] tables = new DatabaseObject[] {
            tableFactory.createOrdersTable(),
            tableFactory.createOrderDetailsTable(),
            tableFactory.createOrderLogTable(),
            tableFactory.createProductsTable(),
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

        fileName.set(suggestedName);
    }

    private String getSuggestedXsdName(DatabaseStructure dbStruct) {
        String dbName = dbStruct.getDbLocation().getDatabase();
        BeginEndQuote quotes = dbStruct.getBeginEndQuote();
        DatabaseStructureTree tree = new DatabaseStructureTree(dbStruct);
        Node root = tree.getRoot();
        DatabaseObject table = root.getTable();
        XsdNameGenerator nameGenerator = new XsdNameGenerator(dbName, quotes);
        return nameGenerator.getXsdName(table);
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

    private DatabaseTable productsTab;
   
    @Before
    public void setup() {
        rels = new Relations();
        TableCreator factory = new TableCreator(new BeginEndQuote("\""), false);
        ordersTab = factory.createOrdersTable();
        orderDetailsTab = factory.createOrderDetailsTable();
        orderLogTab = factory.createOrderLogTable();
        productsTab = factory.createProductsTable();
    }
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

    }
   
    boolean isValidTransform(String input) {
        // XXX: As convertDbTablesField, this implementation will not work in the general case.
        // It works for the particular customer that requested this feature.
        BeginEndQuote oldQuotes = transform.getOldQuotes();
        String[] tables = input.split(DbTables.TABLE_SEPARATOR);
        for (String table : tables) {
            int indexOfSchemaSeparator = table.indexOf('.');
            if (indexOfSchemaSeparator == -1) {
                if (oldQuotes.equals(BeginEndQuote.ORACLE)) {
                    // The transform assumes we are transforming FROM oracle, but the table
                    // does not include the schema name --> we are in fact not transforming from oracle.
                    return false;
                }
            } else {
                // The schema name is included --> the table will be in the form of
                // *schema*.*table*, where * stands for begin/end quote. Make sure the
                // inputted begin/end quote match what the transform says.
                BeginEndQuote actualBeginEndQuote = deriveBeginEndQuoteFromTableString(table);
                if (!oldQuotes.equals(actualBeginEndQuote)) {
                    return false;
                }
            }
        }
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

    private DatabaseTable productsTab;

    @Before
    public void setup() {
        rels = new Relations();
        TableCreator factory = new TableCreator(new BeginEndQuote("\""), false);
        ordersTab = factory.createOrdersTable();
        orderDetailsTab = factory.createOrderDetailsTable();
        orderLogTab = factory.createOrderLogTable();
        productsTab = factory.createProductsTable();
    }
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

        return KongaXmlUtils.getFirstElementChildOfName(entry, "konga.string");
    }
   
    String convertSelectQuery(String input) {
        String tableName = getTableNameFromInput(input);
        BeginEndQuote quotes = transform.getNewQuotes();
        String output = quotes.escapeName(tableName);
        String newSchema = transform.getNewSchemaName();
        if (StringUtils.isNotEmpty(newSchema)) {
            output = quotes.escapeName(newSchema) + "." + output;
        }
        output = transform.convertCase(output);
        return SELECT + output;
    }
View Full Code Here

Examples of org.jitterbit.integration.database.BeginEndQuote

        // name is either:
        // [table] (I)
        // or
        // [schema].[table] (II)
        // where [ and ] are the begin and end quotes.
        BeginEndQuote quotes = transform.getOldQuotes();
        String firstPart = quotes.begin + StringUtils.substringBetween(name, quotes.begin, quotes.end) + quotes.end;
        if (name.equals(firstPart)) {
            // Case I
            return quotes.unescapeName(firstPart);
        } else {
            // Case II
            String secondPart = StringUtils.substringAfter(name, firstPart);
            secondPart = StringUtils.removeStart(secondPart, ".");
            return quotes.unescapeName(secondPart);
        }
    }
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.