Package org.apache.hadoop.hbase.hbql.mapping

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


    }

    // 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

    public boolean useResultData() {
        return false;
    }

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

        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

                    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

                && !(stmt instanceof ConnectionStatement)
                && !(stmt instanceof NonConnectionStatement))
                throw new HBqlException("Unsupported statement type: " + stmt.getClass().getSimpleName() + " - " + sql);

            if (stmt instanceof MappingContext) {
                final MappingContext mappingContext = (MappingContext)stmt;
                mappingContext.setResultAccessor(new HRecordResultAccessor(mappingContext));
            }

            return stmt;
        }
        catch (ParseException e) {
View Full Code Here

    public boolean apply(final T obj) {

        try {
            if (!this.isInitialized()) {
                final ReflectionMapping mapping = ReflectionMapping.getReflectionMapping(obj);
                final MappingContext mappingContext = new MappingContext(mapping);
                this.expressionTree = ParserUtil.parseWhereExpression(this.query, mappingContext);
                this.applyParameters(this.getExpressionTree());
                this.initialized.set(true);
            }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.hbql.mapping.MappingContext

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.