Package com.mysql.clusterj.query

Examples of com.mysql.clusterj.query.Predicate


        // parameter name
        PredicateOperand param = dobj.param("name");
        // property name
        PredicateOperand column = dobj.get("name");
        // compare the column with the parameter
        Predicate compare = column.greaterEqual(param);
        // set the where clause into the query
        dobj.where(compare);
        // create a query instance
        Query query = session.createQuery(dobj);
View Full Code Here


        // parameter name
        PredicateOperand param = dobj.param("name");
        // property name
        PredicateOperand column = dobj.get("name");
        // compare the column with the parameter
        Predicate compare = column.lessThan(param);
        // set the where clause into the query
        dobj.where(compare);
        // create a query instance
        Query query = session.createQuery(dobj);
View Full Code Here

        // parameter name
        PredicateOperand param = dobj.param("name");
        // property name
        PredicateOperand column = dobj.get("name");
        // compare the column with the parameter
        Predicate compare = column.lessEqual(param);
        // set the where clause into the query
        dobj.where(compare);
        // create a query instance
        Query query = session.createQuery(dobj);
View Full Code Here

        return new AndNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        PredicateNode leftNode = getLeftPredicateNode();
        PredicateNode rightNode = getRightPredicateNode();
        Predicate leftPredicate = leftNode.getPredicate(queryDomainType);
        Predicate rightPredicate = rightNode.getPredicate(queryDomainType);
        result = leftPredicate.and(rightPredicate);
        setNumberOfParameters(leftNode.getNumberOfParameters() + rightNode.getNumberOfParameters());
        return result;
    }
View Full Code Here

        return new GreaterThanNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        String propertyName = getPropertyName();
        String parameterName = getParameterName();
        result = queryDomainType.get(propertyName).greaterThan(queryDomainType.param(parameterName));
        return result;
    }
View Full Code Here

        return new EqualsNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        String propertyName = getPropertyName();
        String parameterName = getParameterName();
        result = queryDomainType.get(propertyName).equal(queryDomainType.param(parameterName));
        return result;
    }
View Full Code Here

        return new OrNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        PredicateNode leftNode = getLeftPredicateNode();
        PredicateNode rightNode = getRightPredicateNode();
        Predicate leftPredicate = leftNode.getPredicate(queryDomainType);
        Predicate rightPredicate = rightNode.getPredicate(queryDomainType);
        result = leftPredicate.or(rightPredicate);
        setNumberOfParameters(leftNode.getNumberOfParameters() + rightNode.getNumberOfParameters());
        return result;
    }
View Full Code Here

        return new BetweenNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        String propertyName = null;
        String leftParameterName = getParameterName(1);
        String rightParameterName = getParameterName(2);
        if (getChild(0).getType() == MySQL51Parser.NOT) {
                                       // For NOT BETWEEN,
View Full Code Here

        return new GreaterEqualsNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        String propertyName = getPropertyName();
        String parameterName = getParameterName();
        result = queryDomainType.get(propertyName).greaterEqual(queryDomainType.param(parameterName));
        return result;
    }
View Full Code Here

        return new LessEqualsNode(this);
    }

    @Override
    public Predicate getPredicate(QueryDomainType<?> queryDomainType) {
        Predicate result = null;
        String propertyName = getPropertyName();
        String parameterName = getParameterName();
        result = queryDomainType.get(propertyName).lessEqual(queryDomainType.param(parameterName));
        return result;
    }
View Full Code Here

TOP

Related Classes of com.mysql.clusterj.query.Predicate

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.