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

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


            if (hasOption(OPTION_ALLOW_NULLS))
            {
                // Allow for null value of discriminator
                SQLExpression expr = stmt.getSQLExpressionFactory().newExpression(stmt, discrimSqlTbl,
                    discMapping);
                SQLExpression val = new NullLiteral(stmt, null, null, null);
                BooleanExpression nullDiscExpr = expr.eq(val);
                discExpr = discExpr.ior(nullDiscExpr);
                if (!multipleCandidates)
                {
                    multipleCandidates = true;
View Full Code Here


        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        else if (expr instanceof SQLLiteral)
        {
            if (expr instanceof ByteLiteral)
            {
View Full Code Here

        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        if (expr instanceof SQLLiteral)
        {
            RDBMSStoreManager storeMgr = stmt.getRDBMSManager();
            ApiAdapter api = storeMgr.getApiAdapter();
            Object id = api.getIdForObject(((SQLLiteral)expr).getValue());
            if (id == null)
            {
                return new NullLiteral(stmt, null, null, null);
            }
            else
            {
                JavaTypeMapping m = getMappingForClass(id.getClass());
                return new ObjectLiteral(stmt, m, id, null);
View Full Code Here

                    SQLTable sqlTableSubclass =
                        stmt.leftOuterJoin(null, tableIdMapping, subclassTables[i], null, subclassIdMapping,
                            null, stmt.getPrimaryTable().getGroupName());

                    SQLExpression subclassIdExpr = factory.newExpression(stmt, sqlTableSubclass, subclassIdMapping);
                    SQLExpression nullExpr = new NullLiteral(stmt, null, null, null);
                    stmt.whereAnd(subclassIdExpr.eq(nullExpr), false);
                }
            }
        }
View Full Code Here

                    SQLTable sqlTableSubclass =
                        stmt.leftOuterJoin(null, joinElementMapping, subclassTables[i], null,
                            subclassIdMapping, null, stmt.getPrimaryTable().getGroupName());

                    SQLExpression subclassIdExpr = factory.newExpression(stmt, sqlTableSubclass, subclassIdMapping);
                    SQLExpression nullExpr = new NullLiteral(stmt, null, null, null);
                    stmt.whereAnd(subclassIdExpr.eq(nullExpr), false);
                }
            }
        }
View Full Code Here

            RDBMSStoreManager storeMgr = stmt.getRDBMSManager();
            ApiAdapter api = storeMgr.getApiAdapter();
            Object obj = ((SQLLiteral)expr).getValue();
            if (obj == null || !api.isPersistable(obj))
            {
                return new NullLiteral(stmt, null, null, null);
            }
            else
            {
                Object ver = stmt.getRDBMSManager().getApiAdapter().getVersionForObject(obj);
                JavaTypeMapping m = getMappingForClass(ver.getClass());
View Full Code Here

        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        else if (expr instanceof SQLLiteral)
        {
            if (expr instanceof ByteLiteral)
            {
View Full Code Here

        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        else if (expr instanceof SQLLiteral)
        {
            if (expr instanceof ByteLiteral)
            {
View Full Code Here

        }

        SQLExpression expr = (SQLExpression)args.get(0);
        if (expr == null)
        {
            return new NullLiteral(stmt, null, null, null);
        }
        else if (expr instanceof SQLLiteral)
        {
            if (expr instanceof ByteLiteral)
            {
View Full Code Here

        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)
View Full Code Here

TOP

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

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.