Examples of JDBCConfiguration


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

     */
    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("seq-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

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

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

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

    public Properties getProperties() {
        // add platform property
        Properties props = super.getProperties();
        String db = "Unknown";
        try {
            JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
            db = conf.getDBDictionaryInstance().platform;
        } catch (RuntimeException re) {
        }
        props.setProperty("Platform",
            "OpenJPA JDBC Edition: " + db + " Database");
View Full Code Here

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

    /**
     * Synchronize the mappings of the classes listed in the configuration.
     */
    private void synchronizeMappings(ClassLoader loader) {
        JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
        String action = conf.getSynchronizeMappings();
        if (StringUtils.isEmpty(action))
            return;

        Collection classes = conf.getMetaDataRepositoryInstance().
            loadPersistentTypes(false, loader);
        if (classes.isEmpty())
            return;

        String props = Configurations.getProperties(action);
View Full Code Here

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

     */
    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("clstable-seq-usage"));
        } finally {
            conf.close();
        }
    }
View Full Code Here

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

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

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

        return new JDBCFetchConfigurationImpl(state, jstate);
    }

    public void setContext(StoreContext ctx) {
        super.setContext(ctx);
        JDBCConfiguration conf = getJDBCConfiguration();
        if (conf == null)
            return;

        setEagerFetchMode(conf.getEagerFetchModeConstant());
        setSubclassFetchMode(conf.getSubclassFetchModeConstant());
        setResultSetType(conf.getResultSetTypeConstant());
        setFetchDirection(conf.getFetchDirectionConstant());
        setLRSSize(conf.getLRSSizeConstant());
        setJoinSyntax(conf.getDBDictionaryInstance().joinSyntax);
    }
View Full Code Here

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

        return _state.eagerMode;
    }

    public JDBCFetchConfiguration setEagerFetchMode(int mode) {
        if (mode == DEFAULT) {
            JDBCConfiguration conf = getJDBCConfiguration();
            if (conf != null)
                mode = conf.getEagerFetchModeConstant();
        }
        if (mode != DEFAULT)
            _state.eagerMode = mode;
        return this;
    }
View Full Code Here

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

        return Math.min(mode, _state.subclassMode);
    }

    public JDBCFetchConfiguration setSubclassFetchMode(int mode) {
        if (mode == DEFAULT) {
            JDBCConfiguration conf = getJDBCConfiguration();
            if (conf != null)
                mode = conf.getSubclassFetchModeConstant();
        }
        if (mode != DEFAULT)
            _state.subclassMode = mode;
        return this;
    }
View Full Code Here

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

        return _state.type;
    }

    public JDBCFetchConfiguration setResultSetType(int type) {
        if (type == DEFAULT) {
            JDBCConfiguration conf = getJDBCConfiguration();
            if (conf != null)
                _state.type = conf.getResultSetTypeConstant();
        } else
            _state.type = type;
        return this;
    }
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.