Package org.jitterbit.integration.database

Examples of org.jitterbit.integration.database.BeginEndQuote


    public static boolean isSchemaNameIncluded(DatabaseStructure struct) {
        if (struct.getIncludeSchemaName()) {
            return true;
        }
        BeginEndQuote quotes = struct.getBeginEndQuote();
        for (DatabaseObject o : struct.getDatabaseObjects()) {
            String name = o.getName();
            if (o.getSchema() != null && o.getSchema().length() > 0) {
                String schemaPart = quotes.escapeName(o.getSchema()) + ".";
                if (name.length() > schemaPart.length() && name.startsWith(schemaPart)) {
                    return true;
                }
            }
        }
View Full Code Here


        try {
            LOG.info("Entering JdbcInfoProvider.getTableInfo()");
            eas = ExternalApiSupport.forCall(user, password);
            DefaultConnectionFactory connectionFactory = createConnectionFactory(
                            eas, driverName, wsConnParams, sourceGuid, targetGuid);
            BeginEndQuote quotes = convertWsBeginEndQuote(wsQuotes);
            DatabaseColumnRetriever worker = createColumnRetriever(connectionFactory, quotes);
            DatabaseObject[] tables = convertIncomingTableInfo(wsTables);
            worker.populateColumns(tables);
            logTableInfo(tables, quotes);
            return convertDatabaseObjects(tables);
View Full Code Here

        return new WsJdbcBeginEndQuote(q.begin, q.end);
    }

    private static BeginEndQuote convertWsBeginEndQuote(WsJdbcBeginEndQuote q) {
        if (q != null) {
            return new BeginEndQuote(q.getBeginQuote(), q.getEndQuote());
        }
        return null;
    }
View Full Code Here

        try {
            JdbcDriverDescriptor pgsql = new JdbcDriverDescriptor("PostgreSQL", "postgresql", "org.postgresql.Driver",
                            BeginEndQuote.POSTGRES);
            JdbcDriverDescriptor mysql = new JdbcDriverDescriptor("MySQL", "mysql", "com.mysql.jdbc.Driver",
                            BeginEndQuote.BLANK);
            BeginEndQuote pgsqlQuotes = BeginEndQuote.fromStrings("|", "|");
            Xml xml = new Xml();
            xml.addDriver(pgsql, pgsqlQuotes);
            xml.addDriver(mysql, null);
            JdbcDriversConfig config = JdbcDriversConfig.fromXml(xml.toXml());
            Map<String, JdbcDriverDescriptor> expectedDrivers = Maps.newHashMap();
View Full Code Here

            this.metaData = getConnection().getMetaData();
            schema = getSchema(o);
            // XXX: Due to how information is stored on the client side, o.getName() may
            // be qualified with the schema name. We must therefore extract the simple name
            // before we ask the database for column info.
            BeginEndQuote quotes = getBeginEndQuote(metaData);
            tableName = quotes.getSimpleName(o);
            columnData = Maps.newLinkedHashMap(); // preserve order as returned by DB
        }
View Full Code Here

        private BeginEndQuote getBeginEndQuote(DatabaseMetaData metaData) throws SQLException {
            if (beginEndQuote != null) {
                return beginEndQuote;
            }
            String quote = metaData.getIdentifierQuoteString();
            return new BeginEndQuote(quote, quote);
        }
View Full Code Here

            throw new IllegalStateException("No connection");
        }
        try {
            DatabaseMetaData metaData = conn.getMetaData();
            List<DatabaseObject> objs = collectTables(metaData);
            BeginEndQuote quotes = getBeginEndQuotes(metaData);
            return new DatabaseInfo(objs, quotes);
        } finally {
            KongaDbUtils.close(conn);
        }
    }
View Full Code Here

        return null;
    }

    private BeginEndQuote getBeginEndQuotes(DatabaseMetaData metaData) throws SQLException {
        String quote = metaData.getIdentifierQuoteString();
        return new BeginEndQuote(quote, quote);
    }
View Full Code Here

public final class BeginEndQuoteRetriever {

    public static BeginEndQuote getBeginEndQuote(Connection conn) throws SQLException {
        DatabaseMetaData metaData = conn.getMetaData();
        String quote = metaData.getIdentifierQuoteString();
        return new BeginEndQuote(quote);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.database.BeginEndQuote

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.