Package org.apache.expreval.expr.literal

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


    public ExpressionTree getExpressionTree(final Collection<T> objects) throws HBqlException {

        final ExpressionTree expressionTree;

        if (objects == null || objects.size() == 0) {
            expressionTree = ExpressionTree.newExpressionTree(null, new BooleanLiteral(true));
            expressionTree.setMappingContext(null);
            expressionTree.setAllowColumns(false);
        }
        else {
            // Grab the first object to derive the mapping
View Full Code Here

    private ExpressionTree(final GenericValue rootValue) {
        super(exprSig, rootValue);
    }

    public static ExpressionTree newExpressionTree(final Mapping mapping, final GenericValue booleanValue) {
        final ExpressionTree tree = new ExpressionTree(booleanValue == null ? new BooleanLiteral(true) : booleanValue);
        // This is stashed until validate() is called.  This avoids throwing HBqlException in parser
        tree.embeddedMapping = mapping;
        return tree;
    }
View Full Code Here

        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

        if (val == null)
            return new NullLiteral();

        if (val instanceof Boolean)
            return new BooleanLiteral((Boolean)val);

        if (val instanceof Character)
            return new ShortLiteral((short)((Character)val).charValue());

        if (val instanceof Short)
View Full Code Here

TOP

Related Classes of org.apache.expreval.expr.literal.BooleanLiteral

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.