Package org.datanucleus.store.rdbms.sql.expression

Examples of org.datanucleus.store.rdbms.sql.expression.MapLiteral


            throw new NucleusException("Dont currently support binding of unbound variables using Map.get");
        }

        if (mapExpr instanceof MapLiteral && keyValExpr instanceof SQLLiteral)
        {
            MapLiteral lit = (MapLiteral)expr;
            if (lit.getValue() == null)
            {
                return new NullLiteral(stmt, null, null, null);
            }

            return lit.getKeyLiteral().invoke("get", args);
        }
        else if (mapExpr instanceof MapLiteral)
        {
            // MapLiteral.get(SQLExpression)
            throw new NucleusUserException("We do not support MapLiteral.get(SQLExpression) since SQL doesnt allow such constructs");
View Full Code Here


            }
        }

        if (expr instanceof MapLiteral)
        {
            MapLiteral lit = (MapLiteral)expr;
            Map map = (Map)lit.getValue();
            if (map == null || map.size() == 0)
            {
                JavaTypeMapping m = exprFactory.getMappingForType(boolean.class, true);
                return new BooleanLiteral(stmt, m, Boolean.FALSE);
            }

            // TODO If keyExpr is a parameter and mapExpr is derived from a parameter ?
            MapKeyLiteral mapKeyLiteral = lit.getKeyLiteral();
            BooleanExpression bExpr = null;
            List<SQLExpression> elementExprs = mapKeyLiteral.getKeyExpressions();
            for (int i=0; i<elementExprs.size(); i++)
            {
                if (bExpr == null)
View Full Code Here

            }
        }

        if (mapExpr instanceof MapLiteral)
        {
            MapLiteral lit = (MapLiteral)mapExpr;
            Map map = (Map)lit.getValue();
            if (map == null || map.size() == 0)
            {
                return new BooleanLiteral(stmt, expr.getJavaTypeMapping(), Boolean.FALSE);
            }
            // TODO Handle this
            return lit.getValueLiteral().invoke("contains", args);
        }
        else
        {
            if (stmt.getQueryGenerator().getCompilationComponent() == CompilationComponent.FILTER)
            {
View Full Code Here

            }
        }

        if (mapExpr instanceof MapLiteral)
        {
            MapLiteral lit = (MapLiteral)mapExpr;
            Map map = (Map)lit.getValue();
            if (map == null || map.size() == 0)
            {
                return new BooleanLiteral(stmt, expr.getJavaTypeMapping(), Boolean.FALSE);
            }

            // TODO If valExpr is a parameter and mapExpr is derived from a parameter ?
            MapValueLiteral mapValueLiteral = lit.getValueLiteral();
            BooleanExpression bExpr = null;
            List<SQLExpression> elementExprs = mapValueLiteral.getValueExpressions();
            for (int i=0; i<elementExprs.size(); i++)
            {
                if (bExpr == null)
View Full Code Here

TOP

Related Classes of org.datanucleus.store.rdbms.sql.expression.MapLiteral

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.