Package org.apache.jackrabbit.spi.commons.query.qom

Examples of org.apache.jackrabbit.spi.commons.query.qom.ComparisonImpl


                    "repository and execute query again.");
        }
        PropertyValueImpl pv = (PropertyValueImpl) node.getPropertyValue();
        String propName = npResolver.getJCRName(pv.getPropertyQName());
        if (data instanceof ComparisonImpl) {
            ComparisonImpl comp = (ComparisonImpl) data;
            int operator = comp.getOperator();
            Value v = (Value) ((StaticOperandImpl) comp.getOperand2()).accept(this, data);
            String namedLength = FieldNames.createNamedLength(propName, v.getLong());

            switch (operator) {
                case OPERATOR_EQUAL_TO:
                    return new TermQuery(new Term(FieldNames.PROPERTY_LENGTHS, namedLength));
View Full Code Here


            throw new InvalidQueryException("NodeLocalName operand is only " +
                    "available with index version >= 3. Please re-index " +
                    "repository and execute query again.");
        }
        if (data instanceof ComparisonImpl) {
            ComparisonImpl comp = ((ComparisonImpl) data);
            int operator = comp.getOperator();
            Value v = (Value) ((StaticOperandImpl) comp.getOperand2()).accept(this, data);
            String value = v.getString();

            switch (operator) {
                case OPERATOR_EQUAL_TO:
                    return new TermQuery(new Term(FieldNames.LOCAL_NAME, value));
View Full Code Here

        }
    }

    public Object visit(NodeNameImpl node, Object data) throws Exception {
        if (data instanceof ComparisonImpl) {
            ComparisonImpl comp = ((ComparisonImpl) data);
            int operator = comp.getOperator();
            Value v = (Value) ((StaticOperandImpl) comp.getOperand2()).accept(this, data);
            switch (v.getType()) {
                case PropertyType.DATE:
                case PropertyType.DOUBLE:
                // TODO case PropertyType.DECIMAL:
                case PropertyType.LONG:
View Full Code Here

        return Util.createMatchAllQuery(propName, version);
    }

    public Object visit(PropertyValueImpl node, Object data) throws Exception {
        if (data instanceof ComparisonImpl) {
            ComparisonImpl comp = ((ComparisonImpl) data);
            int operator = comp.getOperator();
            Value v = (Value) ((StaticOperandImpl) comp.getOperand2()).accept(this, data);
            String stringValue = stringValueOf(v);
            String propName = npResolver.getJCRName(node.getPropertyQName());
            String text = FieldNames.createNamedValue(propName, stringValue);
            switch (operator) {
                case OPERATOR_EQUAL_TO:
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.commons.query.qom.ComparisonImpl

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.