Examples of PluginValue


Examples of org.apache.openjpa.lib.conf.PluginValue

    protected Seq instantiate(ClassLoader envLoader) {
        if (NAME_SYSTEM.equals(_name))
            return _repos.getConfiguration().getSequenceInstance();

        try {
            PluginValue plugin = newPluginValue("sequence-plugin");
            plugin.setString(_plugin);
            String clsName = plugin.getClassName();

            Class cls = Class.forName(clsName, true,
                (ClassLoader) AccessController.doPrivileged(
                    J2DoPrivHelper.getClassLoaderAction(Seq.class)));
            StringBuffer props = new StringBuffer();
            if (plugin.getProperties() != null)
                props.append(plugin.getProperties());
            addStandardProperties(props);

            // allow user-class specification of either our sequence
            // interface or a factory class
            Seq seq;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

        , JDBCConfiguration conf) {
        if (StringUtils.isEmpty(prod))
            return null;
        prod = prod.toLowerCase();

        PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf)
            .dbdictionaryPlugin;

        if (prod.indexOf("oracle") != -1)
            return dbdictionaryPlugin.unalias("oracle");
        if (prod.indexOf("sqlserver") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("jsqlconnect") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("mariadb") != -1)
            return dbdictionaryPlugin.unalias("mariadb");
        if (prod.indexOf("mysql") != -1)
            return dbdictionaryPlugin.unalias("mysql");
        if (prod.indexOf("postgres") != -1)
            return dbdictionaryPlugin.unalias("postgres");
        if (prod.indexOf("sybase") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("adaptive server") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("informix") != -1 || prod.indexOf("ids") != -1)
            return dbdictionaryPlugin.unalias("informix");
        if (prod.indexOf("ingres") != -1)
            return dbdictionaryPlugin.unalias("ingres");
        if (prod.indexOf("hsql") != -1)
            return dbdictionaryPlugin.unalias("hsql");
        if (prod.indexOf("foxpro") != -1)
            return dbdictionaryPlugin.unalias("foxpro");
        if (prod.indexOf("interbase") != -1)
            return InterbaseDictionary.class.getName();
        if (prod.indexOf("jdatastore") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("borland") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("access") != -1)
            return dbdictionaryPlugin.unalias("access");
        if (prod.indexOf("pointbase") != -1)
            return dbdictionaryPlugin.unalias("pointbase");
        if (prod.indexOf("empress") != -1)
            return dbdictionaryPlugin.unalias("empress");
        if (prod.indexOf("firebird") != -1)
            return FirebirdDictionary.class.getName();
        if (prod.indexOf("cache") != -1)
            return CacheDictionary.class.getName();
        if (prod.indexOf("derby") != -1)
            return dbdictionaryPlugin.unalias("derby");
        if (prod.indexOf("sapdb") != -1) {
            return dbdictionaryPlugin.unalias("maxdb");
        }
        // test h2 in a special way, because there's a decent chance the string
        // h2 could appear in the URL of another database
        if (prod.indexOf("jdbc:h2:") != -1)
            return dbdictionaryPlugin.unalias("h2");
        if (prod.indexOf("h2 database") != -1)
            return dbdictionaryPlugin.unalias("h2");
        // test db2 last, because there's a decent chance this string could
        // appear in the URL of another database (like if the db is named
        // "testdb2" or something)
        if (prod.indexOf("db2") != -1 || prod.indexOf("as400") != -1)
            return dbdictionaryPlugin.unalias("db2");
        if (prod.indexOf("soliddb") != -1)
            return dbdictionaryPlugin.unalias("soliddb");

        // known dbs that we don't support
        if (prod.indexOf("cloudscape") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("daffodil") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("idb") != -1) // instantdb
            return DBDictionary.class.getName();

        String prodClassName = dbdictionaryPlugin.unalias(prod);
        if (!StringUtils.equals(prod, prodClassName))
            return prodClassName;
       
        // give up
        return null;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

    protected Seq instantiate(ClassLoader envLoader) {
        if (NAME_SYSTEM.equals(_name))
            return _repos.getConfiguration().getSequenceInstance();

        try {
            PluginValue plugin = newPluginValue("sequence-plugin");
            plugin.setString(_plugin);
            String clsName = plugin.getClassName();

            Class cls = null;
            try {
                cls = Class.forName(clsName, true,
                    AccessController.doPrivileged(J2DoPrivHelper.getClassLoaderAction(Seq.class)));
            } catch (ClassNotFoundException cnfe) {
                // Target sequence type is loaded by the ClassLoader responsible for OpenJPA classes.
                // This can happen if the custom sequence implementation is a class that belongs to
                // a child ClassLoader - a situation that can easily happen in a JEE environment.
                // Fall back to the envLoader to try load the class.
                cls = Class.forName(clsName, true, envLoader);
            }
           
            StringBuilder props = new StringBuilder();
            if (plugin.getProperties() != null)
                props.append(plugin.getProperties());
            addStandardProperties(props);

            // allow user-class specification of either our sequence
            // interface or a factory class
            Seq seq;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

        , JDBCConfiguration conf) {
        if (StringUtils.isEmpty(prod))
            return null;
        prod = prod.toLowerCase();

        PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf)
            .dbdictionaryPlugin;

        if (prod.indexOf("oracle") != -1)
            return dbdictionaryPlugin.unalias("oracle");
        if (prod.indexOf("sqlserver") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("jsqlconnect") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("mysql") != -1)
            return dbdictionaryPlugin.unalias("mysql");
        if (prod.indexOf("postgres") != -1)
            return dbdictionaryPlugin.unalias("postgres");
        if (prod.indexOf("sybase") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("adaptive server") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("informix") != -1)
            return dbdictionaryPlugin.unalias("informix");
        if (prod.indexOf("hsql") != -1)
            return dbdictionaryPlugin.unalias("hsql");
        if (prod.indexOf("foxpro") != -1)
            return dbdictionaryPlugin.unalias("foxpro");
        if (prod.indexOf("interbase") != -1)
            return InterbaseDictionary.class.getName();
        if (prod.indexOf("jdatastore") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("borland") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("access") != -1)
            return dbdictionaryPlugin.unalias("access");
        if (prod.indexOf("pointbase") != -1)
            return dbdictionaryPlugin.unalias("pointbase");
        if (prod.indexOf("empress") != -1)
            return dbdictionaryPlugin.unalias("empress");
        if (prod.indexOf("firebird") != -1)
            return FirebirdDictionary.class.getName();
        if (prod.indexOf("cache") != -1)
            return CacheDictionary.class.getName();
        if (prod.indexOf("derby") != -1)
            return dbdictionaryPlugin.unalias("derby");
        // test h2 in a special way, because there's a decent chance the string
        // h2 could appear in the URL of another database
        if (prod.indexOf("jdbc:h2:") != -1)
            return dbdictionaryPlugin.unalias("h2");
        if (prod.indexOf("h2 database") != -1)
            return dbdictionaryPlugin.unalias("h2");
        // test db2 last, because there's a decent chance this string could
        // appear in the URL of another database (like if the db is named
        // "testdb2" or something)
        if (prod.indexOf("db2") != -1 || prod.indexOf("as400") != -1)
            return dbdictionaryPlugin.unalias("db2");

        // known dbs that we don't support
        if (prod.indexOf("cloudscape") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("daffodil") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("sapdb") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("idb") != -1) // instantdb
            return DBDictionary.class.getName();

        String prodClassName = dbdictionaryPlugin.unalias(prod);
        if (!StringUtils.equals(prod, prodClassName))
            return prodClassName;
       
        // give up
        return null;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

        , JDBCConfiguration conf) {
        if (StringUtils.isEmpty(prod))
            return null;
        prod = prod.toLowerCase();

        PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf)
            .dbdictionaryPlugin;

        if (prod.indexOf("oracle") != -1)
            return dbdictionaryPlugin.unalias("oracle");
        if (prod.indexOf("sqlserver") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("jsqlconnect") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("mysql") != -1)
            return dbdictionaryPlugin.unalias("mysql");
        if (prod.indexOf("postgres") != -1)
            return dbdictionaryPlugin.unalias("postgres");
        if (prod.indexOf("sybase") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("adaptive server") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("informix") != -1)
            return dbdictionaryPlugin.unalias("informix");
        if (prod.indexOf("hsql") != -1)
            return dbdictionaryPlugin.unalias("hsql");
        if (prod.indexOf("foxpro") != -1)
            return dbdictionaryPlugin.unalias("foxpro");
        if (prod.indexOf("interbase") != -1)
            return InterbaseDictionary.class.getName();
        if (prod.indexOf("jdatastore") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("borland") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("access") != -1)
            return dbdictionaryPlugin.unalias("access");
        if (prod.indexOf("pointbase") != -1)
            return dbdictionaryPlugin.unalias("pointbase");
        if (prod.indexOf("empress") != -1)
            return dbdictionaryPlugin.unalias("empress");
        if (prod.indexOf("firebird") != -1)
            return FirebirdDictionary.class.getName();
        if (prod.indexOf("cache") != -1)
            return CacheDictionary.class.getName();
        if (prod.indexOf("derby") != -1)
            return dbdictionaryPlugin.unalias("derby");
        // test h2 in a special way, because there's a decent chance the string
        // h2 could appear in the URL of another database
        if (prod.indexOf("jdbc:h2:") != -1)
            return H2Dictionary.class.getName();
        if (prod.indexOf("h2 database") != -1)
            return H2Dictionary.class.getName();
        // test db2 last, because there's a decent chance this string could
        // appear in the URL of another database (like if the db is named
        // "testdb2" or something)
        if (prod.indexOf("db2") != -1 || prod.indexOf("as400") != -1)
            return dbdictionaryPlugin.unalias("db2");

        // known dbs that we don't support
        if (prod.indexOf("cloudscape") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("daffodil") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("sapdb") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("idb") != -1) // instantdb
            return DBDictionary.class.getName();

        String prodClassName = dbdictionaryPlugin.unalias(prod);
        if (!StringUtils.equals(prod, prodClassName))
            return prodClassName;
       
        // give up
        return null;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

    protected Seq instantiate(ClassLoader envLoader) {
        if (NAME_SYSTEM.equals(_name))
            return _repos.getConfiguration().getSequenceInstance();

        try {
            PluginValue plugin = newPluginValue("sequence-plugin");
            plugin.setString(_plugin);
            String clsName = plugin.getClassName();

            Class cls = null;
            try {
                cls = Class.forName(clsName, true,
                    AccessController.doPrivileged(J2DoPrivHelper.getClassLoaderAction(Seq.class)));
            } catch (ClassNotFoundException cnfe) {
                // Target sequence type is loaded by the ClassLoader responsible for OpenJPA classes.
                // This can happen if the custom sequence implementation is a class that belongs to
                // a child ClassLoader - a situation that can easily happen in a JEE environment.
                // Fall back to the envLoader to try load the class.
                cls = Class.forName(clsName, true, envLoader);
            }
           
            StringBuilder props = new StringBuilder();
            if (plugin.getProperties() != null)
                props.append(plugin.getProperties());
            addStandardProperties(props);

            // allow user-class specification of either our sequence
            // interface or a factory class
            Seq seq;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

        , JDBCConfiguration conf) {
        if (StringUtils.isEmpty(prod))
            return null;
        prod = prod.toLowerCase();

        PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf)
            .dbdictionaryPlugin;

        if (prod.indexOf("oracle") != -1)
            return dbdictionaryPlugin.unalias("oracle");
        if (prod.indexOf("sqlserver") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("jsqlconnect") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("mysql") != -1)
            return dbdictionaryPlugin.unalias("mysql");
        if (prod.indexOf("postgres") != -1)
            return dbdictionaryPlugin.unalias("postgres");
        if (prod.indexOf("sybase") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("adaptive server") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("informix") != -1 || prod.indexOf("ids") != -1)
            return dbdictionaryPlugin.unalias("informix");
        if (prod.indexOf("ingres") != -1)
            return dbdictionaryPlugin.unalias("ingres");
        if (prod.indexOf("hsql") != -1)
            return dbdictionaryPlugin.unalias("hsql");
        if (prod.indexOf("foxpro") != -1)
            return dbdictionaryPlugin.unalias("foxpro");
        if (prod.indexOf("interbase") != -1)
            return InterbaseDictionary.class.getName();
        if (prod.indexOf("jdatastore") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("borland") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("access") != -1)
            return dbdictionaryPlugin.unalias("access");
        if (prod.indexOf("pointbase") != -1)
            return dbdictionaryPlugin.unalias("pointbase");
        if (prod.indexOf("empress") != -1)
            return dbdictionaryPlugin.unalias("empress");
        if (prod.indexOf("firebird") != -1)
            return FirebirdDictionary.class.getName();
        if (prod.indexOf("cache") != -1)
            return CacheDictionary.class.getName();
        if (prod.indexOf("derby") != -1)
            return dbdictionaryPlugin.unalias("derby");
        if (prod.indexOf("sapdb") != -1) {
            return dbdictionaryPlugin.unalias("maxdb");
        }
        // test h2 in a special way, because there's a decent chance the string
        // h2 could appear in the URL of another database
        if (prod.indexOf("jdbc:h2:") != -1)
            return dbdictionaryPlugin.unalias("h2");
        if (prod.indexOf("h2 database") != -1)
            return dbdictionaryPlugin.unalias("h2");
        // test db2 last, because there's a decent chance this string could
        // appear in the URL of another database (like if the db is named
        // "testdb2" or something)
        if (prod.indexOf("db2") != -1 || prod.indexOf("as400") != -1)
            return dbdictionaryPlugin.unalias("db2");
        if (prod.indexOf("soliddb") != -1)
            return dbdictionaryPlugin.unalias("soliddb");

        // known dbs that we don't support
        if (prod.indexOf("cloudscape") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("daffodil") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("idb") != -1) // instantdb
            return DBDictionary.class.getName();

        String prodClassName = dbdictionaryPlugin.unalias(prod);
        if (!StringUtils.equals(prod, prodClassName))
            return prodClassName;
       
        // give up
        return null;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

    protected Seq instantiate(ClassLoader envLoader) {
        if (NAME_SYSTEM.equals(_name))
            return _repos.getConfiguration().getSequenceInstance();

        try {
            PluginValue plugin = newPluginValue("sequence-plugin");
            plugin.setString(_plugin);
            String clsName = plugin.getClassName();

            Class cls = Class.forName(clsName, true,
                (ClassLoader) AccessController.doPrivileged(
                    J2DoPrivHelper.getClassLoaderAction(Seq.class)));
            StringBuffer props = new StringBuffer();
            if (plugin.getProperties() != null)
                props.append(plugin.getProperties());
            addStandardProperties(props);

            // allow user-class specification of either our sequence
            // interface or a factory class
            Seq seq;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

        , JDBCConfiguration conf) {
        if (StringUtils.isEmpty(prod))
            return null;
        prod = prod.toLowerCase();

        PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf)
            .dbdictionaryPlugin;

        if (prod.indexOf("oracle") != -1)
            return dbdictionaryPlugin.unalias("oracle");
        if (prod.indexOf("sqlserver") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("jsqlconnect") != -1)
            return dbdictionaryPlugin.unalias("sqlserver");
        if (prod.indexOf("mysql") != -1)
            return dbdictionaryPlugin.unalias("mysql");
        if (prod.indexOf("postgres") != -1)
            return dbdictionaryPlugin.unalias("postgres");
        if (prod.indexOf("sybase") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("adaptive server") != -1)
            return dbdictionaryPlugin.unalias("sybase");
        if (prod.indexOf("informix") != -1)
            return dbdictionaryPlugin.unalias("informix");
        if (prod.indexOf("hsql") != -1)
            return dbdictionaryPlugin.unalias("hsql");
        if (prod.indexOf("foxpro") != -1)
            return dbdictionaryPlugin.unalias("foxpro");
        if (prod.indexOf("interbase") != -1)
            return InterbaseDictionary.class.getName();
        if (prod.indexOf("jdatastore") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("borland") != -1)
            return JDataStoreDictionary.class.getName();
        if (prod.indexOf("access") != -1)
            return dbdictionaryPlugin.unalias("access");
        if (prod.indexOf("pointbase") != -1)
            return dbdictionaryPlugin.unalias("pointbase");
        if (prod.indexOf("empress") != -1)
            return dbdictionaryPlugin.unalias("empress");
        if (prod.indexOf("firebird") != -1)
            return FirebirdDictionary.class.getName();
        if (prod.indexOf("cache") != -1)
            return CacheDictionary.class.getName();
        if (prod.indexOf("derby") != -1)
            return dbdictionaryPlugin.unalias("derby");
        // test h2 in a special way, because there's a decent chance the string
        // h2 could appear in the URL of another database
        if (prod.indexOf("jdbc:h2:") != -1)
            return dbdictionaryPlugin.unalias("h2");
        if (prod.indexOf("h2 database") != -1)
            return dbdictionaryPlugin.unalias("h2");
        // test db2 last, because there's a decent chance this string could
        // appear in the URL of another database (like if the db is named
        // "testdb2" or something)
        if (prod.indexOf("db2") != -1 || prod.indexOf("as400") != -1)
            return dbdictionaryPlugin.unalias("db2");

        // known dbs that we don't support
        if (prod.indexOf("cloudscape") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("daffodil") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("sapdb") != -1)
            return DBDictionary.class.getName();
        if (prod.indexOf("idb") != -1) // instantdb
            return DBDictionary.class.getName();

        String prodClassName = dbdictionaryPlugin.unalias(prod);
        if (!StringUtils.equals(prod, prodClassName))
            return prodClassName;
       
        // give up
        return null;
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue

    protected Seq instantiate(ClassLoader envLoader) {
        if (NAME_SYSTEM.equals(_name))
            return _repos.getConfiguration().getSequenceInstance();

        try {
            PluginValue plugin = newPluginValue("sequence-plugin");
            plugin.setString(_plugin);
            String clsName = plugin.getClassName();

            Class cls = Class.forName(clsName, true,
                (ClassLoader) AccessController.doPrivileged(
                    J2DoPrivHelper.getClassLoaderAction(Seq.class)));
            StringBuffer props = new StringBuffer();
            if (plugin.getProperties() != null)
                props.append(plugin.getProperties());
            addStandardProperties(props);

            // allow user-class specification of either our sequence
            // interface or a factory class
            Seq 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.