Package org.objectstyle.wolips.eomodeler.core.model.qualifier

Examples of org.objectstyle.wolips.eomodeler.core.model.qualifier.EOQualifier


    _selectorMaps.add(new SelectorMap("likeIgnoreCase:", "caseInsensitiveLike"));
  }

  public static EOQualifier fromString(String qualifierString) {
    try {
      EOQualifier qualifier = new EOQualifierParser().parseQualifier(qualifierString);
      return qualifier;
    } catch (ParseException e) {
      throw new RuntimeException("Failed to parse qualfier.", e);
    }
  }
View Full Code Here


    }
    return operatorName;
  }

  public static EOQualifier createQualifierFromQualifierMap(EOModelMap qualifierMap) {
    EOQualifier qualifier = null;
    if (qualifierMap != null) {
      String className = qualifierMap.getString("class", true);
      if ("EOAndQualifier".equals(className) || "com.webobjects.eocontrol.EOAndQualifier".equals(className)) {
        qualifier = new EOAndQualifier(EOQualifierFactory.createQualifiersFromQualifierMaps(qualifierMap.getList("qualifiers")));
      } else if ("EOOrQualifier".equals(className) || "com.webobjects.eocontrol.EOOrQualifier".equals(className)) {
View Full Code Here

    }
    return qualifier;
  }

  private static EOQualifier createKeyValueExpression(String key, String selectorName, Object value) {
    EOQualifier qualifier = new EOKeyValueQualifier(key, selectorName, value);
    return qualifier;
  }
View Full Code Here

    EOQualifier qualifier = new EOKeyValueQualifier(key, selectorName, value);
    return qualifier;
  }

  private static EOQualifier createKeyComparisonExpression(String leftKey, String selectorName, String rightKey) {
    EOQualifier qualifier = new EOKeyComparisonQualifier(leftKey, selectorName, rightKey);
    return qualifier;
  }
View Full Code Here

  private static Collection<EOQualifier> createQualifiersFromQualifierMaps(Collection<Map<Object, Object>> _qualifiers) {
    List<EOQualifier> qualifiers = new LinkedList<EOQualifier>();
    if (_qualifiers != null) {
      for (Map<Object, Object> qualifierMap : _qualifiers) {
        EOQualifier exp = EOQualifierFactory.createQualifierFromQualifierMap(new EOModelMap(qualifierMap));
        qualifiers.add(exp);
      }
    }
    return qualifiers;
  }
View Full Code Here

    }
    return map;
  }

  public static Set<String> getQualifierKeysFromQualifierString(String qualifierString) {
    EOQualifier qualifier = EOQualifierFactory.fromString(qualifierString);
    return EOQualifierFactory.getQualifierKeysFromQualifier(qualifier);
  }
View Full Code Here

      throw new IllegalArgumentException("Unknown expression " + qualifier + ".");
    }
  }

  public static List<EOQualifierBinding> getQualifierBindingsFromQualifierString(EOEntity entity, String qualifierString) {
    EOQualifier qualifier = EOQualifierFactory.fromString(qualifierString);
    return EOQualifierFactory.getQualifierBindingsFromQualifier(entity, qualifier);
  }
View Full Code Here

  public void setQualifier(EOQualifier _qualifier) {
    setQualifier(_qualifier, true);
  }

  public void setQualifier(EOQualifier _qualifier, boolean updateQualifierString) {
    EOQualifier oldQualifier = myQualifier;
    myQualifier = _qualifier;
    firePropertyChange(EOFetchSpecification.QUALIFIER, oldQualifier, myQualifier);
    if (updateQualifierString) {
      setQualifierString(EOQualifierFactory.toString(myQualifier), false);
    }
View Full Code Here

  public void setQualifierString(String _qualifierString, boolean updateQualifier) {
    String oldQualifierString = myQualifierString;
    myQualifierString = _qualifierString;
    if (updateQualifier) {
      try {
        EOQualifier qualifier = EOQualifierFactory.fromString(_qualifierString);
        setQualifier(qualifier, false);
      } catch (RuntimeException e) {
        e.printStackTrace();
        setQualifier(null, false);
        throw e;
View Full Code Here

    }
    _expressionText.setText(qualifierString);
  }

  public EOQualifier getQualifier() {
    EOQualifier qualifier = EOQualifierFactory.fromString(_expressionText.getText());
    if (qualifier == null) {
      qualifier = new EOTruePredicate();
    }
    return qualifier;
  }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.eomodeler.core.model.qualifier.EOQualifier

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.