Examples of SchemaTool


Examples of org.apache.openjpa.jdbc.schema.SchemaTool

                String[] schemaActions = _schemaActions.split(",");
                for (int i = 0; i < schemaActions.length; i++) {
                    if (!SCHEMA_ACTION_NONE.equals(schemaActions[i])
                        && (_schemaWriter == null || (_schemaTool != null
                            && _schemaTool.getWriter() != null))) {
                        SchemaTool tool = newSchemaTool(schemaActions[i]);

                        // configure the tool with additional settings
                        if (flags != null) {
                            tool.setDropTables(flags.dropTables);
                            tool.setDropSequences(flags.dropSequences);
                            tool.setWriter(flags.sqlWriter);
                            tool.setOpenJPATables(flags.openjpaTables);
                        }

                        tool.setSchemaGroup(getSchemaGroup());
                        tool.run();
                        tool.record();
                    }
                }

                // xml output of schema?
                if (_schemaWriter != null) {
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
        if (log.isInfoEnabled())
            log.info(_loc.get("make-native-seq"));

        // create the sequence
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.createSequence(_seq);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
        if (log.isInfoEnabled())
            log.info(_loc.get("drop-native-seq"));

        // drop the table
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.dropSequence(_seq);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

          conf.setConnectionURL(props.getURL());
          conf.setConnectionUserName(props.getLogin());
          conf.setConnectionPassword(props.getPassword());
        //HACK to suppress all warnings
        getLogImpl(conf).setLevel(Log.INFO);
        SchemaTool st = new SchemaTool(conf, SchemaTool.ACTION_DROPDB);
        st.setIgnoreErrors(true);
        st.setOpenJPATables(true);
        st.setIndexes(false);
        st.setPrimaryKeys(false);
        st.run();
        } finally {
            conf.close();
        }
  }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        throws SQLException {
        if (_log.isInfoEnabled())
            _log.info(_loc.get("make-seq-table"));

        // create the table
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.createTable(_pkColumn.getTable());
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        throws SQLException {
        if (_log.isInfoEnabled())
            _log.info(_loc.get("drop-seq-table"));

        // drop the table
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.dropTable(_pkColumn.getTable());
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
        if (log.isInfoEnabled())
            log.info(_loc.get("make-native-seq"));

        // create the sequence
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.createSequence(_seq);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
        if (log.isInfoEnabled())
            log.info(_loc.get("drop-native-seq"));

        // drop the table
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.dropSequence(_seq);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
        if (log.isInfoEnabled())
            log.info(_loc.get("make-native-seq"));

        // create the sequence
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.createSequence(_seq);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.SchemaTool

        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
        if (log.isInfoEnabled())
            log.info(_loc.get("drop-native-seq"));

        // drop the table
        SchemaTool tool = new SchemaTool(_conf);
        tool.setIgnoreErrors(true);
        tool.dropSequence(_seq);
    }
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.