Package er.extensions.qualifiers

Examples of er.extensions.qualifiers.ERXOrQualifier


    }
    else {
      startQualifiers.addObject(new ERXKeyValueQualifier(startDateKey, EOQualifier.QualifierOperatorEqual, null));
      startQualifiers.addObject(new ERXKeyValueQualifier(startDateKey, EOQualifier.QualifierOperatorLessThanOrEqualTo, date));
    }
    EOQualifier startQualifier = new ERXOrQualifier(startQualifiers);

    NSMutableArray<EOQualifier> endQualifiers = new NSMutableArray<EOQualifier>();
    if (exclusive) {
      endQualifiers.addObject(new ERXKeyValueQualifier(endDateKey, EOQualifier.QualifierOperatorGreaterThan, date));
    }
    else {
      endQualifiers.addObject(new ERXKeyValueQualifier(endDateKey, EOQualifier.QualifierOperatorEqual, null));
      endQualifiers.addObject(new ERXKeyValueQualifier(endDateKey, EOQualifier.QualifierOperatorGreaterThanOrEqualTo, date));
    }
    EOQualifier endQualifier = new ERXOrQualifier(endQualifiers);

    EOAndQualifier qualifier = new ERXAndQualifier(new NSArray<EOQualifier>(new EOQualifier[] { startQualifier, endQualifier }));
    return qualifier;

    /*
 
View Full Code Here


    for (EOQualifier qualifier : qualifiersArray) {
      if (qualifier != null) {
        qualifiers.addObject(qualifier);
      }
    }
    return new ERXOrQualifier(qualifiers);
  }
View Full Code Here

   * @param qualifiers
   *            the NSArray of qualifiers to or
   * @return an ERXOrQualifier
   */
  public static ERXOrQualifier or(NSArray<? extends EOQualifier> qualifiers) {
    return new ERXOrQualifier(qualifiers);
  }
View Full Code Here

  public static ERXOrQualifier inObjects(String key, Object... values) {
    NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>();
    for (Object value : values) {
      qualifiers.addObject(ERXQ.equals(key, value));
    }
    return new ERXOrQualifier(qualifiers);
  }
View Full Code Here

   *            the values
   * @return an EOQualifier
   */
  public static ERXOrQualifier in(String key, NSArray<?> values) {
    if(values.count() == 0) {
      return new ERXOrQualifier(new NSArray<EOQualifier>(new ERXFalseQualifier()));
    }
    NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>();
    Enumeration valuesEnum = values.objectEnumerator();
    while (valuesEnum.hasMoreElements()) {
      Object value = valuesEnum.nextElement();
      qualifiers.addObject(ERXQ.equals(key, value));
    }
    return new ERXOrQualifier(qualifiers);
  }
View Full Code Here

  public static ERXOrQualifier containsAny(NSArray<String> keys, String tokensWithWhitespace) {
    NSMutableArray<ERXOrQualifier> qualifiers = new NSMutableArray<ERXOrQualifier>();
    for (String key : keys) {
      qualifiers.addObject(ERXQ.containsAny(key, tokensWithWhitespace));
    }
    return new ERXOrQualifier(qualifiers);
  }
View Full Code Here

   * @param tokens
   *            the list of tokens to search for
   * @return an ERXOrQualifier
   */
  public static ERXOrQualifier containsAny(String key, String[] tokens) {
    ERXOrQualifier qualifier;
    if (tokens.length == 0) {
      qualifier = null;
    }
    else {
      NSMutableArray<EOQualifier> searchQualifiers = new NSMutableArray<EOQualifier>();
      for (String token : tokens) {
        searchQualifiers.addObject(ERXQ.contains(key, token));
      }
      qualifier = new ERXOrQualifier(searchQualifiers);
    }
    return qualifier;
  }
View Full Code Here

  public static ERXOrQualifier containsAll(NSArray<String> keys, String tokensWithWhitespace) {
    NSMutableArray<ERXAndQualifier> qualifiers = new NSMutableArray<ERXAndQualifier>();
    for (String key : keys) {
      qualifiers.addObject(ERXQ.containsAll(key, tokensWithWhitespace));
    }
    return new ERXOrQualifier(qualifiers);
  }
View Full Code Here

      for (String token : tokens) {
        NSMutableArray<EOQualifier> tokenQualifiers = new NSMutableArray<EOQualifier>();
        for (String key : keys) {
          tokenQualifiers.addObject(ERXQ.contains(key, token));
        }
        searchQualifiers.addObject(new ERXOrQualifier(tokenQualifiers));
      }
      qualifier = new ERXAndQualifier(searchQualifiers);
    }
    return qualifier;
  }
View Full Code Here

TOP

Related Classes of er.extensions.qualifiers.ERXOrQualifier

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.