Package org.exolab.jms.tools.db

Examples of org.exolab.jms.tools.db.Table


    /**
     * Converts the message identifier columns from long to string
     */
    private void convertMessagesTable(Database schema)
        throws PersistenceException, SQLException {
        Table table = SchemaHelper.getTable(schema, MESSAGES_TABLE);

        // create a temporary table to perform conversion
        Table tmpTable = new Table();
        String tmpName = "openjms_tmp_" + MESSAGES_TABLE;
        tmpTable.setName(tmpName);
        tmpTable.setAttribute(table.getAttribute());

        _tool.drop(tmpTable);
        _tool.create(tmpTable);

        // convert the messages table, inserting converted records into
View Full Code Here


     * Converts the message identifier columns from long to string
     */
    private void convertHandlesTable(Database schema)
        throws PersistenceException, SQLException {

        Table table = SchemaHelper.getTable(schema, HANDLES_TABLE);

        // create a temporary table to perform conversion
        Table tmpTable = new Table();
        String tmpName = "openjms_tmp_" + HANDLES_TABLE;
        tmpTable.setName(tmpName);
        tmpTable.setAttribute(table.getAttribute());

        _tool.drop(tmpTable);
        _tool.create(tmpTable);

        // convert the messages_handles table, inserting converted records into
View Full Code Here

        }
    }

    private void createUsersTable(Database schema)
        throws PersistenceException {
        Table table = SchemaHelper.getTable(schema, USERS_TABLE);
        _tool.create(table);
    }
View Full Code Here

        throws PersistenceException {
        boolean result = false;
        SchemaBrowser browser = _tool.getSchemaBrowser();

        // get the expected type of the isQueue column
        Table table = SchemaHelper.getTable(schema, DESTINATIONS_TABLE);
        Attribute column = SchemaHelper.getAttribute(table, ISQUEUE_COLUMN);
        Type expected = browser.getType(column);

        // get the actual type of the isQueue column
        try {
            Table currentTable = browser.getTable(DESTINATIONS_TABLE);
            Attribute currentColumn =
                SchemaHelper.getAttribute(currentTable, ISQUEUE_COLUMN);
            Type currentType = browser.getType(currentColumn);
            result = (currentType.getType() != expected.getType());
        } catch (InvalidTypeException exception) {
View Full Code Here

        }
        return result;
    }

    private void doConvert(Database schema) throws PersistenceException {
        Table table = SchemaHelper.getTable(schema, DESTINATIONS_TABLE);

        // create a temporary table to perform conversion
        Table tmpTable = new Table();
        String tmpName = "openjms_tmp_" + DESTINATIONS_TABLE;
        tmpTable.setName(tmpName);
        tmpTable.setAttribute(table.getAttribute());

        _tool.drop(tmpTable);
        _tool.create(tmpTable);

        // convert the destinations table, inserting converted records into
View Full Code Here

TOP

Related Classes of org.exolab.jms.tools.db.Table

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.