Examples of BooleanLiteral


Examples of org.apache.expreval.expr.literal.BooleanLiteral

        this.optimizeAllArgs();
        if (!this.isAConstant())
            return this;
        else
            try {
                return new BooleanLiteral(this.getValue(null, null));
            }
            catch (ResultMissingColumnException e) {
                throw new InternalErrorException("Missing column: " + e.getMessage());
            }
            catch (NullColumnValueException e) {
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.BooleanLiteral

 
  private Expression expression;
 
  public ContinuousWhileIntermediate(InstructionHandle instruction) {
    super(instruction);
    this.expression = new BooleanLiteral(instruction, true);
    this.blockRange = new BlockRange();
  }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.BooleanLiteral

            DatastoreMapping data_mapping = getDataStoreMapping(0);
            if (data_mapping.isBitBased() || data_mapping.isIntegerBased())
            {
                if (dba.supportsOption(DatastoreAdapter.BIT_IS_REALLY_BOOLEAN))
                {
                    expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
                }
                else
                {
                    expr = new BooleanBitColumnLiteral(qs, this, ((Boolean)value).booleanValue());
                }
            }
            else if (data_mapping.isBooleanBased())
            {
                expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
            }
            else if (data_mapping.isStringBased())
            {
                expr = new BooleanCharColumnLiteral(qs, this, ((Boolean)value).booleanValue());
            }
            else
            {
                expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
            }
        }
        else
        {
            expr = new BooleanLiteral(qs, this, ((Boolean)value).booleanValue());
        }
        return expr;
    }
View Full Code Here

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

        }
        if (!expr.hasClosure())
        {
            // Add closure to the boolean expression
            return new BooleanExpression(expr, Expression.OP_EQ,
                new BooleanLiteral(stmt, expr.getJavaTypeMapping(), Boolean.TRUE, null));
        }
        return expr;
    }
View Full Code Here

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

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

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

        if (expr instanceof CollectionLiteral)
        {
            Collection coll = (Collection)((CollectionLiteral)expr).getValue();
            boolean isEmpty = (coll == null || coll.size() == 0);
            JavaTypeMapping m = exprFactory.getMappingForType(boolean.class, false);
            return new BooleanLiteral(stmt, m, isEmpty ? Boolean.TRUE : Boolean.FALSE);
        }
        else
        {
            AbstractMemberMetaData mmd = ((CollectionExpression)expr).getJavaTypeMapping().getMemberMetaData();
            if (mmd.isSerialized())
View Full Code Here

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

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

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

        if (expr instanceof MapLiteral)
        {
            Map map = (Map)((MapLiteral)expr).getValue();
            boolean isEmpty = (map == null || map.size() == 0);
            JavaTypeMapping m = exprFactory.getMappingForType(boolean.class, false);
            return new BooleanLiteral(stmt, m, isEmpty ? Boolean.TRUE : Boolean.FALSE);
        }
        else
        {
            SQLExpression sizeExpr = exprFactory.invokeMethod(stmt, Map.class.getName(), "size", expr, args);
            JavaTypeMapping mapping = exprFactory.getMappingForType(Integer.class, true);
View Full Code Here

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

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

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

        if (expr instanceof StringLiteral && likeExpr instanceof StringLiteral)
        {
            // String.matches(String) so evaluate in-memory
            String primary = (String)((StringLiteral)expr).getValue();
            String pattern = (String)((StringLiteral)likeExpr).getValue();
            return new BooleanLiteral(stmt,
                exprFactory.getMappingForType(boolean.class, false), primary.matches(pattern));
        }
        else if (expr instanceof StringLiteral)
        {
            return getBooleanLikeExpression(expr, likeExpr, escapeExpr);
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.