Package er.extensions.qualifiers

Examples of er.extensions.qualifiers.ERXKeyValueQualifier$PROPERTIES


        Property[] properties = new Property[3];
        properties[0] = new Property(SystemStatistics.ORGANIZATION_COUNT.name(), Long.toString(organizationService.countAll()), SystemStatistics.ORGANIZATION_COUNT.getDescription());
        properties[1] = new Property(SystemStatistics.USER_COUNT.name(), Long.toString(userService.countAll()), SystemStatistics.USER_COUNT.getDescription());
        properties[2] = new Property(SystemStatistics.APPLICATION_COUNT.name(), Long.toString(applicationService.countAll()), SystemStatistics.APPLICATION_COUNT.getDescription());

        Properties props = new Properties();
        props.setProperties(properties);

        return props;
    }
View Full Code Here


  }

  public static EOQualifier dateWithinKeypathRangeQualifier(String startDateKey, String endDateKey, NSTimestamp date, boolean exclusive) {
    NSMutableArray<EOQualifier> startQualifiers = new NSMutableArray<EOQualifier>();
    if (exclusive) {
      startQualifiers.addObject(new ERXKeyValueQualifier(startDateKey, EOQualifier.QualifierOperatorLessThan, date));
    }
    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

  }

  public static EOQualifier keypathWithinDateRangeQualifier(String _startDateKey, NSTimestamp _startDate, NSTimestamp _endDate) {
    if (_startDate != null) {
      if (_endDate != null) {
        EOQualifier qualifier1 = new ERXKeyValueQualifier(_startDateKey, EOQualifier.QualifierOperatorGreaterThanOrEqualTo, _startDate);
        EOQualifier qualifier2 = new ERXKeyValueQualifier(_startDateKey, EOQualifier.QualifierOperatorLessThanOrEqualTo, _endDate);
        return new ERXAndQualifier(new NSArray<EOQualifier>(new EOQualifier[] { qualifier1, qualifier2 }));
      }
      return new ERXKeyValueQualifier(_startDateKey, EOQualifier.QualifierOperatorGreaterThanOrEqualTo, _startDate);
    }
    else if (_endDate != null) {
      return new ERXKeyValueQualifier(_startDateKey, EOQualifier.QualifierOperatorLessThanOrEqualTo, _endDate);
    }

    return null;
  }
View Full Code Here

    ERAttachment attachment = ERAttachment.fetchRequiredERAttachment(editingContext, thatAreForWebPath(webPath));
    return attachment;
  }

  public static EOQualifier thatAreForWebPath(String webPath) {
    final ERXKeyValueQualifier qualifier = ERAttachment.WEB_PATH.is(webPath);
    return qualifier;
  }
View Full Code Here

   * @param value
   *            the value
   * @return an EOKeyValueQualifier
   */
  public static ERXKeyValueQualifier like(String key, Object value) {
    return new ERXKeyValueQualifier(key, ERXQ.LIKE, value);
  }
View Full Code Here

   * @param value
   *            the value
   * @return an EOKeyValueQualifier
   */
  public static ERXKeyValueQualifier likeInsensitive(String key, Object value) {
    return new ERXKeyValueQualifier(key, ERXQ.ILIKE, value);
  }
View Full Code Here

   * @param value
   *            the value
   * @return an EOKeyValueQualifier
   */
  public static ERXKeyValueQualifier equals(String key, Object value) {
    return new ERXKeyValueQualifier(key, ERXQ.EQ, value);
  }
View Full Code Here

   * @param key
   *            the key
   * @return an EOKeyValueQualifier
   */
  public static ERXKeyValueQualifier isNull(String key) {
    return new ERXKeyValueQualifier(key, ERXQ.EQ, null);
  }
View Full Code Here

   * @param key
   *            the key
   * @return an EOKeyValueQualifier
   */
  public static ERXKeyValueQualifier isNotNull(String key) {
    return new ERXKeyValueQualifier(key, ERXQ.NE, null);
  }
View Full Code Here

   * @param key
   *            the key
   * @return an EOKeyValueQualifier
   */
  public static ERXKeyValueQualifier isTrue(String key) {
    return new ERXKeyValueQualifier(key, ERXQ.EQ, Boolean.TRUE);
  }
View Full Code Here

TOP

Related Classes of er.extensions.qualifiers.ERXKeyValueQualifier$PROPERTIES

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.