Examples of MappingContext


Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

            return getAnnotatedMapping(connection, obj).getMappingContext();
    }

    private static MappingContext getReflectionMappingContext(final Object obj) throws HBqlException {
        if (obj == null)
            return new MappingContext();
        else
            return getReflectionMapping(obj).getMappingContext();
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

            final ExpressionTree expressionTree = parser.descWhereExpr();

            expressionTree.setEmbeddedMapping();

            if (expressionTree.getMappingContext() == null)
                expressionTree.setMappingContext((sc == null) ? new MappingContext() : sc);

            return expressionTree;
        }
        catch (RecognitionException e) {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

    private static boolean evaluateWhereValue(final String expr) {
        try {
            final WithArgs args = ParserUtil.parseWithClause(expr);
            System.out.println("Evaluating: " + args.asString());
            args.setMappingContext(new MappingContext());
            args.validateArgTypes();
            return true;
        }
        catch (HBqlException e) {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

        }
        else {
            // Grab the first object to derive the mapping
            final Object obj = objects.iterator().next();
            final ReflectionMapping mapping = ReflectionMapping.getReflectionMapping(obj);
            final MappingContext mappingContext = new MappingContext(mapping);
            expressionTree = ParserUtil.parseWhereExpression(this.getQuery(), mappingContext);
            this.applyParameters(expressionTree);
        }

        return expressionTree;
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

import java.util.List;

public class ReflectionResultAccessor extends ResultAccessor {

    public ReflectionResultAccessor(final Object object) {
        super(new MappingContext(ReflectionMapping.getReflectionMapping(object)));
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

    public StatementWithMapping() {
    }

    protected StatementWithMapping(final StatementPredicate predicate, final String mappingName) {
        super(predicate);
        this.mappingContext = new MappingContext(mappingName);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

    }

    // This is not done in newExpressionTree() because that is called from the parser
    public void setEmbeddedMapping() throws HBqlException {
        if (this.embeddedMapping != null)
            this.setMappingContext(new MappingContext(this.embeddedMapping));
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

    public boolean useResultData() {
        return false;
    }

    private void validate() throws HBqlException {
        this.setMappingContext(new MappingContext());
        this.validateTypes(this.allowColumns(), false);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

        this.validateTypes(this.allowColumns(), false);
    }

    public Object getValue(final HConnectionImpl conn) throws HBqlException {
        try {
            this.setMappingContext(new MappingContext());
            return this.evaluate(conn, 0, this.allowColumns(), false, conn);
        }
        catch (ResultMissingColumnException e) {
            throw new InternalErrorException("Missing column: " + e.getMessage());
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

                    return false;
                }

            case EVAL:
                final String exprStr = (String)this.getExprArg(0).getValue(conn, object);
                final MappingContext mappingContext = this.getExpressionContext().getMappingContext();
                final ExpressionTree expressionTree = ParserUtil.parseWhereExpression(exprStr, mappingContext);
                return expressionTree.evaluate(conn, object);

            case MAPPINGEXISTS:
                if (conn == null) {
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.