Package er.extensions.eof.qualifiers

Examples of er.extensions.eof.qualifiers.ERXBetweenQualifier$BetweenQualifierSQLGenerationSupport


  public WOActionResults eofQueryAction() throws IOException {
    EOEditingContext ec = ERXEC.newEditingContext();
    ec.lock();
    try {
      EOQualifier q1 = new EOKeyValueQualifier("contents", EOQualifier.QualifierOperatorLike, "suspend*");
      EOQualifier q2 = new ERXBetweenQualifier("userCount", Long.valueOf(30), Long.valueOf(800));
      // EOQualifier q3 = new EOKeyValueQualifier("userCount", EOQualifier.QualifierOperatorEqual, Long.valueOf(82));
      //EOQualifier q3 = new EOKeyValueQualifier("userCount", EOQualifier.QualifierOperatorLessThan, Long.valueOf(82));
      EOQualifier q3 = new EOKeyValueQualifier("userCount", EOQualifier.QualifierOperatorLessThanOrEqualTo, Long.valueOf(802));
      EOQualifier qualifier = new EOAndQualifier(new NSArray<EOQualifier>(new EOQualifier[]{q1, q2, q3}));
      EOFetchSpecification fs = new EOFetchSpecification("LuceneAsset", qualifier, null);
View Full Code Here


    protected boolean traverseKeyValueQualifier(EOKeyValueQualifier q) {
      Query query = null;
      String key = _entity.attributeNamed(q.key()).columnName();
      IndexAttribute attr = new IndexAttribute(_entity.attributeNamed(key));
      if (q instanceof ERXBetweenQualifier) {
        ERXBetweenQualifier between = (ERXBetweenQualifier) q;
        Object min = between.minimumValue();
        Object max = between.maximumValue();
        query = new TermRangeQuery(key, attr.asLuceneValue(min), attr.asLuceneValue(max), false, false);
      } else if(q.selector().equals(EOQualifier.QualifierOperatorGreaterThan)) {
        query = new TermRangeQuery(key, attr.asLuceneValue(q.value()), null, false, false);
      } else if(q.selector().equals(EOQualifier.QualifierOperatorGreaterThanOrEqualTo)) {
        query = new TermRangeQuery(key, attr.asLuceneValue(q.value()), null, true, false);
View Full Code Here

TOP

Related Classes of er.extensions.eof.qualifiers.ERXBetweenQualifier$BetweenQualifierSQLGenerationSupport

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.