Package org.apache.openjpa.jdbc.conf

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


                JDBCFetchPlanImpl.class);
        }
        if (!(c instanceof JDBCConfigurationImpl))
            return false;

        JDBCConfigurationImpl conf = (JDBCConfigurationImpl) c;
        Specification jpa = PersistenceProductDerivation.SPEC_JPA;
        Specification ejb = PersistenceProductDerivation.ALIAS_EJB;

        conf.metaFactoryPlugin.setAlias(ejb.getName(),
            PersistenceMappingFactory.class.getName());
View Full Code Here


    @Override
    public boolean afterSpecificationSet(Configuration c) {
        if (!(c instanceof JDBCConfigurationImpl))
            return false;
        JDBCConfigurationImpl conf = (JDBCConfigurationImpl) c;
        Specification jpa = PersistenceProductDerivation.SPEC_JPA;
        if (!jpa.getName().equals(conf.getSpecificationInstance().getName()))
            return false;
       
        conf.mappingDefaultsPlugin.setDefault(jpa.getName());
        conf.mappingDefaultsPlugin.setString(jpa.getName());
        return true;
View Full Code Here

    public Object createCodeFormat() {
        return flags.format;
    }

    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 NativeJDBCSeq.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("native-seq-usage"));
View Full Code Here

    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

        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

        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 TableSchemaFactory.run(conf, arguments, opts);
                } finally {
                    conf.close();
                }
            }
        });
        if (!ret)
            System.out.println(_loc.get("sch-usage"));
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

        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

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.