Package org.datanucleus.query.compiler

Examples of org.datanucleus.query.compiler.JDOQLCompiler


        if (NucleusLogger.QUERY.isDebugEnabled())
        {
            startTime = System.currentTimeMillis();
            NucleusLogger.QUERY.debug(LOCALISER.msg("021044", getLanguage(), getSingleStringQuery()));
        }
        JavaQueryCompiler compiler = new JDOQLCompiler(ec.getMetaDataManager(), ec.getClassLoaderResolver(),
            from, candidateClass, candidateCollection,
            this.filter, getParsedImports(), this.ordering, this.result, this.grouping, this.having,
            explicitParameters, explicitVariables, this.update);
        compilation = compiler.compile(parameterValues, subqueries);
        if (QueryUtils.queryReturnsSingleRow(this))
        {
            compilation.setReturnsSingleRow();
        }
        if (resultDistinct)
View Full Code Here


                startTime = System.currentTimeMillis();
                NucleusLogger.QUERY.debug(LOCALISER.msg("021044", getLanguage(),
                    ((AbstractJDOQLQuery)subquery).getSingleStringQuery()));
            }

            JavaQueryCompiler subCompiler = new JDOQLCompiler(ec.getMetaDataManager(), ec.getClassLoaderResolver(),
                subquery.from, subquery.candidateClass, null,
                subquery.filter, getParsedImports(), subquery.ordering, subquery.result,
                subquery.grouping, subquery.having, subquery.explicitParameters, null, null);
            subCompiler.setLinkToParentQuery(parentCompiler, subqueryDefinition.getParameterMap());
            QueryCompilation subqueryCompilation = subCompiler.compile(parameterValues, null);
            if (QueryUtils.queryReturnsSingleRow(subquery))
            {
                subqueryCompilation.setReturnsSingleRow();
            }
            parentCompilation.addSubqueryCompilation(entry.getKey(), subqueryCompilation);
View Full Code Here

        if (NucleusLogger.QUERY.isDebugEnabled())
        {
            startTime = System.currentTimeMillis();
            NucleusLogger.QUERY.debug(LOCALISER.msg("021044", "JDOQL", getSingleStringQuery()));
        }
        JavaQueryCompiler compiler = new JDOQLCompiler(om.getMetaDataManager(), om.getClassLoaderResolver(),
            null, candidateClass, candidateCollection,
            this.filter, getParsedImports(), this.ordering, this.result, this.grouping, this.having,
            explicitParameters, explicitVariables);
        compilation = compiler.compile(parameterValues, subqueries);
        if (QueryUtils.queryReturnsSingleRow(this))
        {
            compilation.setReturnsSingleRow();
        }
        if (NucleusLogger.QUERY.isDebugEnabled())
        {
            NucleusLogger.QUERY.debug(LOCALISER.msg("021045", "JDOQL",
                "" + (System.currentTimeMillis() - startTime)));
        }

        if (subqueries != null)
        {
            // Compile any subqueries
            Iterator iter = subqueries.entrySet().iterator();
            while (iter.hasNext())
            {
                Map.Entry entry = (Map.Entry)iter.next();
                SubqueryDefinition subqueryDefinition = (SubqueryDefinition)entry.getValue();
                Query subquery = subqueryDefinition.getQuery();
                if (NucleusLogger.QUERY.isDebugEnabled())
                {
                    startTime = System.currentTimeMillis();
                    NucleusLogger.QUERY.debug(LOCALISER.msg("021044", "JDOQL",
                        ((AbstractJDOQLQuery)subquery).getSingleStringQuery()));
                }
                compiler = new JDOQLCompiler(om.getMetaDataManager(), om.getClassLoaderResolver(),
                    null, subquery.candidateClass, null,
                    subquery.filter, getParsedImports(), subquery.ordering, subquery.result,
                    subquery.grouping, subquery.having, null, null);
                QueryCompilation subqueryCompilation = compiler.compile(parameterValues, null);
                if (QueryUtils.queryReturnsSingleRow(subquery))
                {
                    subqueryCompilation.setReturnsSingleRow();
                }
                compilation.addSubqueryCompilation((String)entry.getKey(), subqueryCompilation);
View Full Code Here

TOP

Related Classes of org.datanucleus.query.compiler.JDOQLCompiler

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.