Package org.datanucleus.query.evaluator.memory

Examples of org.datanucleus.query.evaluator.memory.InvocationEvaluator


            ClassLoaderResolver clr = nucleusCtx.getClassLoaderResolver(type != null ? type.getClassLoader() : null);
            PluginManager pluginMgr = nucleusCtx.getPluginManager();
            ConfigurationElement[] elems = pluginMgr.getConfigurationElementsForExtension(
                "org.datanucleus.query_method_evaluators", "method", methodName);
            Map<Object, InvocationEvaluator> evaluators = new HashMap();
            InvocationEvaluator requiredEvaluator = null;
            if (elems == null)
            {
                return null;
            }

            for (int i=0;i<elems.length;i++)
            {
                try
                {
                    String evalName = elems[i].getAttribute("evaluator");
                    InvocationEvaluator eval =
                        (InvocationEvaluator)pluginMgr.createExecutableExtension(
                        "org.datanucleus.query_method_evaluators", new String[] {"method", "evaluator"},
                        new String[] {methodName, evalName}, "evaluator", null, null);

                    String elemClsName = elems[i].getAttribute("class");
View Full Code Here


        if (methods != null)
        {
            Iterator evaluatorIter = methods.iterator();
            while (evaluatorIter.hasNext())
            {
                InvocationEvaluator eval = (InvocationEvaluator)evaluatorIter.next();
                if (eval.supportsType(type))
                {
                    return eval;
                }
            }
        }
        else
        {
            // Not yet loaded for this method
            String[] evaluatorNames = omfCtx.getPluginManager().getAttributeValuesForExtension(
                "org.datanucleus.store_query_methods", "name", methodName, "memory-evaluator");
            if (evaluatorNames != null)
            {
                Collection evaluators = new HashSet();
                InvocationEvaluator evalToUse = null;
                for (int i=0;i<evaluatorNames.length;i++)
                {
                    try
                    {
                        Class evalCls = omfCtx.getClassLoaderResolver(null).classForName(evaluatorNames[i]);
                        InvocationEvaluator eval = (InvocationEvaluator)evalCls.newInstance();
                        evaluators.add(eval);
                        if (eval.supportsType(type))
                        {
                            evalToUse = eval;
                        }
                    }
                    catch (Exception e)
View Full Code Here

TOP

Related Classes of org.datanucleus.query.evaluator.memory.InvocationEvaluator

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.