Package org.apache.openjpa.jdbc.conf

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


        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 ClassTableJDBCSeq.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret) {
            // START - ALLOW PRINT STATEMENTS
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) {
            // START - ALLOW PRINT STATEMENTS
View Full Code Here

    }
    /**
     * Tests that application identity classes are returned correctly.
     */
    public void testSchemaGeneration() {
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        DBDictionary dict = conf.getDBDictionaryInstance();
        MappingRepository repos = conf.getMappingRepositoryInstance();
        repos.setStrategyInstaller(new RefreshStrategyInstaller(repos));
        ClassMapping mapping = repos.getMapping(Column.class, null, true);

        Class cls;
        if (dict.getPreferredType(JavaSQLTypes.CLOB) ==  JavaSQLTypes.CLOB) {
View Full Code Here

        final String[] args = getFilePaths(files);

        boolean ok = Configurations.runAgainstAllAnchors(opts,
                new Configurations.Runnable() {
                    public boolean run(Options opts) throws IOException, SQLException {
                        JDBCConfiguration conf = new JDBCConfigurationImpl();
                        try {
                            return MappingTool.run(conf, args, opts);
                        } finally {
                            conf.close();
                        }
                    }
                }
        );
View Full Code Here

     *
     * @param files List with classPath Files; non persistence classes will be removed
     * @param opts  filled configuration Options
     */
    private void filterPersistenceCapable(List<File> files, Options opts) {
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        Configurations.populateConfiguration(conf, opts);
        MetaDataRepository repo = conf.newMetaDataRepositoryInstance();
        ClassArgParser cap = repo.getMetaDataFactory().newClassArgParser();

        Iterator<File> fileIt = files.iterator();
        while (fileIt.hasNext()) {
            File classPath = fileIt.next();
View Full Code Here

            _set = set;
        }

        public void run() {
            try {
                JDBCConfiguration conf = new JDBCConfigurationImpl();
                TableJDBCSeq seq = new TableJDBCSeq();
                seq.setConfiguration(conf);
                seq.startConfiguration();
                seq.endConfiguration();
                DataSource ds = conf.getDataSource2(null);
                for (int i = 0; i < 51; i++)
                    _set.add(seq.next(_broker,
                        conf.getMetaDataRepositoryInstance().
                        getMetaData(RuntimeTest1.class, null, true)));
            } catch (Exception e) {
                throw new RuntimeException(e.getMessage());
            }
        }
View Full Code Here

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

        super(test);
    }

    public void setUp()
        throws Exception {
        JDBCConfiguration conf = new JDBCConfigurationImpl();
        conf.setSchemaFactory(DynamicSchemaFactory.class.getName());
        MappingRepository repos = conf.newMappingRepositoryInstance();
        _mapping = repos.getMapping(MappingTest1.class, null, true);
    }
View Full Code Here

        access, db2, derby, empress, foxpro, h2, hsql, informix, ingres, jdatastore, mariadb, 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

        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

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.