Package com.tangosol.util.filter

Examples of com.tangosol.util.filter.AndFilter


  {
    NamedCache cache = Utility.getCache(Constants.SHIPMENT_CACHE);
    LikeFilter likeCity = new LikeFilter("getToAddress.getCity", (String) model.getSelectedItem());
    GreaterEqualsFilter greaterEqualParcel = new GreaterEqualsFilter("getParcels.size"
        , (Integer) parcelCount.getValue());
    AndFilter andFilter = new AndFilter(likeCity, greaterEqualParcel);
    Map<String, Object> result = (Map<String, Object>) cache.aggregate(andFilter, new CalculateWeightAggregrator());
    resultArea.append("Total entries processed: "+result.get(Constants.TOTAL_ENTRY)+Constants.NEWLINE);
    resultArea.append("Total weight: "+result.get(Constants.TOTAL_WEIGHT));
  }
View Full Code Here


    sb.append("\n").append(q);
    System.out.println(sb.toString());
    ScriptEngineManager mgr = new ScriptEngineManager();
    ScriptEngine eng = mgr.getEngineByExtension("js");
    Bindings bindings = eng.getBindings(ScriptContext.ENGINE_SCOPE);
    bindings.put(Constants.FILTER, new AndFilter());
    try
    {
      eng.eval(sb.toString());
    }
    catch(ScriptException ex)
View Full Code Here

TOP

Related Classes of com.tangosol.util.filter.AndFilter

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.