Package org.apache.openjpa.jdbc.conf

Examples of org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl


    public void setMeta(boolean meta) {
        flags.meta = meta;
    }

    protected ConfigurationImpl newConfiguration() {
        return new JDBCConfigurationImpl();
    }
View Full Code Here


    public void setFile(String file) {
        this.file = file;
    }

    protected ConfigurationImpl newConfiguration() {
        return new JDBCConfigurationImpl();
    }
View Full Code Here

        Options opts = new Options();
        final String[] arguments = opts.setFromCmdLine(args);
        boolean ret = Configurations.runAgainstAllAnchors(opts,
            new Configurations.Runnable() {
            public boolean run(Options opts) throws Exception {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                try {
                    return ValueTableJDBCSeq.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("clstable-seq-usage"));
View Full Code Here

  private static LogImpl getLogImpl(JDBCConfiguration conf) {
    return (LogImpl)conf.getLog(JDBCConfiguration.LOG_SCHEMA);
  }

  private static void immediateDropDB(ConnectionProperties props) throws Exception {
      JDBCConfigurationImpl conf = new JDBCConfigurationImpl();
        try {
          conf.setPropertiesFile(new File(OmFileHelper.getWebinfDir(), PERSISTENCE_NAME));
          conf.setConnectionDriverName(props.getDriver());
          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

        Options opts = new Options();
        final String[] arguments = opts.setFromCmdLine(args);
        boolean ret = Configurations.runAgainstAllAnchors(opts,
            new Configurations.Runnable() {
            public boolean run(Options opts) throws Exception {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                try {
                    return TableJDBCSeq.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("seq-usage"));
View Full Code Here

        Options opts = new Options();
        final String[] arguments = opts.setFromCmdLine(args);
        boolean ret = Configurations.runAgainstAllAnchors(opts,
            new Configurations.Runnable() {
            public boolean run(Options opts) throws Exception {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                try {
                    return SchemaTool.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("tool-usage"));
View Full Code Here

        Options opts = new Options();
        final String[] arguments = opts.setFromCmdLine(args);
        boolean ret = Configurations.runAgainstAllAnchors(opts,
            new Configurations.Runnable() {
            public boolean run(Options opts) throws Exception {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                try {
                    return NativeJDBCSeq.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("native-seq-usage"));
View Full Code Here

        access, db2, derby, empress, foxpro, h2, hsql, informix, ingres, jdatastore, mysql, oracle, pointbase, postgres,
        sqlserver, sybase
    };

    protected DBType getDBType(EntityManager em) {
        JDBCConfigurationImpl conf = (JDBCConfigurationImpl) getConfiguration(em);
        String dictClassName = getConfiguration(em).getDBDictionaryInstance().getClass().getName();
        String db = conf.dbdictionaryPlugin.alias(dictClassName);
        return DBType.valueOf(db);
    }
View Full Code Here

        super(test);
    }
   
    public void setUp()
    throws Exception {
        this.conf = new JDBCConfigurationImpl();
        _group = getSchemaGroup();
    }
View Full Code Here

     */
    public static void main(String[] args)
        throws Exception {
        Options opts = new Options();
        args = opts.setFromCmdLine(args);
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        try {
            if (!run(conf, args, opts))
                System.out.println(_loc.get("native-seq-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl

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.